[asterisk-users] sending sms from Asterisk server
Tiago Geada
tiago.geada at gmail.com
Wed Aug 18 20:21:39 CDT 2010
I would rather use .call files. So easy to produce a text file...
On 18 August 2010 21:02, Steve Edwards <asterisk.org at sedwards.com> wrote:
> Un-top-posting...
>
> On 08/17/2010 09:00 AM, Tino wrote:
>>
>> 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
>>
>
> On Wed, Aug 18, 2010 at 3:13 AM, Johann Hoehn <johann.hoehn at ecommerce.com>
>> wrote:
>>
>
> This is easy to do by using email to SMS gateways. A list of them is on
>> wikipedia (http://en.wikipedia.org/wiki/List_of_SMS_gateways). 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.
>>
>
> Using system() is almost always a hack -- and not the good kind :)
>
>
> On Wed, 18 Aug 2010, Tino wrote:
>
> Thanks for your advice in this matter. But i am not sure how to pass the
>> numbers to be sent sms in the dialplan.
>>
>
> 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()
>
> 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.
>
> If this is a high volume, performance critical project -- I'd vote for c.
>
> 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:
>
> 1) You have to read the AGI environment before anything else.
>
> 2) It's a request followed by a response. If you don't read the response,
> bad things will happen.
>
> 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.
>
> Check out voip-info.org for more information on AGI.
>
> --
> Thanks in advance,
> -------------------------------------------------------------------------
> Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
> Newline Fax: +1-760-731-3000
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100819/cb2769e5/attachment.htm
More information about the asterisk-users
mailing list