<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 08/19/2010 08:21 AM, Tiago Geada wrote:
<blockquote
cite="mid:AANLkTi=8S44BFGTUxSnE4zTd5B-Qz5ymivnUM_2JykAX@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
I would rather use .call files. So easy to produce a text file...<br>
<br>
<div>On 18 August 2010 21:02, Steve Edwards <span><<a
moz-do-not-send="true" href="http://asterisk.org">asterisk.org</a>@<a
moz-do-not-send="true" href="http://sedwards.com">sedwards.com</a>></span>
wrote:<br>
<blockquote>Un-top-posting...<br>
<br>
<blockquote>
<div>On 08/17/2010 09:00 AM, Tino wrote:<br>
<br>
</div>
<div>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>
<blockquote>On Wed, Aug 18, 2010 at 3:13 AM, Johann Hoehn <<a
moz-do-not-send="true" href="mailto:johann.hoehn@ecommerce.com">johann.hoehn@ecommerce.com</a>>
wrote:<br>
</blockquote>
<br>
</div>
<div>
<blockquote>This is easy to do by using email to SMS gateways. A
list of them is on wikipedia (<a moz-do-not-send="true"
href="http://en.wikipedia.org/wiki/List_of_SMS_gateways">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><br>
<br>
On Wed, 18 Aug 2010, Tino wrote:<br>
<br>
<blockquote>
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 moz-do-not-send="true" href="http://voip-info.org">voip-info.org</a>
for more information on AGI.<br>
</blockquote>
</div>
</blockquote>
<br>
<br>
Hi,<br>
<br>
how do you get the "text" to send? <br>
text that is sent from X-Lite for example.<br>
<br>
thx,<br>
anton<br>
<br>
<br>
</body>
</html>