[Asterisk-Users] Sending an SMS out of Asterisk via Kannel

Henry Junior henryjunior at gmail.com
Mon Jul 18 10:28:01 MST 2005


GOAL: To pass variables from Asterisk to Kannel when sending out an  
SMS message using a URL.

CURRENTLY: I am able to pass a URL via Asterisk to Kannel and out of  
my GSM modem BUT I haven't figured out how to include Asterisk  
variables in the string.

I was hoping someone could help me figure out what I'm doing wrong.   
Perhaps there is a simple AGI I should be using.  I am not extremely  
comfortable writing AGIs but I suppose if I had a great example to  
modify I could figure it out.

Main objective at the moment would be to just modify slightly what I  
am doing here to pass the variable.

WORKING EXAMPLES:
This code works when I don't attempt to pass an Asterisk variable, in  
other words when it's just text in the message:

exten => s,9,System(curl "http://127.0.0.1:13370/cgi-bin/sendsms? 
username=name&password=pass&to=12122122121&from=12122121212&text=Message 
+text+here")

NON WORKING EXAMPLES:
When I attempt to pass an Asterisk variable this code does not work:

exten => s,9,System(curl "http://127.0.0.1:13370/cgi-bin/sendsms? 
username=name&password=pass&to=12122122121&from=12122121212&text=Message 
+text+here+${CALLERIDNUM}")

I realize this isn't the most elegant flow.  Suggestions are  
welcome.  I was wondering what am I doing wrong in this case though?

Thanks for your time and feedback.



More information about the asterisk-users mailing list