<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 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 class="moz-txt-link-freetext" href="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">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8">
<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>
</body>
</html>