<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
Unfortunately, I wish I had a simple queue to share but my
implementation is quite complex due to how I control the call on a
per-operation basis. If you choose this route then perhaps you
can use store your channel/queue name(s) within simple storage
elements such as a stack, array, or even a hashtable (although the
last may not be ideal for retrieving calls in order) and then use
AMI to control the calls from there. Sorry I can't be more
helpful in providing you an example.<br>
<br>
I imagine Asterisk queue's work though, so perhaps it might be
worth your while to pursue that approach a bit more (unfortunately
I've never tried them, so I can't tell you how it's done!). That
being said, perhaps getting Asterisk Queue's going will require a
more step-by-step approach to figure out why it's not working for
you. Here are my suggestions:<br>
<br>
Have you tried the exact dialplans in the examples within <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue"
_djrealurl="http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue">http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue</a>
? i.e.: Have you been able to get Asterisk queue's working
without AMI? If not, that might be where to start and then add
AMI in afterward..<br>
<br>
Another suggestion I have is to use the QueueAdd AMI command,
rather then calling Queue within your dialplan. If you have
success on doing something like an Answer/Playback via AMI, then
you will probably have no issues with the QueueAdd AMI command.
Please try that and maybe you'll have more luck. Here's the API
reference:
<a class="moz-txt-link-freetext" href="http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+QueueAdd">http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+QueueAdd</a><br>
<br>
Hope this helps & good luck,<br>
<br>
Daniel<br>
<br>
<br>
On 11/22/2016 10:35 AM, Salvatore Franco wrote:<br>
</div>
<blockquote
cite="mid:OH1VAX$94F64C4506FD1FAE9471144FCF266EF9@fast-auto.it"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8">
<div><br>
Hi,<br>
Thanks for your suggestions. <br>
The comma was an error in my email, not in my dialplan.<br>
Even if i use Answer command before Queue i received the same
error back, so i think the best way is to have my own queue.<br>
Have you got any example of how to implement a simple queue that
use the "fewestcalls" strategy?<br>
<br>
Best Regards<br>
<br>
Salvatore <br>
<br>
<br>
<div>
<hr></div>
<br>
<div><span>Da</span><span>:
<a class="moz-txt-link-abbreviated" href="mailto:asterisk-dev-bounces@lists.digium.com">asterisk-dev-bounces@lists.digium.com</a></span></div>
<div><span>A</span><span>: "Asterisk Developers Mailing List"
<a class="moz-txt-link-abbreviated" href="mailto:asterisk-dev@lists.digium.com">asterisk-dev@lists.digium.com</a></span></div>
<div><span>Cc</span><span>: </span></div>
<div><span>Data</span><span>: Tue, 22 Nov 2016 10:04:58 -0500</span></div>
<div><span>Oggetto</span><span>: Re: [asterisk-dev] AGI:async</span></div>
<br>
<div class="moz-cite-prefix">Hi Salvatore,<br>
<br>
I don't have any experience with the "Queue" command, as I
basically pass the call directly to agi:async and control the
call every step of the way from my C program (where I've
implemented my own queue/call tracking).<br>
<br>
However, here are my suggestions:<br>
<br>
1) Upon taking a quick look at <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue"
_djrealurl="http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue">http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue</a>,
I think your "failed to add agi command to channel.." error
may be since the call is not answered yet. You'll notice on
that web page that the dial plan calls "Answer" before Queue
in example 1, and Playback (which itself internally answers
the call to be able to then play the announcement) before
Queue in example 3 (I'm skipping example 2, as it's a link to
a German site and not directly on the page). Please try one
of those commands, before calling your Queue command, and I
think you'll get better results.<br>
<br>
2) You are correct that AGI(agi:async) stops execution of the
dialplan. In your attempt to execute AGI(agi:async) before
Queue, that's exactly what happened. The call entered
agi:async mode and from that point on you are supposed to
issue commands to control the call from your AGI program.<br>
<br>
That's probably the reason you don't hear ringing on the
phone, as (in your AGI call on priority 1 example) your
inbound call never reached the "Queue" dialplan priority.<br>
<br>
3) This is a minor detail, but I'm not sure your syntax is
correct. Try removing the comma before the "n", so that you
have the following in your dial plan: "same =>
n,AGI(agi:async)"<br>
<br>
Hope this helps,<br>
<br>
Daniel<br>
<br>
<br>
<br>
On 11/22/2016 05:03 AM, Salvatore Franco wrote:<br>
</div>
<blockquote
cite="mid:OH1FYH$E0E0D9B067EFB835A9435710DECDA23D@fast-auto.it"
type="cite">
<div>Hi, <br>
I'm trying to answer a call that is in Queue through AMI,
launching AGI command ANSWER.<br>
I read about putting AGI(agi:async) in extensions.conf
dialplan but if i set in this order:<br>
<br>
exten=> 1000,1,Queue(queuename)<br>
same=> ,n,AGI(agi:async)<br>
<br>
and try to answer using AMI the response is : failed to add
agi command to channel XXX queue.<br>
<br>
Else if i set the dial plan in this order:<br>
<br>
<br>
exten=>1000,1,AGI(agi:async)<br>
same=> ,n,Queue(queuename)<br>
<br>
the phone doesn't ring and the command execute successful,
but nothing happens. Isn't agi:async "really" async but
stops execution of the dialplan?<br>
<br>
Any suggestions?<br>
<br>
<br>
Thanks<br>
<br>
Best Regards <br>
<br>
<p class="MsoNormal"><b><span>Salvatore Franco</span></b><span></span></p>
<p class="MsoNormal"><br>
</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Daniel McFarlane
Szeto Technologies Inc.
885 Ellingham Ave
Pointe Claire, Québec
Canada, H9R 5E8
tel: (514) 630-7878
fax: (514) 630-6394
<a class="moz-txt-link-freetext" href="http://www.szeto.ca">http://www.szeto.ca</a>
</pre>
</body>
</html>