tags:

views:

59

answers:

1

Hello,

Is it possible to include an AGI file in another one and call functions from it which execute as part of the AGI file it is being called from?

If yes, how to include one AGI in another?

Thank You.

+2  A: 

Some sample code would be helpful, but I think you'll find your answer in the Asterisk::AGI documentation.

EDIT: you can include AGI files in other AGI files just as you would include any Perl file, with the require command. e.g.:

If your script is in the directory "var/lib/asterisk/agi-bin/directoryname/"

put this line in your AGI script:

require '/var/lib/asterisk/agi-bin/directoryname/yourscriptname';
Ether
Thanks for the reply Ether. The documentation gives detaiuls of the various AGI functions, but it doesnt talk about including files . Any idea how that can be done ?
I've edited to add an example of the 'require' command; hopefully this is what you were looking for?
Ether
Thanks Ether, that was what i was looking for :)