[asterisk-users] PHP AGI : handle Event /AGI session

Steve Edwards asterisk.org at sedwards.com
Fri Nov 20 12:44:15 CST 2009


Un-top-posting...

>> On Fri, 20 Nov 2009, mickael ropars wrote:
>>
>>> someone send a URL to call someone a PHP script (script 1) is launch 
>>> and in its I configure Astmanager in order to make an originating call 
>>> then my script stop running and Asterisk continue processing the call 
>>> in an extension when hangup occurs I execute another AGI script 
>>> (script 2).

> 2009/11/20 Steve Edwards <asterisk.org at sedwards.com>

>> Is script1 executed by Asterisk or Apache? If it is Apache, it is not 
>> an Asterisk Gateway Interface (AGI) executable.

On Fri, 20 Nov 2009, mickael ropars wrote:

> the script is launch by a web page so it's a AGI executable

No. If script1 is launched by a web page, it's a CGI (Common Gateway 
Interface). So you cannot use any AGI commands in script1. You can, 
however, use AMI.

> if it was your case which implementation will you choose ?

I don't have a lot of experience with AMI, and I have a very limited 
understanding of your environment, so I can't give an opinion with much 
confidence.

Is AMI able and stable in setting the number of parameters you need? 
You'll have to test this yourself.

I've written AGI's that set hundreds of channel variables so I know this 
will not be a limitation in Asterisk.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list