Call to a queue in PHPAGI

Hi.
I have a queue (402) and a php script that i want to call to that queue with agi in that script.
I tried this 3 ways:

  1. $agi->exec(‘Goto’,“ext-queues,402,1”);
  2. $agi->exec(‘Transfer’,“402”);
  3. $agi->exec(‘Queue’,“402”);

but none of them is working. what can I do? (when I use $agi->exec(‘Queue’,“402”); it just loop between agents but the agents phone dose not ring)

You should show the actual output of the attempt to either do the Goto, or execute Queue. They should both work, assuming in the Goto case it is going to the correct location.

but the GOTO is going to the correct location

I don’t believe the GoTo will have any effect until the AGI script terminates, and I’d suggest that a GoTo in an AGI script will make it difficult for someone to understand the design in future.

so what is your suggestion?

My suggestion would be to do it in dialplan, rather than AGI. If you have to use AGI, have it set variables to control the dialplan.

I have to have an AGI file and inside it in one step I have to transfer my call to the queue.
now how i can manage it with dialplan?