AW: [Asterisk-Users] SMS - how to send one
Gutzke Klaus
klaus.gutzke at itellium.com
Tue Dec 21 09:05:24 MST 2004
Is it possible to use the sms_app over zap without the .call file?
I tried the example with zap behind a hipath. Reciving a SMS works fine, but if i send an SMS using the .call file i recive an SMS without a message.
Why didn't you use the lines?
Application: SMS
Data: default,,<MOBILE NUMBER>,<MESSAGE TO SEND>
You didn't need the smsdial context that way!!!
-----Ursprüngliche Nachricht-----
Von: Stefan Reuter [mailto:asterisk at stefan.de]
Gesendet: Montag, 20. Dezember 2004 08:41
An: Asterisk Users Mailing List - Non-Commercial Discussion
Betreff: Re: [Asterisk-Users] SMS - how to send one
> I realize that the most interesting aspect for some is to talk back
> and forth between phone and asterisk on the local server which is
> "nice" too.
yes i almost forgot about that one. app_sms can also act as a message
center itself: so if you connect some sms capable fixed line phone to
asterisk you can send sms messages to and receive messages from that
phone.
> I second the request for some config info. I've read everything I
> could find on this and it wasn't enough. I'm still missing some basic
> concept.
ok. the best resource is probably the wiki
http://www.voip-info.org/tiki-index.php?page=Asterisk%20cmd%20Sms
- but i am sure you already got that.
I am using asterisk-1.0.2 with the following config:
extensions.conf:
[capi-in]
exten => s/01930100,1,NoOp(incoming sms ${CALLERIDNUM})
exten => s/01930100,2,Answer
exten => s/01930100,3,Wait(2)
exten => s/01930100,4,SMS(default,a)
exten => s/01930100,5,Hangup
...
[smsdial]
exten => _X.,1,SMS(default,,${EXTEN},${MSG})
exten => _X.,2,SMS(default)
exten => _X.,3,Hangup
exten => h,1,Hangup
The [capi-in] context is the context where i send all my incoming calls
from pots to. Based on the callerid (01930100 is the callerid the t-com
message center sends, see list in wiki) incoming sms messages are
detected and send to app_sms in answer mode. (Note the wait(2) which is
really needed in order to allow the message center to catch up)
The [smsdial] context is used for sending outgoing sms messages.
To send messages i am using a small perl script that places a .call file
into /var/spool/asterisk/outgoing with the following content:
Channel: CAPI/<MY MSN>:b<NUMBER OF MESSAGE CENTER, i.e. 0193010>
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: smsdial
Extension: <MOBILE NUMBER>
Priority: 1
SetVar: MSG=<MESSAGE TO SEND>
You will find the perl script attached but be warned it is not ready for
production as it doesn't do any input validation!
> I will be asking French Telecom to enable SMS on our fixed line today
> (and we'll see if that stops the nice lady from reading "hello world"
> with a French accent) Fixed line SMS has been advertised for at least
> a year here.
Thats what i did here, too. So german telecom knows i dont like that
lady, but any other mobile providers still "talk" to me.
stefan
More information about the asterisk-users
mailing list