Calling PHPAGI script from PHPAGI script

Hello Guys, :unamused: :question:

I have two AGI script written in PHP. I want to call one PHPAGI script from other PHPAGI script .
Please could you help me on, How to call PHPAGI script from PHPAGI script.

Maybe you can just do it like this in your script1:

see uk3.php.net/manual/en/function.exec.php

Yes, but this ‘exec()’ function can used to execute only simple PHP scripts. The script which i have is specifically for Asterisk Gateway Interface(AGI), It needs to be handle in different context than normal PHP script.

I can call PHPAGI script from “extension.conf” file of asterisk server as bellow.

But i want to call PHPAGI script from other PHPAGI script.

Anyway Thanks for your Reply :smiley:

Not really sure what scenario you would need that. Can probably find a different solution if you can provide examples.

If you look at phpAGI site. There’s a function called “exec_agi()” so that might work.
http://phpagi.sourceforge.net/phpagi22/api-docs/phpAGI/AGI.html#exec_agi

Hi,
I myself am looking for an answer for similar problem. The issue for me is, the second script is losing connection to the Speech recognition. I have to keep the ASR intact while going to the second PHPAGI