Hi,<br>&nbsp;<br>I have a problem with DIAL.&nbsp; <br>The scenario is this: <br>&nbsp;<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>
&nbsp;<br>For 4, when the called party hangs up, I want to hang up on the calling party as well.&nbsp; <br>&nbsp;<br>This works if I use the dialplan by not including the &quot;g&quot; option in DIAL.&nbsp; However, when I do the DIAL in AGI, the calling party does not get hangup automatically at (4).&nbsp; So, it continues to execute the next line in the AGI, which is not what I want.&nbsp; <br>
&nbsp;<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.&nbsp; <br>
&nbsp;<br>Can anyone please help me ?<br>&nbsp;<br>Any suggestion will be greatly appreciated.<br>&nbsp;<br>Thanks,<br>Pete