Home  >  Article  >  Backend Development  >  Method to implement playback of employee number

Method to implement playback of employee number

巴扎黑
巴扎黑Original
2016-11-29 10:30:101325browse

Set setinterfacevar=yes in queue.conf to enable the MEMBERINTERFACE variable;
Then call an agi script in extension.conf when calling queue
(with the parameter, Queue(myqueue|t|||10|agi://192.168.35.3 /hello.agi)
exten => _X., n, Queue(911|tT|||60|Predictive/sayinterface.agi)
In this way, you can use getVariable("MEMBERINTERFACE") in agi to get the connected one queue member name

<?php
include (dirname(__FILE__)."/phpagi_2_14/phpagi.php");
include (dirname(__FILE__)."/phpagi_2_14/phpagi-asmanager.php");
$agi=new AGI();
$temp=$agi->get_variable("MEMBERINTERFACE");
$member=$temp[&#39;data&#39;];
$member=substr($member,4);
$agi->verbose($member);
$agi->say_digits($member);
?>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn