<font color="#000066"><font size="2"><font face="tahoma,sans-serif">I would rather use .call files. So easy to produce a text file...<br></font></font></font><br><div class="gmail_quote">On 18 August 2010 21:02, Steve Edwards <span dir="ltr"><<a href="http://asterisk.org">asterisk.org</a>@<a href="http://sedwards.com">sedwards.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Un-top-posting...<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
On 08/17/2010 09:00 AM, Tino wrote:<br>
<br></div><div class="im">
I would like to send sms to some external phone numbers from my asterisk server. Is it possible to send sms via softphones like X-Lite ? . Any tips regarding this will be helpful<br>
</div></blockquote>
<br><div class="im">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Wed, Aug 18, 2010 at 3:13 AM, Johann Hoehn <<a href="mailto:johann.hoehn@ecommerce.com" target="_blank">johann.hoehn@ecommerce.com</a>> wrote:<br>
</blockquote>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
This is easy to do by using email to SMS gateways. A list of them is on wikipedia (<a href="http://en.wikipedia.org/wiki/List_of_SMS_gateways" target="_blank">http://en.wikipedia.org/wiki/List_of_SMS_gateways</a>). For the Asterisk side, you have an extension that sends the email. I personally use an AGI script for this part, but you could use a System() call as well.<br>
</blockquote>
<br></div>
Using system() is almost always a hack -- and not the good kind :)<div class="im"><br>
<br>
On Wed, 18 Aug 2010, Tino wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thanks for your advice in this matter. But i am not sure how to pass the numbers to be sent sms in the dialplan.<br>
</blockquote>
<br></div>
You have a choice: you can pass them as channel variables or as command line options. I use both, frequently in the same program. Unfortunately, I can't clearly articulate why I use one over the other. If the variable is something that exists for the life of the call like ${CLIENT-ID} I tend to access it as a channel variable. If it's something that modifies the behavior of the AGI (--debug or --verbose) I always pass it as a command line option and use getopt_long()<br>
<br>
First, you need to pick a language. If this is a SOHOish hobby project, it doesn't matter -- pick a language you are comfortable with.<br>
<br>
If this is a high volume, performance critical project -- I'd vote for c.<br>
<br>
Once you've decided on a language, search out an established AGI library and learn a bit about the protocol. It's very simple but not always obvious. The 3 biggest stumbling blocks that trip up programmers are:<br>
<br>
1) You have to read the AGI environment before anything else.<br>
<br>
2) It's a request followed by a response. If you don't read the response, bad things will happen.<br>
<br>
3) It's STDIN/STDOUT based. If you try to "debug" by writing variables or messages using echo/printf/puts/etc, bad things will happen.<br>
<br>
Check out <a href="http://voip-info.org" target="_blank">voip-info.org</a> for more information on AGI.<br><font color="#888888">
<br>
-- <br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards <a href="mailto:sedwards@sedwards.com" target="_blank">sedwards@sedwards.com</a> Voice: +1-760-468-3867 PST<br>
Newline Fax: +1-760-731-3000</font><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>