Asterisk 10 SMS Example?


#1

Does anyone have a full working example of routing incoming SMS messages to an AGI script and/or sending SMS messages from an AGI script?

I get the inbound SIP message:

<— SIP read from UDP:67.231.8.XXX:50XX —>
MESSAGE sip:1503597XXXX@107.22.85.XXX SIP/2.0
Record-Route: sip:67.231.8.XXX;lr=on;ftag=172.21.1.115338+1+3d42000a+8219e8ec;vsf=AAAAAAAAAAAAAAAAAAAAABEYABcaGkoWCUAKEhEQFQVGTRwUbml2ZXJzZS5jb20-
Record-Route: sip:67.231.8.XX;lr=on;ftag=172.21.1.115338+1+3d42000a+8219e8ec
Via: SIP/2.0/UDP 67.231.8.XXX;branch=z9hG4bKaa21.7cc978d2.0
Via: SIP/2.0/UDP 67.231.8.XX;branch=z9hG4bKaa21.89cd6ff3.0
Via: SIP/2.0/UDP 205.174.182.XX:50XX;branch=z9hG4bK+de79adc6fd47bf0ee8e3b035d5d089d61+172.21.1.1XX338+1
Max-Forwards: 68
To: sip:1503597XXXX@bandwidth.nextamh.syniverse.com
Call-ID: 866E48B8@172.21.1.XXX338
From: sip:15037081210@synsms.bandwidth.com;tag=172.21.1.XXX338+1+3d42000a+8219e8ec
CSeq: 1040427416 MESSAGE
Content-Length: 5
Content-Type: text/plain
X-CustomerIp: 205.174.182.XX

Hello
<------------->
— (14 headers 1 lines) —
Receiving message!
Looking for 1503597XXXX in messages (domain 107.22.85.XXX)

I am trying to experiment with the new MessageSend functionality as a test in my dial plan I have:

[messages]
exten => 7777,1,Set(=${MESSAGE(“Hello World!”)})
exten => 7777,1,Set(i=${MESSAGE_DATA(“Hello World!”)})
exten => 7777,2,MessageSend(SIP/BWSMS/+1503xxxxxxx)

but so far it’s not quite working. Thanks!

Shaun


#2

hi:
please show the debug info?


#3

I was able to get this further, please see this post: http://forums.digium.com/viewtopic.php?f=1&t=80754&p=166482&sid=da43d4f1f78624b621fa80dbeecd8b8f&sid=da43d4f1f78624b621fa80dbeecd8b8f#p166482