Version of smsd: smstools-3.1.14
Smsd installed from: FreeBSD ports tree
Name and model of a modem / phone: Huawei e1550
Interface: USB
I need to receive sms and store into DB.
I can write a perl script for insert into DB, but cant find solution for decoding into russian.
Help me to decode incoming messages into russian.
My conf is:
incoming_utf8 = yes
decode_unicode_text = yes
eventhandler = /usr/SMS/event-decoder
devices = GSM1
logfile = /var/log/smsd.log
loglevel = 7
[GSM1]
device = /dev/cuaU0.0
incoming = yes
pin = 0000
[root@bsd /usr/SMS]#
decode_unicode_text = yes
eventhandler = /usr/SMS/event-decoder
devices = GSM1
logfile = /var/log/smsd.log
loglevel = 7
[GSM1]
device = /dev/cuaU0.0
incoming = yes
pin = 0000
[root@bsd /usr/SMS]#
'smsdconf' Syntax Highlight powered by GeSHi
/usr/SMS/event-decoder:
#!/bin/sh
# This sample converts a received message file from
# ISO to UTF-8 character set.
# After version 3.0.8 this is not needed.
# Use incoming_utf8 = yes in the modem settings.
case "$1" in
SENT|RECEIVED|FAILED)
FILE=`mktemp /tmp/smsd_XXXXXX`
iconv -f ISO-8859-15 -t UTF-8 < $2 > $FILE
cp $FILE /usr/SMS/
#chmod 644 $2
;;
esac
# This sample converts a received message file from
# ISO to UTF-8 character set.
# After version 3.0.8 this is not needed.
# Use incoming_utf8 = yes in the modem settings.
case "$1" in
SENT|RECEIVED|FAILED)
FILE=`mktemp /tmp/smsd_XXXXXX`
iconv -f ISO-8859-15 -t UTF-8 < $2 > $FILE
cp $FILE /usr/SMS/
#chmod 644 $2
;;
esac
'bash' Syntax Highlight powered by GeSHi
sample sms message looks like this:
I looking for correct solution for decode my sms from GSM into readable russian.
Thanks.
« Last edit by Alekk on Wed Apr 20, 2011 12:52, 165 months ago. »