Hi Hugues, I don't see arabic letters in the log at "INFO: Starting to service <Åäæ èd3 ì4 l> from" . for example you may see some thing like: " لا إله إلا الله محمد رسول الله " in smsbox logs. can you post what you are trying to send?
Regards. -- Benaiad On Thu, Dec 10, 2009 at 7:43 PM, Hugues NAGOBA <[email protected]>wrote: > hi Benaiad and thanks for your reply, > thank you for the link for kannel charset doc. > the technical team of the operator told me that they sms are UCS-2 encoded > on the SMPP link. > then I put alt_charset to UCS-2 according to the doc. > I try also the ''from_to'' but nothing better. > It seems that the data comming from kannel are not correctly encoded.. > this is my smsbox logs: > 2009-12-10 16:07:27 [4680] [0] DEBUG: Kannel smsbox version cvs-20091115 > starting > 2009-12-10 16:07:27 [4680] [3] DEBUG: Thread 3 (gw/smsbox.c:sendsms_thread) > maps to pid 4680. > 2009-12-10 16:07:27 [4680] [0] DEBUG: dumping group (sendsms-user): > 2009-12-10 16:07:27 [4680] [0] DEBUG: <group> = <sendsms-user> > 2009-12-10 16:07:27 [4680] [0] DEBUG: <username> = <tester> > 2009-12-10 16:07:27 [4680] [0] DEBUG: <password> = <foobar> > 2009-12-10 16:07:27 [4680] [0] DEBUG: Started thread 4 > (gw/smsbox.c:obey_request_thread) > 2009-12-10 16:07:27 [4680] [4] DEBUG: Thread 4 > (gw/smsbox.c:obey_request_thread) maps to pid 4680. > 2009-12-10 16:07:27 [4680] [5] DEBUG: Thread 5 > (gw/smsbox.c:url_result_thread) maps to pid 4680. > 2009-12-10 16:07:27 [4680] [0] DEBUG: Started thread 5 > (gw/smsbox.c:url_result_thread) > 2009-12-10 16:07:27 [4680] [0] DEBUG: Started thread 6 > (gw/smsbox.c:http_queue_thread) > 2009-12-10 16:07:27 [4680] [6] DEBUG: Thread 6 > (gw/smsbox.c:http_queue_thread) maps to pid 4680. > 2009-12-10 16:07:27 [4680] [0] DEBUG: Connecting to <127.0.0.1> > 2009-12-10 16:07:27 [4680] [0] INFO: Connected to bearerbox at 127.0.0.1 > port 13001. > 2009-12-10 16:07:27 [4680] [7] DEBUG: Thread 7 > (gw/heartbeat.c:heartbeat_thread) maps to pid 4680. > 2009-12-10 16:07:27 [4680] [0] DEBUG: Started thread 7 > (gw/heartbeat.c:heartbeat_thread) > 2009-12-10 16:08:49 [4680] [4] INFO: Starting to service <Åäæ èd3 ì4 l> > from <+2227372081> to <1693> > 2009-12-10 16:08:49 [4680] [4] DEBUG: executing sms-service '/scripts/ > mosms.pl %2B2227372081 %C5%E4%E6+%E8d%123+%17%EC4+l 2009-12-10+15:08:49 > %C5%E4%E6+%E8d%123+%17%EC4+l' > 2009-12-10 16:08:49 [4680] [4] INFO: No reply sent, denied. > 2009-12-10 16:15:34 [4680] [0] INFO: Bearerbox told us to die > 2009-12-10 16:15:34 [4680] [0] INFO: Received (and handled?) 1 requests in > 405 seconds (0.00 per second) > > Thank you for your help. > > > > *Hugues Dah-ton NAGOBA* > *INGENIEUR RESEAUX ET TELECOMMUNICATIONS > **00222 737 20 81 > > * > > > > ------------------------------ > *De :* Benaiad <[email protected]> > *À :* Hugues NAGOBA <[email protected]> > *Cc :* kannel users list <[email protected]> > *Envoyé le :* Mer 9 Décembre 2009, 20 h 58 min 26 s > *Objet :* Re: Problems with arabic MO sms via SMPP > > Hi Hugues, > > 1- You have to convert the received MO message from "ISO-8859-1" to > "utf-8": > from_to($data, "iso-8859-1", "utf8"); > 2- Insert the received mo into a mysql table filed uses "utf-8" charset. > 3- posting some relevant log entries showing what you receive. > Also check this document ( written by Mr. Julien Buratto ) : > http://www.linkas..it/docs/kannel/ <http://www.linkas.it/docs/kannel/> > > Regards. > -- > Benaiad > > > On Wed, Dec 9, 2009 at 6:20 PM, Hugues NAGOBA <[email protected]>wrote: > >> (my english is no the best...) >> Hi all, >> I'm a newbe in kannel seting up. >> I've install it on a ubuntu server. >> I set up correctely a SMPP connection with an GSM operator. >> I can receive SMS and I use a perl script to store it in a mysql database. >> >> all that work correctly with french or english MO sms. >> but the problem is about arabic MO SMS. >> they are not correctly store in my database (â †â >> †âœ†â¼†â°€â€†ä„†ãœ†ä˜†â¼€â€†â¼†â †â¼†â°†âœ†ãŒ..).. >> >> this is my smskannel.conf >> ---------------------------------------------------------------------------- >> >> >> #CORE >> >> group = core >> admin-port = 13000 >> smsbox-port = 13001 >> admin-password = bar >> status-password = foo >> log-file = "/var/log/kannel/bearerbox.log" >> #admin-deny-ip = "" >> #admin-allow-ip = "" >> log-level = 0 >> box-deny-ip = "*.*.*.*" >> box-allow-ip = "127.0.0.1" >> access-log = "/var/log/kannel/access.log" >> sms-resend-retry = 5 >> sms-resend-freq = 30 >> >> >> >> >> #--------------------------------------------- >> #SMSC CONNECTION MATTEL >> >> group = smsc >> smsc = smpp >> interface-version=34 >> smsc-id = xxxx >> #allowed-smsc-id = radio >> host = xxx..xxx.xxx.xxx >> port = xxxx >> transceiver-mode = 1 >> smsc-username = "xxxxxx" >> smsc-password = "xxxxxx" >> system-type = "xxxxxx" >> source-addr-npi = 0 >> dest-addr-ton = 5 >> #log-file = "/var/log/kannel/mattel1.log" >> log-level = 0 >> alt-charset = UTF-8 >> >> #--------------------------------------- >> # SMSBOX SETUP >> >> group = smsbox >> bearerbox-host = 127.0.0.1 >> sendsms-port = 13013 >> mo-recode=true >> global-sender = "eeeee" >> log-file = "/var/log/kannel/smsbox..log" >> log-level = 0 >> access-log = "/var/log/kannel/access.log" >> >> >> >> >> #--------------------------------------------- >> # SEND-SMS USERS >> >> group = sendsms-user >> username = tester >> password = foobar >> #user-deny-ip = "" >> #user-allow-ip = "" >> >> >> >> #--------------------------------------------- >> # SERVICES >> >> group = sms-service >> keyword = default >> #text = "No service specified" >> #get-url = " >> http://localhost/smsphp/smsin.php?sender=%p&text=%a&date=%t&charset=%C" >> exec = "/scripts/mosms.pl %p %a %t %b" >> omit-empty = true >> max-messages = 0 >> accept-x-kannel-headers = true >> >> >> >> this is my perl script >> ----------------------------------------------------------------------------- >> >> >> #!/usr/bin/perl -w >> use utf8; >> use strict; >> use DBI; >> use URI::Escape; >> use Encode; >> >> >> my $database="xxxxx"; >> my $hostname="localhost"; >> my $login ="xxxx"; >> my $mdp ="xxxxxxxxxx"; >> >> my $dsn = "DBI:mysql:database=$database;host=$hostname"; >> my $dbh = DBI->connect($dsn, $login, $mdp) or die "Connecting from PHP to >> MySQL database failed: $DBI::errstr"; >> >> #my $str = encode_utf8(uri_unescape($ARGV[1])); >> my $str = $ARGV[1]; >> $str =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg; >> >> >> >> my $sSQL = "INSERT INTO smsin (num, text, date, destinat) VALUES >> ('$ARGV[0]','$str','$ARGV[2]','$ARGV[3]')"; >> my $st = $dbh->prepare($sSQL) >> or die "Preparing MySQL query failed: $DBI::errstr"; >> >> $st->execute() >> or die "The execution of the MySQL query failed: $DBI::errstr"; >> >> $dbh ->disconnect(); >> >> >> -------------------------------------------------------------------------------------- >> >> >> thanks for your help. >> >> >> *Hugues Dah-ton NAGOBA* >> *INGENIEUR RESEAUX ET TELECOMMUNICATIONS >> **00222 737 20 81 >> >> * >> >> >> >> > >
