可以利用.Call 创建文件主动发起,接通后指定到会议中。也可以用包装好的AGI发起。
参考:http://www.asterisk-help.com/read.php?tid-1314.html
连接phpagi 参考:http://www.asterisk-help.com/read.php?tid-293.html 
      打开phpagi 文件中的 phpagi-asmanager.php 可以看到有这么一个函数 
- function Originate($channel, 
- $exten=NULL, $context=NULL, $priority=NULL, 
- $application=NULL, $data=NULL, 
- $timeout=NULL, $callerid=NULL, $variable=NULL, $account=NULL, $async=NULL, $actionid=NULL) 
- { 
这就是一个可以发起对某某通道的呼叫,以及参数的配置.当中还有其它很多函数,我们调用这些函数就可实现我们想要的。关于详细的说明见VOIP-INFO》》http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate,以下只做个简单呼叫分机的DEMO,其实足够!
本部分设定了隐藏,您已回复过了,以下是隐藏的内容
- include_once("phpagi-2.20/phpagi-asmanager.php"); 
- $asm=new AGI_AsteriskManager('phpagi.php'); 
- $res=$asm->connect(); 
- $channel='SIP/8001'; // Local/1000@from-internal 
- $context='hujiao'; 
- $exten='_X.'; 
- $priority='1'; 
- $callerid=8001; //主叫号 
- $timeout=30000; //呼叫30秒 
- $variable="sipexten=8002"; 
- $async=true; 
- $asm->Originate($channel,$exten,$context,$priority,"","",$timeout,$callerid,$variable,"",$async,""); 
- header("location: ./index.php"); 
- [hujiao] 
- exten => _X.,1,Dial(SIP/${sipexten},30) 
- exten => _X.,n,hangup() 
本文链接:https://kinber.cn/post/144.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝:

 支付宝微信扫一扫,打赏作者吧~
支付宝微信扫一扫,打赏作者吧~

 
        