Asterisk AGI - Originate a call using php agi

拈花ヽ惹草 提交于 2019-12-07 05:31:40

问题


Is anybody knows , how we can Originate an external number call using PHP AGI script ?


回答1:


You have got two possible options. One is use the "Originate" command. See http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+Originate for an example.

The other one, which is what I favor in my solutions, since it does not require AMI, is using spooled call files. See https://wiki.asterisk.org/wiki/display/AST/Asterisk+Call+Files for how to do them. The trick, and I cannot stress it enough, is to create the spool file in /tmp and then "move" the file into the ../spool/asterisk/outgoing directory.

If you assign a unique channel variable key/value to the spooled call, you can then pick it up with your dial plan and route the call appropriately.



来源:https://stackoverflow.com/questions/14089687/asterisk-agi-originate-a-call-using-php-agi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!