Try the other patch I've submitted (the one extending Stipe's patch), and 
url-encode msgdata and udhdata instead.

Regards,

Alex
--
Alejandro Guerrieri
[email protected]



On 10/11/2010, at 10:26, Сергей Бочаров wrote:

> Hello! 
> I try to send wap push message with sqlbox and postgres but no luck
> 
> I have code :
> 
> $sms_msg='chr(27)||chr(6)||chr(1)||chr(174)||chr(2)||chr(5)||chr(106)||chr(0)||chr(69)||chr(198)||chr(12)||chr(3)||'.
>      "'http:\\test.com'||".
>      'chr(0)||chr(1)||chr(3)||'.
>      "'test link'||".
>      'chr(0)||chr(1)||chr(1)';
> 
> $ssql="insert into send_sms (momt, sender, 
> receiver,msgdata,time,smsc_id,account,sms_type,dlr_mask,dlr_url,mclass,mwi,udhdata)
>  
>                          values ('MT', '$sms_from', 
> '$sms_to',$sms_msg,'".time()."','$smsc',$uid,0,31,'$dlr_url',-1,-1,chr(6)||chr(5)||chr(4)||chr(11)||chr(132)||chr(35)||chr(240))";
> 
> 
> I have in sqlbox log (when it try to insert to sent_sms):
> --------
> 
> 2010-11-10 11:25:46 [3454] [1] ERROR: PGSQL: ERROR:  invalid byte sequence 
> for encoding "UTF8": 0x84
> HINT:  This error can also happen if the byte sequence does not match the 
> encoding expected by the server, which is controlled by "client_encoding".
> ------
> 
> bearerbox log:
> -------------
> 
> 2010-11-10 12:02:38 [18360] [6] DEBUG: SMPP PDU 0x81be100 dump:
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   type_name: submit_sm
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   command_id: 4 = 0x00000004
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   command_status: 0 = 0x00000000
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   sequence_number: 16882 = 0x000041f2
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   service_type: NULL
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   source_addr_ton: 5 = 0x00000005
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   source_addr_npi: 0 = 0x00000000
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   source_addr: "ADMIN"
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   dest_addr_ton: 1 = 0x00000001
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   dest_addr_npi: 1 = 0x00000001
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   destination_addr: "79250103663"
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   esm_class: 67 = 0x00000043
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   protocol_id: 0 = 0x00000000
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   priority_flag: 0 = 0x00000000
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   schedule_delivery_time: 
> "101110090238000+"
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   validity_period: "101110090238000+"
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   registered_delivery: 1 = 0x00000001
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   replace_if_present_flag: 0 = 
> 0x00000000
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   data_coding: 0 = 0x00000000
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   sm_default_msg_id: 0 = 0x00000000
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   sm_length: 14 = 0x0000000e
> 2010-11-10 12:02:38 [18360] [6] DEBUG:   short_message:
> 2010-11-10 12:02:38 [18360] [6] DEBUG:    Octet string at 0x81c2780:
> 2010-11-10 12:02:38 [18360] [6] DEBUG:      len:  14
> 2010-11-10 12:02:38 [18360] [6] DEBUG:      size: 1024
> 2010-11-10 12:02:38 [18360] [6] DEBUG:      immutable: 0
> 2010-11-10 12:02:38 [18360] [6] DEBUG:      data: 06 05 04 0b 84 23 f0 3f 3f 
> 3f 3f 3f 3f 6a         .....#.??????j
> 2010-11-10 12:02:38 [18360] [6] DEBUG:    Octet string dump ends.
> 2010-11-10 12:02:38 [18360] [6] DEBUG: SMPP PDU dump ends.
> -----------
> 
> data is:  06 05 04 0b 84 23 f0 3f 3f 3f 3f 3f 3f 6a         .....#.??????j    
>  
> where 06 05 04 0b 84 23 f0 - is udhdata content, but what is '3f 3f 3f 3f 3f 
> 3f 6a' ? i think it must be my message but not 
> 
> 
> 


Reply via email to