Dear Tony,<br>
<br>
Thank you very much for your suggestion.<br>
The thing is that ${DIALSTATUS} returns ANSWER regardless of whether the called party hangs up or not. <br>
For instance, when called party is being asked by Asterisk whether he/she wants to pick the call, ${DIALSTATUS} returns ANSWER. <br>
<br>
In the case where the called party accepts to take the call and then
hangs up after finishing the conversion, I want to stop AGI from
jumping to call the next number. On the other hand, if the called
party decides not to take the call, I want to let AGI to jump to the
next number.<br>
<br>
It seems like ${DIALSTATUS} does not give me the info that I need.<br>
<br>
Thank you very much. Is there any other ways you may think of?<br>
<br>
Thanks,<br>
Pete<br>
<br><br><div class="gmail_quote">On Wed, Apr 2, 2008 at 3:03 PM, Pete Kay <<a href="mailto:petedao@gmail.com">petedao@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br> <br>I have a problem with DIAL. <br>The scenario is this: <br> <br>1. Asterisk will dial a number in a call list<br>2.
called party picks up the call and hears a prompt asking if they want
to pick up ( this is done through M(marco) option in DIAL)<br>
3. if called party does not want to pick up, go to the next number (this is done through SET MARCO_RESULT= CONTINUE)<br>4.
if called party decides to take the call, make some conversion, then
the call is completed and hanged up by the called party. <br>
<br>For 4, when the called party hangs up, I want to hang up on the calling party as well. <br> <br>This
works if I use the dialplan by not including the "g" option in DIAL.
However, when I do the DIAL in AGI, the calling party does not get
hangup automatically at (4). So, it continues to execute the next line
in the AGI, which is not what I want. <br>
<br>The problem is that
the result I can when executing the DIAL command within AGI does not
tell me whether the call was picked up or not. So, I have no way of
knowing whether to continue executing the AGI program or to issue a
HAGNGUP explicitly. <br>
<br>Can anyone please help me ?<br> <br>Any suggestion will be greatly appreciated.<br> <br>Thanks,<br><font color="#888888">Pete
</font><br>_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br><br><div class="gmail_quote">On Wed, Apr 2, 2008 at 4:39 PM, Tony Mountifield <<a href="mailto:tony@softins.clara.co.uk">tony@softins.clara.co.uk</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In article <<a href="mailto:7aa8bd9d0804020003r6f9b9417v87fa93209d883166@mail.gmail.com">7aa8bd9d0804020003r6f9b9417v87fa93209d883166@mail.gmail.com</a>>,<br>
<div><div></div><div class="Wj3C7c">Pete Kay <<a href="mailto:petedao@gmail.com">petedao@gmail.com</a>> wrote:<br>
> I have a problem with DIAL.<br>
> The scenario is this:<br>
><br>
> 1. Asterisk will dial a number in a call list<br>
> 2. called party picks up the call and hears a prompt asking if they want to<br>
> pick up ( this is done through M(marco) option in DIAL)<br>
> 3. if called party does not want to pick up, go to the next number (this is<br>
> done through SET MARCO_RESULT= CONTINUE)<br>
> 4. if called party decides to take the call, make some conversion, then the<br>
> call is completed and hanged up by the called party.<br>
><br>
> For 4, when the called party hangs up, I want to hang up on the calling<br>
> party as well.<br>
><br>
> This works if I use the dialplan by not including the "g" option in DIAL.<br>
> However, when I do the DIAL in AGI, the calling party does not get hangup<br>
> automatically at (4). So, it continues to execute the next line in the AGI,<br>
> which is not what I want.<br>
><br>
> The problem is that the result I can when executing the DIAL command within<br>
> AGI does not tell me whether the call was picked up or not. So, I have no<br>
> way of knowing whether to continue executing the AGI program or to issue a<br>
> HAGNGUP explicitly.<br>
<br>
</div></div>When you have returned from the Dial command, check the DIALSTATUS channel<br>
variable. If the call was picked up, ${DIALSTATUS} will contain ANSWER.<br>
<br>
Cheers<br>
Tony<br>
--<br>
Tony Mountifield<br>
Work: <a href="mailto:tony@softins.co.uk">tony@softins.co.uk</a> - <a href="http://www.softins.co.uk" target="_blank">http://www.softins.co.uk</a><br>
Play: <a href="mailto:tony@mountifield.org">tony@mountifield.org</a> - <a href="http://tony.mountifield.org" target="_blank">http://tony.mountifield.org</a><br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br>