<div dir="ltr">Thanks, Anthony.<div><br></div><div>I added both 'g' and 'F' options. Now, when the caller hangs-up, my cleanup code is run by both the caller channel and the peer channel, but I only want the caller channel to do that.</div><div><br></div><div>Also, when the peer hangs-up, there is no execution of the priorities following the Dial.</div><div><br></div><div>Finally, is there a way to reset all globals, maybe as a variant of "dialplan reload"?<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 5, 2018 at 1:21 AM, Antony Stone <span dir="ltr"><<a href="mailto:Antony.Stone@asterisk.open.source.it" target="_blank">Antony.Stone@asterisk.open.source.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tuesday 05 June 2018 at 08:33:26, David P wrote:<br>
<br>
> We're using Asterisk 14.7.6 and I have a dialplan that ends like this:<br>
> <br>
> same => n,Dial(SIP/${EXTEN:0:4}@peer1)<br>
> same => n,Set(GLOBAL(EpochAtCallEnd)=$<wbr>{EPOCH})<br>
> same => n,Hangup()<br>
> <br>
> When peer1 hangsup, the priorities after the Dial are executed fine. But<br>
> when the caller hangsup during the Dial, the cleanup steps aren't done.<br>
> Why?<br>
> <br>
> I did read "Note that on a successful connection, in the absence of the g<br>
> and G modifiers (below), the Dial command does not return to allow<br>
> execution of further commands for that extension in that context." at<br>
> <a href="https://www.voip-info.org/asterisk-cmd-dial/" rel="noreferrer" target="_blank">https://www.voip-info.org/<wbr>asterisk-cmd-dial/</a> But it seems not to apply<br>
> because I'm seeing the 'g' behavior without specifying that option, and the<br>
> 'G' option seems intended for a far more complicated scenario.<br>
<br>
</span>If you're getting "g" functionality without specifying it, congratulations.<br>
<br>
If you want something similar when the callER hangs up, you want to use the F <br>
option.<br>
<br>
Regards,<br>
<br>
<br>
Antony.</blockquote></div></div></div></div>