SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Sat May 25, 2024 10:32
SMSTools3 Community » Help and support Bottom

[answered] problem sending persian message

  This topic is locked

Page:  1

Author Post
Member
Registered:
Jul 2010
Location: tehran, Iran
Operating system name and version: ubuntu 9.04
Version of smsd: 3.1.6-1
Smsd installed from: package repository
Name and model of a modem / phone: GSM modem
Interface: serial



Hi,
I am using sms server tools for send and receive messages.but my problem is about persian messages that need setting unicode.
my /etc/smsd.conf is like this:

#
# /etc/smsd.conf
#
# Description: Main configuration file for the smsd
#

devices = GSM1
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
logfile = /var/log/smstools/smsd.log
infofile = /var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent
stats = /var/log/smstools/smsd_stats
#loglevel = 7
#delaytime = 10
#errorsleeptime = 10
#blocktime = 3600
#stats = /var/log/smsd_stats
#stats_interval = 3600
#stats_no_zeroes = no
#checkhandler = /usr/local/bin/smscheck
receive_before_send = no
# autosplit 0=no 1=yes 2=with text numbers 3=concatenated
autosplit = 3
# store_received_pdu 0=no, 1=unsupported, 2=unsupported and 8bit, 3=all
#store_received_pdu = 1
#validity = 255
decode_unicode_text = yes
#internal_combine = no
# You can specify here an external program that is started whenever an alarm occurs.
# alarmhandler = /path/to/an/alarmhandler/script
# Specifies what levels start an alarmhandler. You can use value between 2 and 5.
# alarmlevel = 4
#eventhandler = /usr/local/bin/smsd_eventhandler
#blacklist = /etc/smstools/blacklist
#whitelist = /etc/smstools/whitelist

#[queues]
# Commented lines are examples for germany
# D1 = /var/spool/sms/D1
# D2 = /var/spool/sms/D2
# O2 = /var/spool/sms/O2
# EPLUS = /var/spool/sms/EPLUS
# QUAM = /var/sppol/sms/QUAM
# MOBILCOM = /var/spool/sms/MOBILCOM
#OTHER = /var/spool/sms/OTHER

#[provider]
# Commented lines are examples for germany
# D1 = 49160, 49170, 49171, 49175, 49151
# D2 = 491520, 49162, 49172, 49173, 49174
# O2 = 49176, 49179, 49159
# EPLUS = 49163, 49177, 49178, 49157
# QUAM = 49150
# MOBILCOM = 49156
#OTHER = 0,1,2,3,4,5,6,7,8,9

#[GSM1]
# init = ATE0+CPMS="SM"+CNMI=2,0,0,2,1
# # Windows: /dev/com1, Solaris: /dev/cua/a, Linux /dev/ttyS0
# device = /dev/ttyS0
# incoming = yes
# queues = OTHER
# You don't need a PIN for mobile phones
# pin = 1111
# mode = new
# smsc = 491722270000
# baudrate = 19200
# rtscts = yes
# cs_convert = yes
# report = no
# memory_start = 1
# primary_memory = memory name
# secondary_memory = memory name
# secondary_memory_max = number
# pdu_from_file = /var/spool/sms/GSM1-PDU
# sending_disabled = no
decode_unicode_text = yes
# internal_combine = no
#
#[GSM2]
#init = ATE0
# Windows: /dev/com2, Solaris: /dev/cua/b, Linux /dev/ttyS1
#device = /dev/ttyS1
#incoming = yes
#queues = OTHER
#You don't need a PIN for mobile phones
#pin = 2222
#mode = new
#smsc = 491710760000
#baudrate = 19200
#rtscts = yes
#cs_convert = yes
#report = no
#memory_start = 1
#primary_memory = memory name
#secondary_memory = memory name
#secondary_memory_max = number
#pdu_from_file = /var/spool/sms/GSM2-PDU
#sending_disabled = no
decode_unicode_text = yes
#internal_combine = no
[GSM1]
#init =
init = AT+CPMS="ME"
device = /dev/ttyS0
incoming=yes
#pin =
baudrate = 19200
decode_unicode_text = yes
report=yes
 
 
'smsdconf' Syntax Highlight powered by GeSHi


---------------------------------------------------------

my message is like this:

To: 09122904435
Alphabet: UCS2

ﺱﻼﻣ

---------------------------------------------------------


when I copy this message into outgoing directory send message but text of message is not parsed correctly.


Regards,
Mahdieh saeed

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Your locale in Ubuntu is UTF-8, right?

Please try the latest sendsms script, which has automatic detection for Unicode messages. The script can be found from here. It is also available in the package.

When a message is sent using Unicode character set, headers in the message file should be presented using UTF-8, but the message body must be presented using Unicode (Big Endian). I think that in your case the message body was written using UTF-8, which causes the problem.

You have defined decode_unicode_text = yes in the smsd.conf (several places). Probably it does not work properly with you language. After you have seen how incoming messages work, you probably need to disable internal decoding and define an eventhandler for character set conversion. See this post for details.

Member
Registered:
Jul 2010
Location: tehran, Iran
Topic owner
thanks alot keke :)
send and receive persian messages work correctly with your advice.

Best regards,
Mahdieh saeed

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Thanks for the information.

Just for curiosity, and for other users: was decode_unicode_text working properly with persian language, or did you use eventhandler with iconv for the conversion?

Member
Registered:
Jul 2010
Location: tehran, Iran
Topic owner
"decode_unicode_text" did not work with persian language.I am using "eventhandler" with iconv for the conversion.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Thanks.

In the version 3.1.7 and later there is USE_ICONV definition available in the src/Makefile. With this setting internal conversion is not limited to latin alphabet. However, using this option requires editing of Makefile and compiling smsd from sources. As you now have a working system with eventhandler, you do not need to upgrade. The version 3.2 will have an automatic detection for character set and then the situation is different. (Right now I do not know when 3.2 is released).

Member
Registered:
Jul 2010
Location: tehran, Iran
Topic owner
You're welcome,
thanks .

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.