Hi, please find bellow the 3 different outputs of the  SMPP PDU log

This one is using urlencode('@ñé'); (message are not properly
displayed on the phone but kannel send 3 chars as supposed based on
the GSM charset: (smsc has NO alt-charset = "UTF-8") and seems

&text=%40%C3%B1%C3%A9&coding=0

--
DEBUG: SMPP PDU 0x801febe80 dump:
DEBUG:   type_name: submit_sm
DEBUG:   command_id: 4 = 0x00000004
DEBUG:   command_status: 0 = 0x00000000
DEBUG:   sequence_number: 7 = 0x00000007
DEBUG:   service_type: NULL
DEBUG:   source_addr_ton: 0 = 0x00000000
DEBUG:   source_addr_npi: 1 = 0x00000001
DEBUG:   source_addr: "42865"
DEBUG:   dest_addr_ton: 2 = 0x00000002
DEBUG:   dest_addr_npi: 1 = 0x00000001
DEBUG:   destination_addr: "9988776655"
DEBUG:   esm_class: 3 = 0x00000003
DEBUG:   protocol_id: 0 = 0x00000000
DEBUG:   priority_flag: 0 = 0x00000000
DEBUG:   schedule_delivery_time: NULL
DEBUG:   validity_period: NULL
DEBUG:   registered_delivery: 0 = 0x00000000
DEBUG:   replace_if_present_flag: 0 = 0x00000000
DEBUG:   data_coding: 0 = 0x00000000
DEBUG:   sm_default_msg_id: 0 = 0x00000000
DEBUG:   sm_length: 3 = 0x00000003
DEBUG:   short_message:
DEBUG:    Octet string at 0x80220fca0:
DEBUG:      len:  3
DEBUG:      size: 6
DEBUG:      immutable: 0
DEBUG:      data: 00 7d 05                                          .}.
DEBUG:    Octet string dump ends.
DEBUG: SMPP PDU dump ends.
--

This one is using:%00 %7D %05   (message are not properly displayed on
the phone but kannel send 3 chars as supposed based on the GSM
charset: (smsc has alt-charset = "UTF-8")

text=%00%7D%05&coding=0&alt-dcs=1  (here i think kannel recodes the
sms and does not recognize the alt-dsc)

--
DEBUG: SMPP PDU 0x801fe1040 dump:
DEBUG:   type_name: submit_sm
DEBUG:   command_id: 4 = 0x00000004
DEBUG:   command_status: 0 = 0x00000000
DEBUG:   sequence_number: 4974 = 0x0000136e
DEBUG:   service_type: NULL
DEBUG:   source_addr_ton: 0 = 0x00000000
DEBUG:   source_addr_npi: 1 = 0x00000001
DEBUG:   source_addr: "42865"
DEBUG:   dest_addr_ton: 2 = 0x00000002
DEBUG:   dest_addr_npi: 1 = 0x00000001
DEBUG:   destination_addr: "9988776655"
DEBUG:   esm_class: 3 = 0x00000003
DEBUG:   protocol_id: 0 = 0x00000000
DEBUG:   priority_flag: 0 = 0x00000000
DEBUG:   schedule_delivery_time: NULL
DEBUG:   validity_period: NULL
DEBUG:   registered_delivery: 0 = 0x00000000
DEBUG:   replace_if_present_flag: 0 = 0x00000000
DEBUG:   data_coding: 241 = 0x000000f1
DEBUG:   sm_default_msg_id: 0 = 0x00000000
DEBUG:   sm_length: 4 = 0x00000004
DEBUG:   short_message:
DEBUG:    Octet string at 0x801f836a0:
DEBUG:      len:  4
DEBUG:      size: 1024
DEBUG:      immutable: 0
DEBUG:      data: 3f 1b 29 3f                                       ?.)?
DEBUG:    Octet string dump ends.
DEBUG: SMPP PDU dump ends.
--


This one works and is using urlencode('@ñé'); (messages are correctly
displayed on the phone but kannel is transmitting 5 chars instead of 3
(gsm charset)

message sent using: text=%40%C3%B1%C3&coding=0

---
DEBUG: SMPP PDU 0x801fe1040 dump:
DEBUG:   type_name: submit_sm
DEBUG:   command_id: 4 = 0x00000004
DEBUG:   command_status: 0 = 0x00000000
DEBUG:   sequence_number: 4970 = 0x0000136a
DEBUG:   service_type: NULL
DEBUG:   source_addr_ton: 0 = 0x00000000
DEBUG:   source_addr_npi: 1 = 0x00000001
DEBUG:   source_addr: "42865"
DEBUG:   dest_addr_ton: 2 = 0x00000002
DEBUG:   dest_addr_npi: 1 = 0x00000001
DEBUG:   destination_addr: "9988776655"
DEBUG:   esm_class: 3 = 0x00000003
DEBUG:   protocol_id: 0 = 0x00000000
DEBUG:   priority_flag: 0 = 0x00000000
DEBUG:   schedule_delivery_time: NULL
DEBUG:   validity_period: NULL
DEBUG:   registered_delivery: 0 = 0x00000000
DEBUG:   replace_if_present_flag: 0 = 0x00000000
DEBUG:   data_coding: 0 = 0x00000000
DEBUG:   sm_default_msg_id: 0 = 0x00000000
DEBUG:   sm_length: 5 = 0x00000005
DEBUG:   short_message:
DEBUG:    Octet string at 0x801e66560:
DEBUG:      len:  5
DEBUG:      size: 6
DEBUG:      immutable: 0
DEBUG:      data: 40 c3 b1 c3 a9                                    @....
DEBUG:    Octet string dump ends.
DEBUG: SMPP PDU dump ends.
---


So far only using alt-charset = "UTF-8" on the smsc and url encoding
the GSM chars works but sending chars over ASCII 126 start to use
twice the space where in theory if I am right if they are coded using
the  GSM charset must consume 1 space.

Thanks in advance.

regards.


2011/5/21 Nikos Balkanas <nbalka...@gmail.com>:
> Hi,
>
> I saw that. But you never posted your submit_sm PDU from that attempt.
> Something else might be wrong. Please do.
>
> BR,
> Nikos
> ----- Original Message ----- From: "Nicolas de Bari Embriz Garcia Rojas"
> <nb...@backup.sh>
> To: "Nikos Balkanas" <nbalka...@gmail.com>; <users@kannel.org>
> Sent: Saturday, May 21, 2011 3:46 AM
> Subject: Re: gsm7 send messages > 140 <=160 chars length
>
>
> Hi, thanks for the reply, as said on the first email, when using this:
>
> text=%00%7D%05&coding=0&alt-dcs=1
>
> the characters are not properly  displayed on the phone
>
> the only way I can get the chars to be displayed correctly is using
> alt-charset = "UTF-8" but with this i can just send a max of 140 chars
>
> or coding the messages with UCS-2 but that limit to 70 chars
>
> Could it be an issue with  kannel or a parameter that i could be
> missing ? since looks like if internally maybe when using iconv, is
> treating the GSM like ASCII since the latin char n with tilde Γ± and Γ©
> is using 2 bytes instead of 1 like supposed to be the GSM charset
>
> regards.
>
> 2011/5/20 Nikos Balkanas <nbalka...@gmail.com>:
>>
>> Hi,
>>
>> 1) mo-recode is for incoming, not outgoing SMS. Read UG about it.
>> 2) SMSc submit_sm PDU takes precedence over access log. If it shows 3
>> Bytes,
>> it sends only 3 Bytes. I don't know access log that well, it may be
>> mistaken.
>> 3) Correct sendsms to send as GSM is:
>>
>> text=%00%7D%05&coding=0&alt-dcs=1
>>
>> Use alt-dcs if you have alt-charset in your smsc configuration and want to
>> force gsm.
>>
>> BR,
>> Nikos
>> ----- Original Message ----- From: "Nicolas de Bari Embriz Garcia Rojas"
>> <nb...@backup.sh>
>> To: <users@kannel.org>
>> Sent: Friday, May 20, 2011 5:47 PM
>> Subject: gsm7 send messages > 140 <=160 chars length
>>
>>
>> Hi all, this topic has been discussed several times, but I still
>> haven't found how to properly send messages > 140 <= 160 char length
>> including only the GSM 03.38 charset.
>>
>> for example, how to send a text messages of 160 characters including
>> only chars like @ Ο  ΞΉ.
>>
>> I updated my sources to the latest available on the SVN: REvision
>> 4908, and configured kannel with the following options:
>>
>> ./configure --with-defaults=speed --enable-docs=no
>> --with-malloc=native --enable-start-stop-daemon=no --prefix=/usr/local
>> --with-libs=-lpthread --with-mysql --disable-localtime
>> --with-cflags=-L/usr/local/lib -I/usr/local/include
>>
>> I had to use the --with-cflags="-L/usr/local/lib -I/usr/local/include"
>> so that on my system (FreeBSD 8.1 amd64) It could find iconv
>>
>> after compiling and installing the file gw-config.h seems to properly
>> been using iconv:
>> /* Defines for iconv. Β */
>> #define HAVE_ICONV 1
>> #define ICONV_CONST const
>>
>> Kannel is up and running (sending/receiving messages) my smsc conf is like
>> this:
>> group = smsc
>> smsc = smpp
>> smsc-id = "T42865"
>> allowed-smsc-id = "T42865"
>> transceiver-mode = 1
>> host = 10.23.15.4
>> our-host = 10.14.19.7
>> port = 8808
>> receive-port = 0
>> smsc-username = "username"
>> smsc-password = "password"
>> system-type = NULL
>> address-range = ""
>> source-addr-ton = 0
>> source-addr-npi = 1
>> dest-addr-ton = 2
>> dest-addr-npi = 1
>> msg-id-type = 0x01
>> log-file = "/var/log/kannel/smsc/T42865.log"
>> log-level = 0
>>
>> And my smsbox is like this:
>> group = smsbox
>> bearerbox-host = localhost
>> sendsms-port = 13013
>> sendsms-chars = "0123456789 "
>> log-file = "/var/log/kannel/smsbox/smsbox.log"
>> log-level = 1
>> access-log = "/var/log/kannel/smsbox/access.log"
>> mo-recode = true
>> http-request-retry = 10
>> http-queue-delay = 30
>>
>>
>> With this configuration If I want to send Β the chars "@ Ο  or ΞΉ" Β I
>> just urlencode the values and send them with coding=0
>>
>> $msg = urlencode('@Ο ΞΉ');
>>
>> so $msg is %40%C3%B1%C3%A9
>>
>> where:
>> %40 on UTF-8 is = Β 00 on gsm
>> %C3%B1 on UTF-8 is = Β 7D on gsm
>> %C3%A9 on UTF-8 is = Β 05 on gsm
>>
>> I send Β the message like:
>>
>> cgi-bin/sendsms?text=%40%C3%B1%C3%A9&coding=0....
>>
>> on the debug logs I see the following:
>> Β [12] DEBUG: Β Β Octet string at 0x801ef4e60:
>> Β [12] DEBUG: Β Β Β len: Β 3
>> Β [12] DEBUG: Β Β Β size: 6
>> Β [12] DEBUG: Β Β Β immutable: 0
>> Β [12] DEBUG: Β Β Β data: 00 7d 05 .}.
>> Β [12] DEBUG: Β Β Octet string dump ends.
>>
>> where seems that kannel is properly converting from UTF-8 go the GSM 7
>> bit charset
>> DEBUG: Β Β Β data: 00 7d 05
>>
>> but later on the bearerbox (access.log) I get something like this:
>>
>> [msg:5:@....] [udh:0:]
>>
>> If I am right, it means it is using 5 characters to send the @Ο ΞΉ
>>
>> Now If I add to the Β smsc this:
>> alt-charset = "UTF-8"
>>
>> the debug output is:
>> DEBUG: Β data: 40 c3 b1 c3 a9 Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β @....
>>
>> and the bearerbox (access.log) is the same:
>> [msg:5:@....] [udh:0:]
>>
>> But in this time the txt messages was Β properly delivering to the
>> users displaying the chars @Ο ΞΉ instead of just ??? but the size of the
>> sent messages was again 5 instead of 3.
>>
>> So my question is how to properly code or send the message to use only
>> 3 chars instead of 5 when sending only gsm-7 chars.
>>
>> I have also try using this:
>>
>> text=%00%7D%05&coding=0&alt-dcs=1
>>
>> of
>>
>> text=007D05&coding=0&alt-dsc=1
>>
>> but the message received by the phone din't display the chars. also
>> changing mo-encode true/false din't help.
>>
>> When using UCS-2 and coding=2 the chars are displayed on the mobile
>> but I can only send a max of 70 chars. and I would like to send 160.
>>
>> Any idea of how to do it?
>>
>> thanks in advance.
>>
>>
>
>

Reply via email to