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 <[email protected]>: > 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" > <[email protected]> > To: <[email protected]> > 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. > >
