Keywords: Mode: All keywords (AND) |
Fri Dec 23, 2011 08:06
|
tehnolog: Operating system name and version: OpenSuSE 10.2
Version of smsd: 3.1.14
Smsd installed from: sources
Name and model of a modem / phone: hyuiawei e155
Interface: USB
Hi all!
As in subject: I have a problem sending sms with russian symbols in UTF8 encoding just after server reboot (or start, of course). But when I try "sms3 restart" all is ok until next server reboot.
For encoding used unicode2sms:
#!/bin/sh
# checkhandler for SMS Tools 3
# autoconverts cyrillic messages to UCS-2BE
# add checkhandler=/path/to/ucsautoconvert into global part of smsd.conf
# written by lexy (lexy@mrlexy.ru), 2008
FILE=`mktemp /tmp/smsd_XXXXXX`
if [ ! `grep '[А-Яа-я]' $1 > /dev/null` -o `grep 'Alphabet:\s*U' $1 > /dev/null` ]
then exit 0
fi
cat $1 | awk '{if(NF==0) {s=1} if(s==0 && NF>0 && $0!~/Alphabet:[ \t]*U/){print}}' > $FILE
echo Alphabet: UCS2 >> $FILE
echo "" >> $FILE
cat $1 | awk '{if(NF==0) {s=1} if(s==1){print}}' | iconv -t UCS-2BE >> $FILE
mv $FILE $1
chmod 664 $1
I noticed, that when it is NOT ok in sms file there is no data about unicode cyrillic symbols. In fact, when message contains latin symbols at the beggining of the message they always present, but when "it is NOT ok" there are no more symbols at the place where cyrillic symbols appear, even if there are more latin symbols after cyrillic ones.
So, I think, the subject is why it's different when smsd started at boot time and when I start it later with sms3 script.
|
Fri Aug 26, 2011 08:53
|
tehnolog: I clearly understand that it is not a SMS standart to fall back in this question.
And now I see, that idea with additional header is quite a simple one. I don't know why, but I was sure that we cannot use user-defined headers in sms file. Now I see, that it's just a matter of evenhandler which fields to process.
Thanks a lot for answer! It really helped!
|
Tue Aug 23, 2011 14:27
|
tehnolog: Operating system name and version: OpenSuse
Version of smsd: 3.*
Smsd installed from: sources
Name and model of a modem: hyuiawei e155 (or alike, sorry =) )
Interface: USB
Hi all!
I got all things up and running and my question is a bit specific: is there some way to link message I'm composing and sending to smsd with one I'm recieving from evenhandler?
It was brief, now I'll try to describe situation a bit more.
We have oracle DBMS on one side and OpenSUSE linux with SMS Server Tools and a couple of USB modems installed on the other one. We manage to put most of the work on DBMS, so on linux machine I configured smsd.conf as "one queue - one device" and configured providers, tarification, etc. on DBMS side.
So now I can decide which device is better to send SMS with infinite variations of limits =).
Then, on DBMS side I compose SMS file and put it on linux directory in incoming folder to smsd to take it and process. Then evenhandler puts all reports back in database.
For better tarification I want to count message I'm going to send before I create sms-file. It's not a problem to insert a row in database, it's problem then to link report, sended with eventhandler, with row I inserted in database before creating sms-file.
As I see, common are only message itself and target no, but if we occasionaly sent same message to the same target within small amount of time (i.e. at the same time) using same device - then we are stuck. Or am I wrong?
Hope I was clear.
And hope you'll help me.
Thanks forward.
|