[asterisk-users] asterisk + web services

Grey Man greymanvoip at gmail.com
Wed Jul 16 02:52:48 CDT 2008


On Wed, Jul 16, 2008 at 3:08 AM, Paul Belanger <pabelanger at gmail.com> wrote:
> List,
>
> We're working on an upcoming job that may require us to access a web
> service (WS).  I'm curious to hear peoples thoughts on the best way to
> do this with asterisk.  We'll be submitting a single number to the WS
> and it will return a success or error.
>
> One solution would be to write a simple perl script to interface into
> to the WS, and use SYSTEM() from asterisk to call it.  Another may be
> to use the func_curl to do it too.
>
> If anybody have suggestions / ideas please post them.
>

If you need to use a web service and return a SOAP payload then I'd
strongly suggest using the FastAGI. I've always found the FastAGI
interface simple and reliable and it allows you to put all your web
service processing code into whatever development environment you are
comfortable with. I am a heavier user of web services with Asterisk
and FastAGI is the way I do it.

By using FastAGI you'll also have a nice process separation boundary
between you new logic and Asterisk. It's pretty likely you'll need to
do a lot of changes to your logic at least in the short term and it's
a lot easier to restart the FastAGI process then it is to re-start
Asterisk when it has a bunch of live calls. And then of course you'll
need to add security to your web serivces or the API will change etc.
etc.

Incidentally I do use Curl calls from Asterisk as well but not for web
service end points. I use Curl to call a very basic HTTP server that
returns a single integer value. That's a whole different kettle of
fish compared to a web services API.

Regards,

Greyman.



More information about the asterisk-users mailing list