[asterisk-users] Local SMS how-to.
Anselm Martin Hoffmeister
anselm at hoffmeister-online.de
Tue May 22 12:47:03 MST 2007
Am Dienstag, den 22.05.2007, 17:35 +0300 schrieb Jonson Player:
> Thank you for reply. Can you send me some working configs? I'm still
> confusing about this sms option.
Just to get you started, try this:
Find out which user asterisk runs as. Get a shell for that user.
Run (all in one line)
smsq --mt --oa=321 --mttx-callerid=01930101 --mttx-channel=SIP/abcde
"message text goes here"
where "321" will displayed as sender id on the handset, and "01930101"
will have to replaced by the mobile center known to your phone, plus "1"
at the end - the German T-Com seems to use 0193010, and this setting
works for me. Further, SIP/abcde must be the channel that a SMS-capable
handset is available on: If you have some ATA with a DECT handset
connected, or similar, use the channel name exactly as you would in the
Dial() command.
First thing to find out is if this works. Be sure to have asterisk in
extra-verbose running a console to see what happens.
If the mobile handset rings (instead of getting the SMS) either the
01930101 number has not been set correctly or it probably is not
compatible with Asterisk SMS.
Once you get this far, you would need the other way round. When your
mobile phone tries to _send_ a text message, it will go to 01930100 (sms
center number plus "0"). You will have to care for that in your
extensions.conf, like this
exten => 01930100,1,Wait(2)
exten => 01930100,2,Answer()
exten => 01930100,3,Wait(2)
exten => 01930100,4,SMS(01930100,as)
exten => 01930100,5,Wait(2)
exten => 01930100,6,Hangup()
In my experience those Wait(2) improve reliability over internet
connections, they probably are superfluous if you have reliable
low-latency LAN. For me, they made the difference between 10/100 and
95/100 successfuly sent messages.
You will have to write your own scriptwork to play with the files that
will be created from those commands. Their structure is simple, you will
find out.
Sending EMS (for ringtones and bitmaps) is a bit more complex, you will
need the UDH flag for that. I think I documented that once on this ML
but am not sure. However, it is possible with some Siemens Gigaset
devices, and pictures or monophonic ringtones.
BR
Anselm
More information about the asterisk-users
mailing list