I've written an advanced AGI script to ask the callers questions and verify them etc, before putting them through to our call center. I want to use a queue, but I cant work out how to send a user to a queue from phpagi
Any help would be greatly appreciated.
Thanks
Ben
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I set it so that the AGI now does $agi->exec("Queue", "1"); and it puts the call into the queue… none of the phones in the queue ring (on ring all, and works if I dial direct to the queues inbound route)…and in hte log it looks like its in a continuos loop.
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Goto (from-queue,h,1)
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Executing Set("Local/001@from-queue-29e7;2", "QAGENT=h") in new stack
- Goto (from-queue,h,1)
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Goto (from-queue,h,1)
- Goto (from-queue,h,1)
- Executing Set("Local/001@from-queue-29e7;2", "QAGENT=h") in new stack
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Goto (from-queue,h,1)
- Goto (from-queue,h,1)
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Executing Set("Local/001@from-queue-29e7;2", "QAGENT=h") in new stack
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
What am I doing wrong :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You might want to ask on the Asterisk mailing list.
Without seeing more of your configuration I can only guess - one thing that comes to mind is this note on the Queue page I cited earlier:
"Transfers of calls that are answered out of a queue must be done using Asterisk '#' transfers (enabled with the 't' option above). SIP transfers result in the Agent remaining affiliated with the call until its eventual termination, preventing that agent from being offered another call."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've written an advanced AGI script to ask the callers questions and verify them etc, before putting them through to our call center. I want to use a queue, but I cant work out how to send a user to a queue from phpagi
Any help would be greatly appreciated.
Thanks
Ben
What have you tried so far?
Using the phpagi exec() call to execute the Queue application should do the trick, ie: $agi->exec("Queue",$options);
a million and one things, what do I put in the options?
Im finding it hard to find any documentation on it
Check out http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue.
A fuller list of Asterisk commands are also available from http://www.voip-info.org/wiki/view/Asterisk+-+documentation+of+application+commands
OK, I set it so that the AGI now does $agi->exec("Queue", "1"); and it puts the call into the queue… none of the phones in the queue ring (on ring all, and works if I dial direct to the queues inbound route)…and in hte log it looks like its in a continuos loop.
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Goto (from-queue,h,1)
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Executing Set("Local/001@from-queue-29e7;2", "QAGENT=h") in new stack
- Goto (from-queue,h,1)
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Goto (from-queue,h,1)
- Goto (from-queue,h,1)
- Executing Set("Local/001@from-queue-29e7;2", "QAGENT=h") in new stack
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Goto (from-queue,h,1)
- Goto (from-queue,h,1)
- Executing Set("Local/1234@from-queue-c2fe;2", "QAGENT=h") in new stack
- Executing Set("Local/001@from-queue-29e7;2", "QAGENT=h") in new stack
- Executing Goto("Local/1234@from-queue-c2fe;2", ",1") in new stack
- Executing Goto("Local/001@from-queue-29e7;2", ",1") in new stack
What am I doing wrong :(
You might want to ask on the Asterisk mailing list.
Without seeing more of your configuration I can only guess - one thing that comes to mind is this note on the Queue page I cited earlier:
"Transfers of calls that are answered out of a queue must be done using Asterisk '#' transfers (enabled with the 't' option above). SIP transfers result in the Agent remaining affiliated with the call until its eventual termination, preventing that agent from being offered another call."
I see the solution here I think:
http://groups.google.com/group/adhearsion/browse_thread/thread/1a4157e2382051cb
But not sure how/what to set in phpagi?
$agi->set_var("foo","bar");
the api docs are here: http://phpagi.sourceforge.net/phpagi2/docs/
I know i'm being a nightmare - but I have no idea what to set it to to stop the looping :/