Home >Backend Development >PHP Tutorial >Method to implement playback of employee number
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['data']; $member=substr($member,4); $agi->verbose($member); $agi->say_digits($member); ?>