%P is the escape code you're looking for according to the table, so

$_GET["to"] should have "54321" as its value.

Regards,

Juan L

Sent from my iPhone

> On Apr 19, 2016, at 10:51, yegorc...@mail.ru wrote:
> 
> Hello all!
> 
> I receive deliver_sm PDU:
> DEBUG: SMPP PDU 0x7f3c68000a10 dump:
> DEBUG: type_name: deliver_sm
> DEBUG: command_id: 5 = 0x00000005
> DEBUG: command_status: 0 = 0x00000000
> DEBUG: sequence_number: 0 = 0x00000000
> DEBUG: service_type: NULL
> DEBUG: source_addr_ton: 1 = 0x00000001
> DEBUG: source_addr_npi: 1 = 0x00000001
> DEBUG: source_addr: "79991234567"
> DEBUG: dest_addr_ton: 3 = 0x00000003
> DEBUG: dest_addr_npi: 1 = 0x00000001
> DEBUG: destination_addr: "54321"
> DEBUG: esm_class: 0 = 0x00000000
> DEBUG: protocol_id: 0 = 0x00000000
> DEBUG: priority_flag: 1 = 0x00000001
> DEBUG: schedule_delivery_time: NULL
> DEBUG: validity_period: NULL
> DEBUG: registered_delivery: 0 = 0x00000000
> DEBUG: replace_if_present_flag: 0 = 0x00000000
> DEBUG: data_coding: 8 = 0x00000008
> DEBUG: sm_default_msg_id: 0 = 0x00000000
> DEBUG: sm_length: 10 = 0x0000000a
> DEBUG: short_message:
> DEBUG: Octet string at 0x7f3c68000dd0:
> DEBUG: len: 10
> DEBUG: size: 11
> DEBUG: immutable: 0
> DEBUG: data: 04 21 04 42 04 3e 04 3f 00 31 .!.B.>.?.1
> DEBUG: Octet string dump ends.
> 
> My sms-service group in kannel.conf:
> group = sms-service
> keyword = default
> catch-all = yes
> max-messages = 0
> accept-x-kannel-headers = 1
> get-url = "http://127.0.0.1:8000/incoming.php?from=%p&to=%P&msg=%k";
> 
> Unfortunately there is no special code for 'destination_addr' in kannel 
> specification (Table 6-9. Parameters (Escape Codes)
> 
> How can I get destination address from deliver_sm?
> I mean to get value 54321 in incoming.php.
> 
> Please help me, its very important variable for me.
> 
> Egor
> 
> 
> 
> 

Reply via email to