SMS Server Tools 3
 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. The forum is currently read-only, but will open soon. Sun Dec 22, 2024 05:13
SMSTools3 Community » Help and support Bottom

[solved] Can not send sms on local numbers.

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Mar 2011
Location: Russian Federation
Operating system name and version: Archlinux
Version of smsd: 3.1.14
Smsd installed from: AUR/sources
Name and model of a modem / phone: ZTE MF 180
Interface: USB

Good day.

I can send sms via sendsms on a standard numbers (+7906XXXXXXX) 11 digits but I can not sent on 6 digits numbers, this is so called local nimbers. I tried to use "s" befor numbers but it seems that this is not a short numbers so sending sms on sXXXXXX was failed.

I can send sms on 6-digit numbers by phone. How to send sms by the smsd ?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Use a header To_TOA: national in message file with those numbers, or define international prefixes as described here: Using Type Of Address selection.

Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
I tried to use

international_prefixes = 33

and then

national_prefixes = 33

in config file but command "sendsms 330xxx" failed in both cases.

Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
of course "sendsms 33XXXX test" does not work (not empty sms).

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
If you use national_prefixes = 33, do not use international_prefixes at the same time.

Have you tried to use a header To_TOA: national in SMS file?

Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
I did not use both variables at the same time.

Now I just tried to form SMS file by hands and copied it to outgoing dir. File content was:

----------<cut>-----------
To: 33xxxx
To_TOA: national

Hello, this is the sms.
----------<cut>-----------

There was no success. smsd_trouble.log messages were :

----------<cut>-----------
2011-09-01 08:56:12,7, GSM1: -> AT+CREG?
2011-09-01 08:56:12,7, GSM1: Command is sent, waiting for the answer
2011-09-01 08:56:12,7, GSM1: <- +CREG: 0,1 OK
2011-09-01 08:56:12,6, GSM1: Modem is registered to the network
2011-09-01 08:56:12,6, GSM1: Selecting PDU mode
2011-09-01 08:56:12,7, GSM1: -> AT+CMGF=0
2011-09-01 08:56:12,7, GSM1: Command is sent, waiting for the answer
2011-09-01 08:56:13,7, GSM1: <- OK
2011-09-01 08:56:13,7, GSM1: -> AT+CMGS=32
2011-09-01 08:56:13,7, GSM1: Command is sent, waiting for the answer
2011-09-01 08:56:13,7, GSM1: <- >
2011-09-01 08:56:13,7, GSM1: -> 00110006A13320360000FF17C8329BFD6681E8E8F41C949E83E8E83268DE9EBB00^Z
2011-09-01 08:56:13,7, GSM1: Command is sent, waiting for the answer
2011-09-01 08:56:44,7, GSM1: <- +CMS ERROR: 500 (Unknown error)
2011-09-01 08:56:44,3, GSM1: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
2011-09-01 08:56:44,5, GSM1: Waiting 10 sec. before retrying
----------<cut>-----------

I suspect that something wrong with operator ...

Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
Yes, this is operator problem. Now I can not to send SMS on this 6-digits number but several time ago it was possible.

Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
Beeline TechSupport said that number must be in 11-digits format and there in no other way to send sms on 6-digits number :).

I tried to send from beeline phone and tele2 modem (tele2 is on the smstools). I did not ask tele2 support but I think that they will answer the same.

Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
MTS has a table of prefixes:

http://www.tomsk.mts.ru/help/action_sim/city_phone_number/

Is any possibility to use such data to automate number correctin (short to 11-digit) in smstools ?

I do not want to write my own scripts if there are other ready to use features :-).

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
SMSTools has no built in features for this kind of conversion, and as far as I know, there is no ready made external script for it available.

You could to use a checkhandler. Every time when a message is picked up from the outgoing directory, it can be checked and modified by checkhandler. Just create a script or program which checks the format of destination number, and modifies it as required.

From the table it can be seen that 33-xx-xx should be converted to 913-853-xx-xx, but it's not a 11 digit number. Perhaps it should be prefixed with 7, and then it's an international number. If this is the case, you do not need to use any To_TOA headers, or xxx_prefixes settings.

Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
Ok. Tanks for right direction :-).

Here are scripts modified and copy-pasted from some sources (seems work):

checkhandler:

#!/bin/sh

FILE=`mktemp /tmp/smsd_XXXXXX`
/usr/local/bin/tomsk-numbers.pl  < $1 > $FILE
mv $FILE $1
chmod 644 $1
 
'bash' Syntax Highlight powered by GeSHi


tomsk-numbers.pl:

#!/usr/bin/perl

$num            = "";
while (<STDIN>) {
        if ( /^To: (\d)(\d)(\d)(\d)(\d)(\d)$/ ) {
                my $pref = "$1$2";
                CASE1: {
                        $num = "7913820$3$4$5$6", last CASE1 if $pref == 50;
                        $num = "7913827$3$4$5$6", last CASE1 if $pref == 57;
                        $num = "7913829$3$4$5$6", last CASE1 if $pref == 59;
                        $num = "7913850$3$4$5$6", last CASE1 if $pref == 30;
                        $num = "7983232$3$4$5$6", last CASE1 if $pref == 32;
                        $num = "7913853$3$4$5$6", last CASE1 if $pref == 33;
                        $num = "7913234$3$4$5$6", last CASE1 if $pref == 34;
                        $num = "7903955$3$4$5$6", last CASE1 if $pref == 22;
                        $num = "7909543$3$4$5$6", last CASE1 if $pref == 23;
                }
                print "To: $num\n";
        }
        else { print "$_"; }
}
 
'perl' Syntax Highlight powered by GeSHi


Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.