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.