(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-tonNAGOBA >INGENIEUR RESEAUX ET TELECOMMUNICATIONS >00222 737 20 81 > >
