[Asterisk-Users] Countries supporting SMS on PSTN (ISDN)

James Harper james.harper at bendigoit.com.au
Fri Mar 17 19:30:07 MST 2006


> Hi James, how would you feel about writing a quick howto and extension
> configuration for SMS in Australia. There is very little information
on
> Google or voip-info as to how this could be done. I have tried myself
> however I keep getting the message from Telstra as opposed to the
actual
> data.

Following is a cut'n'paste of something I posted to the Linux Users
Victoria mailing list. Assuming you have configured everything else
correctly, you may just need a pause between answering the phone and
invoking the sms app.

If it still doesn't work for you, let me know and I'll offer what
assistance I can.

James

"
Okay... some background...

Telstra use ETSI standard ES 201 912 for their fixed line sms product,
which is what most fixed line sms implementations use in other
countries.

When Telstra send an sms to a fixed line, they first send the CID
(Caller ID) between the first and second rings, even if you don't have
CID enabled on your service. If the TE (Terminal Equipment eg Fixed Line
SMS Capable handset, or asterisk) detects that this is the phone number
of the SMS message center (0198339100 for Telstra's) then it doesn't
allow the phone to ring but instead answers it immediately.

Then the TE sends a packet at 1200 baud (using the old US modem protocol
(Bell 212?)) to indicate to the other end that it can accept SMS
messages, and then Telstra sends the message down the line. They
exchange a few more packets and then disconnect.

If Telstra detect Fax tones, they send the message in fax format so you
get a fax instead, which is cool but probably not that useful.

If Telstra detect nothing useful, they use the 'talking text' to read
the message out to you.

Sending a message to Telstra is much the same, the TE dials the message
center number and they exchange tones again.

Given all of the above, I almost think you could do it with a modem
provided it knows how to speak Bell 212 (I think some modern ones have
forgotten this :). I've heard reports to the contrary though.

To get it working under my home asterisk setup, I do this:

[default]
exten => 0198339100,1,Goto(sms_tx,s,1)

[fxo]
exten => s,1,Answer
exten => s,2,GotoIf($["${CALLERIDNUM}" = "0198339100"]?sms_rx,s,1)
exten => s,3,GotoIf($["${CALLERIDNUM}" = "0"]?tm,s,1)
exten => s,4,Dial(${ALLEXTENSIONS},60,tr)

[sms_rx]
exten => s,1,Wait(1)
exten => s,2,SMS(${CALLERIDNUM},a)
exten => s,3,Hangup

[sms_tx]
exten => s,1,Dial(Zap/1/0198339100)
exten => s,2,SMS()
exten => s,3,Hangup

'fxo' is the context that calls from my x100p card come in on (don't get
one of these - too much echo in AU :). If the callerid is that of the
message center, it jumps into the 'sms_rx' context where it waits a
second (probably don't need to wait a whole second, but without a wait
it didn't work for me). Then it invokes the SMS app which receives the
message, then hangs up. I'm sure I had a 'System' call to a script in
there which would process the received messages and email them out to
me, but obviously didn't save it. SMS() just puts it in
/var/log/asterisk/ somewhere

'default' says that if the extension is that of the message center, goto
the 'sms_tx' context. 'sms_tx' dials the message center and sends the
message. This could probably be cleaned up a bit.

To send a message, from the linux command line (logged in as asterisk):
'smsq --motx-channel=Local/0198339100 0412345678 testing from asterisk'
(where 0412345678 is the target phone number).

Enjoy!

James
"



More information about the asterisk-users mailing list