Ah, 0x00 could confuse things since it's the C string terminator. Is it
possible to replace it with something else?

Regards,

Alejandro

On Sun, Oct 25, 2009 at 10:24 PM, Sam <[email protected]> wrote:

> I think am close to it now. However, when i use CHAR(0x06, 0x05, 0x04,
> 0x23, 0xf4, 0x00, 0x00) I get the following. And though the message was
> delivered to my phone i could not open it. It appears the last two bytes of
> the udhdata were not trailed off ?
>
> 2009-10-25 20:41:33 [28320] [6] DEBUG:      data: 06 05 04 23 f4 42 45 47
> 49 4e 3a 56 43 41 52 44   ...#.BEGIN:VCARD
> 2009-10-25 20:41:33 [28320] [6] DEBUG:      data: 0d 0a 56 45 52 53 49 4f
> 4e 3a 32 2e 31 0d 0a 4e   ..VERSION:2.1..N
> 2009-10-25 20:41:33 [28320] [6] DEBUG:      data: 3a 6c 4e 61 6d 65 3b 66
> 4e 61 6d 65 0d 0a 54 45   :lName;fName..TE
> 2009-10-25 20:41:33 [28320] [6] DEBUG:      data: 4c 3b 50 52 45 46 3a 32
> 30 30 30 32 0d 0a 54 45   L;PREF:20002..TE
> 2009-10-25 20:41:33 [28320] [6] DEBUG:      data: 4c 3b 43 45 4c 4c 3a 31
> 30 30 30 31 0d 0a 45 4d   L;CELL:10001..EM
> 2009-10-25 20:41:33 [28320] [6] DEBUG:      data: 41 49 4c 3a 61 40 62 2e
> 63 6f 6d 0d 0a 45 4e 44   AIL:[email protected]
> 2009-10-25 20:41:33 [28320] [6] DEBUG:      data: 3a 56 43 41 52 44 0d 0a
>                         :VCARD..
>
>
> On Sun, Oct 25, 2009 at 7:26 PM, Alejandro Guerrieri <
> [email protected]> wrote:
>
>> You need to insert the binary values, not their string counterpart, either
>> with % or not...
>>
>> Try with something like ...2, 31, CHAR(0x06, 0x05, 0x04, 0x23, 0xf4, 0x00,
>> 0x00) );
>>
>> Regards,
>>
>> Alejandro
>>
>> On Sun, Oct 25, 2009 at 3:18 PM, Sam <[email protected]> wrote:
>>
>>> Thank you very much Alejandro. I got your point, however, i seem not
>>> to know how to go about that. I have inserted "06 05 04 23 f4 00 00"
>>> directly into the db as follows and yet its not working. Could you
>>> kindly advise.
>>>
>>> INSERT INTO send_sms (`momt`, `sender`, `receiver`, `msgdata`,
>>> `sms_type`, `dlr_mask`, `udhdata` ) VALUES  ('MT', 'bullion',
>>> '123456789',
>>> 'BEGIN:VCARD%0D%0AVERSION:2.1%0D%0AN:lName;fName%0D%0ATEL;PREF:20002%0D%0ATEL;CELL:10001%0D%0AEMAIL:a%
>>> 40b.com%0D%0AEND:VCARD%0D%0A',
>>> 2, 31, '06 05 04 23 f4 00 00' )
>>>
>>>
>>> On 10/25/09, Alejandro Guerrieri <[email protected]> wrote:
>>> > Try sending the UDH as binary data instead, you're sending the text
>>> > representation:
>>> >
>>> > smsbox:
>>> > 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 06 05 04 23 f4 00 00
>>> 42 45
>>> > 47 49 4e 3a 56 43 41   ...#...BEGIN:VCA
>>> >
>>> > sqlbox:
>>> > 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 25 30 36 25 30 35 25
>>> 30 34
>>> > 25 32 33 25 46 34 25   %06%05%04%23%F4%
>>> > 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 30 30 25 30 30 42 45
>>> 47 49
>>> > 4e 3a 56 43 41 52 44   00%00BEGIN:VCARD
>>> >
>>> > See instead of 06 05 04 23 f4 00 00 you're sending 30 30 25 30 30 42
>>> etc,
>>> > etc, which is the _string_ %06%05%04..., not the binary values. It's
>>> clear
>>> > if you see the binary dump on the firs line, on smsbox is
>>> > "...#...BEGIN:VCA"...
>>> > on sqlbox is "%06%05%04%23%F4%"...
>>> >
>>> > Regards,
>>> >
>>> > Alejandro
>>> >
>>> > On Sun, Oct 25, 2009 at 2:43 PM, Sam <[email protected]> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >>
>>> >> I have issues using sqlbox to send vcards. For example when i send
>>> over
>>> >> kannel HTTP interface using udh=%06%05%04%23%F4%00%00 and text =
>>> >>
>>> text=BEGIN:VCARD%0D%0AVERSION:2.1%0D%0AN:lName;fName%0D%0ATEL;PREF:10001%0D%0ATEL;CELL:20002%0D%0AEMAIL:a%
>>> >> 40b.com%0D%0AEND:VCARD%0D%0A
>>> >>
>>> >> I get it delivered to my mobile.
>>> >>
>>> >> However, when i insert the same text format to sqlbox as follows;
>>> >>
>>> >> INSERT INTO send_sms (`momt`, `sender`, `receiver`, `msgdata`,
>>> `sms_type`,
>>> >> `dlr_mask`, `udhdata` ) VALUES  ('MT', 'bullion', '123456789',
>>> >>
>>> 'BEGIN:VCARD%0D%0AVERSION:2.1%0D%0AN:lName;fName%0D%0ATEL;PREF:20002%0D%0ATEL;CELL:10001%0D%0AEMAIL:a%
>>> >> 40b.com%0D%0AEND:VCARD%0D%0A', 2, 31, '%06%05%04%23%F4%00%00' )
>>> >>
>>> >> it doesn't come to my mobile.
>>> >>
>>> >> TIA
>>> >>
>>> >>
>>> >> *BB log when i sent over HTTP
>>> >> *##############################
>>> >> 2009-10-25 13:16:19 [28320] [8] DEBUG: boxc_receiver: sms received
>>> >> 2009-10-25 13:16:19 [28320] [8] DEBUG: send_msg: sending msg to box:
>>> >> <127.0.0.1>
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG: SMPP[bullion]: throughput
>>> >> (0.00,0.00)
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG: SMPP[bullion]: Sending PDU:
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG: SMPP PDU 0xb1000648 dump:
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   type_name: submit_sm
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   command_id: 4 = 0x00000004
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   command_status: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   sequence_number: 1617 =
>>> >> 0x00000651
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   service_type: NULL
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   source_addr_ton: 5 =
>>> 0x00000005
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   source_addr_npi: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   source_addr: "bullion"
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   dest_addr_ton: 2 = 0x00000002
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   dest_addr_npi: 1 = 0x00000001
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   destination_addr: "123456789"
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   esm_class: 67 = 0x00000043
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   protocol_id: 0 = 0x00000000
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   priority_flag: 0 = 0x00000000
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   schedule_delivery_time: NULL
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   validity_period: NULL
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   registered_delivery: 1 =
>>> >> 0x00000001
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   replace_if_present_flag: 0 =
>>> >> 0x00000000
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   data_coding: 4 = 0x00000004
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   sm_default_msg_id: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   sm_length: 117 = 0x00000075
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:   short_message:
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:    Octet string at 0xb1000548:
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      len:  117
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      size: 1024
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      immutable: 0
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 06 05 04 23 f4 00 00
>>> 42
>>> >> 45 47 49 4e 3a 56 43 41   ...#...BEGIN:VCA
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 52 44 0d 0a 56 45 52
>>> 53
>>> >> 49 4f 4e 3a 32 2e 31 0d   RD..VERSION:2.1.
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 0a 4e 3a 6c 61 73 74
>>> 4e
>>> >> 61 6d 65 3b 66 4e 61 6d   .N:lName;fNam
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 65 0d 0a 54 45 4c 3b
>>> 50
>>> >> 52 45 46 3a 31 30 30 30   e..TEL;PREF:1000
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 30 31 0d 0a 54 45 4c
>>> 3b
>>> >> 43 45 4c 4c 3a 32 30 30   01..TEL;CELL:200
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 30 30 32 0d 0a 45 4d
>>> 41
>>> >> 49 4c 3a 74 65 73 74 40   002..EMAIL:a@
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 74 65 73 74 2e 63 6f
>>> 6d
>>> >> 0d 0a 45 4e 44 3a 56 43   b.com..END:VC
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:      data: 41 52 44 0d 0a
>>> >>                          ARD..
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG:    Octet string dump ends.
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG: SMPP PDU dump ends.
>>> >> 2009-10-25 13:16:19 [28320] [6] DEBUG: SMPP[bullion]: throughput
>>> >> (1.00,0.00)
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG: SMPP[bullion]: throughput
>>> >> (0.00,0.00)
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG: SMPP[bullion]: Got PDU:
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG: SMPP PDU 0xb1000648 dump:
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:   type_name: submit_sm_resp
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:   command_id: 2147483652 =
>>> >> 0x80000004
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:   command_status: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:   sequence_number: 1617 =
>>> >> 0x00000651
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:   message_id:
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:    Octet string at 0xb1000548:
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:      len:  36
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:      size: 37
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:      immutable: 0
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:      data: 39 35 32 33 31 35 39
>>> 36
>>> >> 2d 64 65 63 62 2d 34 33   95231596-decb-43
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:      data: 64 33 2d 38 61 36 30
>>> 2d
>>> >> 65 64 61 39 65 36 37 65   d3-8a60-eda9e67e
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:      data: 39 38 31 34
>>> >>                         9814
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG:    Octet string dump ends.
>>> >> 2009-10-25 13:16:20 [28320] [6] DEBUG: SMPP PDU dump ends.
>>> >> ##############################
>>> >>
>>> >>
>>> >> *BB log when i sent with SQLBOX
>>> >> *##############################
>>> >> 2009-10-25 13:23:26 [28320] [10] DEBUG: boxc_receiver: sms received
>>> >> 2009-10-25 13:23:26 [28320] [10] DEBUG: send_msg: sending msg to boxc:
>>> >> <sqlbox>
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG: SMPP[bullion]: throughput
>>> >> (0.00,0.00)
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG: SMPP[bullion]: Sending PDU:
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG: SMPP PDU 0xb1000648 dump:
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   type_name: submit_sm
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   command_id: 4 = 0x00000004
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   command_status: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   sequence_number: 1634 =
>>> >> 0x00000662
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   service_type: NULL
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   source_addr_ton: 5 =
>>> 0x00000005
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   source_addr_npi: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   source_addr: "bullion"
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   dest_addr_ton: 2 = 0x00000002
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   dest_addr_npi: 1 = 0x00000001
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   destination_addr: "123456789"
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   esm_class: 67 = 0x00000043
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   protocol_id: 0 = 0x00000000
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   priority_flag: 0 = 0x00000000
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   schedule_delivery_time: NULL
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   validity_period: NULL
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   registered_delivery: 1 =
>>> >> 0x00000001
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   replace_if_present_flag: 0 =
>>> >> 0x00000000
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   data_coding: 4 = 0x00000004
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   sm_default_msg_id: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   sm_length: 150 = 0x00000096
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:   short_message:
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:    Octet string at 0xb10025a0:
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      len:  150
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      size: 1024
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      immutable: 0
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 25 30 36 25 30 35 25
>>> 30
>>> >> 34 25 32 33 25 46 34 25   %06%05%04%23%F4%
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 30 30 25 30 30 42 45
>>> 47
>>> >> 49 4e 3a 56 43 41 52 44   00%00BEGIN:VCARD
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 25 30 44 25 30 41 56
>>> 45
>>> >> 52 53 49 4f 4e 3a 32 2e   %0D%0AVERSION:2.
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 31 25 30 44 25 30 41
>>> 4e
>>> >> 3a 6c 4e 61 6d 65 3b 66   1%0D%0AN:lName;f
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 4e 61 6d 65 25 30 44
>>> 25
>>> >> 30 41 54 45 4c 3b 50 52   Name%0D%0ATEL;PR
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 45 46 3a 32 30 30 30
>>> 32
>>> >> 25 30 44 25 30 41 54 45   EF:20002%0D%0ATE
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 4c 3b 43 45 4c 4c 3a
>>> 31
>>> >> 30 30 30 31 25 30 44 25   L;CELL:10001%0D%
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 30 41 45 4d 41 49 4c
>>> 3a
>>> >> 61 25 34 30 62 2e 63 6f   0AEMAIL:a%40b.co
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 6d 25 30 44 25 30 41
>>> 45
>>> >> 4e 44 3a 56 43 41 52 44   m%0D%0AEND:VCARD
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:      data: 25 30 44 25 30 41
>>> >>                         %0D%0A
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG:    Octet string dump ends.
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG: SMPP PDU dump ends.
>>> >> 2009-10-25 13:23:26 [28320] [6] DEBUG: SMPP[bullion]: throughput
>>> >> (1.00,0.00)
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG: SMPP[bullion]: throughput
>>> >> (0.00,0.00)
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG: SMPP[bullion]: Got PDU:
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG: SMPP PDU 0xb1000648 dump:
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:   type_name: submit_sm_resp
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:   command_id: 2147483652 =
>>> >> 0x80000004
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:   command_status: 0 =
>>> 0x00000000
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:   sequence_number: 1634 =
>>> >> 0x00000662
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:   message_id:
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:    Octet string at 0xb10025a0:
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:      len:  36
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:      size: 37
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:      immutable: 0
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:      data: 33 31 62 62 32 37 36
>>> 63
>>> >> 2d 38 34 34 38 2d 34 37   31bb276c-8448-47
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:      data: 64 39 2d 61 65 39 37
>>> 2d
>>> >> 33 66 36 36 38 62 37 33   d9-ae97-3f668b73
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:      data: 62 61 64 64
>>> >>                         badd
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG:    Octet string dump ends.
>>> >> 2009-10-25 13:23:28 [28320] [6] DEBUG: SMPP PDU dump ends.
>>> >>
>>> >> ##############################
>>> >>
>>> >
>>>
>>
>>
>

Reply via email to