我为传入上下文配置了一个Dialplan。
我在 /etc/asterisk/extensions.conf
中有以下内容[incoming]
switch => Realtime
exten => _X.,1,NoOp(Incoming Call Received)
exten => _X.,n,Festival(Welcome to Asterisk)
exten => _X.,n,Answer()
;call-answer.php will be called when Member Connected to Queue
exten => _X.,n,Queue(my_queue,t,,,1000,call-answer.php)
exten => _X.,n,Hangup()
我想获得拥有ANSWERED队列的来电者信息,并获得有关扩展ID等的被叫队列成员信息....
拨打-answer.php
#!/usr/bin/env php
<?php
set_time_limit(60);
error_reporting(0);
ini_set('display_errors', 0);
require_once ('phpagi.php');
$agi = new AGI();
$agi->verbose("AGI Started after ANSWERED QUEUE",3);
$src_extension = $agi->request['agi_callerid'];
$dst_extension = $agi->request['agi_extension'];
// I want to get CALL ANSWERED QUEUE MEMBER EXTENSION NUMBER HERE.
?>
答案 0 :(得分:0)
这一行有错误(没有优先权)
exten => _X.,Festival(Welcome to Asterisk)
您可以获取有关谁在QueueLog中回答的信息,不需要agi。
http://www.voip-info.org/wiki/view/Asterisk+log+queue_log
同样功能CHANNEL(名称)肯定会在宏或其他方面(来电者)显示代理。如果它返回来电频道,您可以通过读取变量BRIDGEDPEER获得其他频道。
您可以按问题获取所有变量列表
$agi->exec("Dumpchan","");