Keywords: Mode: All keywords (AND) |
Wed Apr 20, 2011 13:42
|
Alekk: keke, i'm very grateful!
Now, incoming message easy converted by iconv!!!
p.s. thank you very much for your work and smstools3 !!!
|
Wed Apr 20, 2011 12:50
|
Alekk: Operating system name and version: FreeBSD 8.2
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]#
/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
sample sms message looks like this:
[root@bsd /usr/SMS]# cat /var/spool/sms/incoming/GSM1.vQCYk6
From: 2108
From_TOA: A1 national, ISDN/telephone
From_SMSC: 38091044xxxx
Sent: 11-04-20 13:56:20
Received: 11-04-20 13:56:46
Subject: GSM1
Modem: GSM1
IMSI: 255071040392071
Report: no
Alphabet: UTF-8
Length: 30
!=>20 E>GC C7=0BL :0: 45;0! :)[root@bsd /usr/SMS]#
I looking for correct solution for decode my sms from GSM into readable russian.
Thanks.
|