如何将一个 AGI 文件包含在另一个 AGI 文件中?
是否可以将一个 AGI 文件包含在另一个文件中并从中调用函数,这些函数作为调用它的 AGI 文件的一部分执行?
如果是,如何将一个 AGI 包含在另一个 AGI 中?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一些示例代码会很有帮助,但我认为您会在 Asterisk::AGI 文档。
编辑:您可以使用
require
命令将 AGI 文件包含在其他 AGI 文件中,就像包含任何 Perl 文件一样。例如:如果您的脚本位于目录“
var/lib/asterisk/agi-bin/directoryname/
”中,请将此行放入您的 AGI 脚本中:
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: