[Asterisk-Users] AGI questions..

WipeOut wipe_out at onetel.com
Fri Oct 24 05:57:55 MST 2003


Olle E. Johansson wrote:

>
> Oh, flame war warning. There's been a lot of discussion on this before,
> mostly about the necessity to use PHP instead of <your favorit 
> language here>.

Thanks for the warning, but <my favorite language here> is PHP.. :)

>
> As I read the AGI docs, anything that you can start from a shell command
> with a #!/bin/sh or #!/usr/bin/perl construct works. I may be wrong,
> but otherwise start a /bin/sh and run PHP in there. 

A PHP script can have #!/usr/bin/php (on my server anyway) and it will 
execute from a command line just like any other so you don't have to use 
a sh shell first.. :)

>
> Look at AGI samples in source code and the Asterisk::AGI perl library.
> Lots of good pointers to docs, faqs etc here:
> http://www.voip-info.org/tiki-index.php?page=Asterisk+agi

Thanks, looking at the page now...

>
> No, there's a special set of commands you use. One of them lets you
> execute standard application commands you use in the dial plan,
> not the CLI commands as I understand. 

I guess that would be the "exec" command??  By the description on the 
page * "exec*: Executes a given Application"..

>
> See docs pointed to from the Wiki. One of the sample scripts output 
> all of
> the environment variables in AGI to stderr, even though I haven't been 
> able
> to get the stderr output. Where do I read the STDERR channel?
>
>> Finally, If I execute a call from within an AGI script, will the 
>> script continue processing when the call is hung up or terminated or 
>> would I have to use another AGI on the "h" extension to process post 
>> call operations?
>
> Good question. I can't answer.

This is an important question I need answered for my system..

Later..





More information about the asterisk-users mailing list