I am having difficulty transferring a call to a queue through PHPAGI. I am using
$agi->exec('Queue',"1000");
But the call keeps looping and the static agents never ring. Eventually I have to then restart the Asterisk.
Any help would be appreciated.
I know we can do it through the dial plan, but the situation requires me to do it from the AGI script.
Thanks in advance.
And after days of trying different things, finally I have it working with below. Posting it here so that it may help others too.
Edit:
a better way of doing it is using the Goto application. I had tried it previously but call kept hanging up and the transfer never happened. Then I just commented the hangup from the code and it worked like a charm. For Goto application to work with the phpagi code that I have, I had to comment the hangup.
Following works perfect.