Then what am I doing incorrectly? It&#39;s working except for the transfer to an extension in a different context and I&#39;m following the current documentation. <div><br></div><div>Thanks<br><div><br>On Wednesday, November 25, 2015, Brian West &lt;<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Transfer_on_fail doesn&#39;t work like your trying to use it!<span></span><br><br>On Wednesday, November 25, 2015, Gabriel Kuri &lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;gkuri@ieee.org&#39;);" target="_blank">gkuri@ieee.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>I understand that I can have multiple bridge statements after my initial bridge, however this is specifically for detecting when a device fell off the network and the registration hasn&#39;t timed out. We want the behavior to be different than if the device was still on the network and it just rang for some time period and timed out and moved on to the next bridge statement, which is why I need transfer_on_fail.<br><br></div><div>In regards to &quot;hangup_on_bridge&quot;, I figured out later that it doesn&#39;t exist. I pulled that straight out of the documentation for transfer_on_fail, as with everything I was trying initially.<br><br>     <a href="https://wiki.freeswitch.org/wiki/Variable_transfer_on_fail" target="_blank">https://wiki.freeswitch.org/wiki/Variable_transfer_on_fail</a><br></div><div><br><br>I think I figured out the problem, the condition for the transfer_on_fail wasn&#39;t being met with ${originate_disposition}, which is also straight out of the documentation for transfer_on_fail. It looks like the conditions get evaluated only at the beginning when the dialplan is called, not when that part of the dialplan gets hit? So at the time the dialplan is initially called, ${originate_disposition} isn&#39;t set and didn&#39;t match the Regex for it to pass the condition. I changed the condition to destination_number and it works now.<br></div><br></div>The only part I couldn&#39;t get working is transferring to a different context within transfer_on_fail, for example:<br><br>       &lt;action application=&quot;set&quot; data=&quot;transfer_on_fail=PROGRESS_TIMEOUT auto_cause xml error&quot;/&gt;<br><br></div>If I put the PROGRESS_TIMEOUT extension within the &quot;error&quot; context, it doesn&#39;t work. Not sure what&#39;s going on there, but it&#39;s not a big deal. It works fine like this ...<br><div><div><br>&lt;document type=&quot;freeswitch/xml&quot;&gt;<br>  &lt;section name=&quot;dialplan&quot; description=&quot;Dial Plan for FreeSWITCH&quot;&gt;<br>    &lt;context name=&quot;default&quot;&gt;<br>      &lt;extension name=&quot;call to 12225551212&quot;&gt;<br>        &lt;condition field=&quot;destination_number&quot; expression=&quot;12225551212&quot;&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;bypass_media=true&quot;/&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;hangup_on_bridge=true&quot;/&gt;<br>      &lt;action application=&quot;export&quot; data=&quot;leg_progress_timeout=3&quot;/&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;transfer_on_fail=PROGRESS_TIMEOUT auto_cause xml&quot;/&gt;<br>          &lt;action application=&quot;bridge&quot; data=&quot;${sofia_contact(12225551212@switch.local)&quot;/&gt;<br>        &lt;/condition&gt;<br>      &lt;/extension&gt;<br>      &lt;extension name=&quot;PROGRESS_TIMEOUT&quot;&gt;<br>        &lt;condition field=&quot;destination_number&quot; expression=&quot;12225551212&quot; continue=&quot;false&quot; break=&quot;on-true&quot;&gt;<br>          &lt;action application=&quot;bridge&quot; data=&quot;sofia/external/<a href="tel:12345551212" value="+12345551212" target="_blank">12345551212</a>@switch2.local&quot;/&gt;<br>        &lt;/condition&gt;<br>      &lt;/extension&gt;<br>    &lt;/context&gt;<br>  &lt;/section&gt;<br>&lt;/document&gt;<br><br><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 25, 2015 at 3:07 PM, Brian West <span dir="ltr">&lt;<a>brian@freeswitch.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">And for those wondering:<div><br></div><div>







<p><span>&lt;</span><span>extension</span><span> </span><span>name</span><span>=</span><span>&quot;call to 1234&quot;</span><span>&gt;</span></p>
<p><span>  &lt;</span><span>condition</span><span> </span><span>field</span><span>=</span><span>&quot;destination_number&quot;</span><span> </span><span>expression</span><span>=</span><span>&quot;^(1234)$&quot;</span><span>&gt;</span></p>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;orig_dest=$1&quot;</span><span>/&gt;</span></p><span>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;bypass_media=true&quot;</span><span>/&gt;</span></p>
</span><p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;hangup_afer_bridge=true&quot;</span><span>/&gt;</span></p>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;transfer_on_fail=PROGRESS_TIMEOUT,USER_BUSY,NORMAL_TEMPORARY_FAILURE&quot;</span><span>/&gt;</span></p>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;bridge&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;{progress_timeout=2}sofia/external/<a>sip:1234@192.168.1.123</a>&quot;</span><span>/&gt;</span></p>
<p><span>  &lt;/</span><span>condition</span><span>&gt;</span></p>
<p><span>&lt;/</span><span>extension</span><span>&gt;</span></p>
<p><span></span><br></p>
<p><span>&lt;</span><span><b>extension</b></span><span> </span><span>name</span><span>=</span><span>&quot;call to 1234&quot;</span><span>&gt;</span></p>
<p><span>  &lt;</span><span>condition</span><span> </span><span>field</span><span>=</span><span>&quot;destination_number&quot;</span><span> </span><span>expression</span><span>=</span><span>&quot;^PROGRESS_TIMEOUT$&quot;</span><span>&gt;</span></p>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;log&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;CRIT We can have progress timeouts?&quot;</span><span>/&gt;</span></p>
<p><span>  &lt;/</span><span>condition</span><span>&gt;</span></p>
<p><span>&lt;/</span><span>extension</span><span>&gt;</span></p><p><span><br></span></p><p><span><br></span></p><p><span>See XML on <a href="https://freeswitch.org/jira/browse/FS-3193" target="_blank">https://freeswitch.org/jira/browse/FS-3193</a></span></p><p><span><br></span></p><p><span>I fear this isn&#39;t documented correctly.</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 25, 2015 at 4:53 PM, Brian West <span dir="ltr">&lt;<a>brian@freeswitch.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There is no such thing as hangup_on_bridge, and if you wish to try a different gateway if the first one doesn&#39;t respond quick enough with progress do this:<div><br></div><div>







<p><span>&lt;</span><span>extension</span><span> </span><span>name</span><span>=</span><span>&quot;call to 1234&quot;</span><span>&gt;</span></p>
<p><span>  &lt;</span><span>condition</span><span> </span><span>field</span><span>=</span><span>&quot;destination_number&quot;</span><span> </span><span>expression</span><span>=</span><span>&quot;^1234$&quot;</span><span>&gt;</span></p><span><span>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;bypass_media=true&quot;</span><span>/&gt;</span></p>
</span></span><p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;hangup_after_bridge=true&quot;</span><span>/&gt;</span></p>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;bridge&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;{progress_timeout=2}sofia/internal/<a>sip:1234@switch2-asdfa.com</a>&quot;</span><span>/&gt;</span></p>
<p><span>    &lt;</span><span>action</span><span> </span><span>application</span><span>=</span><span>&quot;bridge&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;{progress_timeout=10}sofia/internal/<a>sip:1234@switch1-asdfa.com</a>&quot;</span><span>/&gt;</span></p>
<p><span>  &lt;/</span><span>condition</span><span>&gt;</span></p>
<p><span>&lt;/</span><span>extension</span><span>&gt;</span></p><p><span><br></span></p><p><span>There is no reason to do what you were doing in this case.</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div><div><div>On Wed, Nov 25, 2015 at 12:42 PM, Gabriel Kuri <span dir="ltr">&lt;<a>gkuri@ieee.org</a>&gt;</span> wrote:<br></div></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div><div><div dir="ltr"><div><div>I can&#39;t seem to get transfer_on_fail to work. I&#39;m not sure what I&#39;m doing wrong, it just doesn&#39;t transfer to the transfer_on_fail extension. The dialplan is below.<br><br></div>The idea is to set leg_progress_timeout = 3, so that if the device isn&#39;t responding to INVITEs, we use transfer_on_fail with the cause PROGRESS_TIMEOUT to send the call somewhere else. But transfer_on_fail never seems to get executed when we test it out. The FS logs show that we&#39;re hitting PROGRESS_TIMEOUT when the device doesn&#39;t respond to INVITEs, so I&#39;m pretty sure we have the right hangup cause, but it&#39;s just not catching transfer_on_fail ...<br></div><div><div><br>&lt;document type=&quot;freeswitch/xml&quot;&gt;<br>  &lt;section name=&quot;dialplan&quot; description=&quot;Dial Plan for FreeSWITCH&quot;&gt;<br>    &lt;context name=&quot;default&quot;&gt;<br>      &lt;extension name=&quot;call to 12225551212&quot;&gt;<br>        &lt;condition field=&quot;destination_number&quot; expression=&quot;12225551212&quot;&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;bypass_media=true&quot;/&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;hangup_on_bridge=true&quot;/&gt;<br>      &lt;action application=&quot;export&quot; data=&quot;leg_progress_timeout=3&quot;/&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;transfer_on_fail=PROGRESS_TIMEOUT NETWORK_UNAVAIL xml error&quot;/&gt;<br>          &lt;action application=&quot;bridge&quot; data=&quot;${sofia_contact(12225551212@switch.local)&quot;/&gt;<br>        &lt;/condition&gt;<br>      &lt;/extension&gt;<br>    &lt;/context&gt;<br>    &lt;context name=&quot;error&quot;&gt;<br>      &lt;extension name=&quot;NETWORK_UNAVAIL&quot;&gt;<br>        &lt;condition field=&quot;${originate_disposition}&quot; expression=&quot;PROGRESS_TIMEOUT&quot; continue=&quot;false&quot; break=&quot;on-true&quot;&gt;<br>          &lt;action application=&quot;bridge&quot; data=&quot;sofia/external/<a href="tel:12345551212" value="+12345551212" target="_blank">12345551212</a>@switch2.local&quot;/&gt;<br>        &lt;/condition&gt;<br>      &lt;/extension&gt;<br>    &lt;/context&gt;<br>  &lt;/section&gt;<br>&lt;/document&gt;<br><br></div><div>Here&#39;s a small snippet of the logs when leg_progress_timeout expires ...<br><br>b54a79cd-85f1-4c15-929d-15b1654ff1de 2015-11-24 22:06:21.021538 [DEBUG] switch_ivr_originate.c:3727 Originate Resulted in Error Cause: 607 [PROGRESS_TIMEOUT]<br>b54a79cd-85f1-4c15-929d-15b1654ff1de 2015-11-24 22:06:21.021538 [INFO] mod_dptools.c:3333 Originate Failed.  Cause: PROGRESS_TIMEOUT<br><br><br></div><div>Thanks ...<br></div><div><br><br></div></div></div>
<br></div></div></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">







<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a>brian@freeswitch.org</a></span></font></p>
<p><font face="courier new, monospace" size="1"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font face="monospace, monospace" size="2"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p><p><font face="monospace, monospace">Got Bugs? Report them <a href="https://freeswitch.org/jira" target="_blank">here</a>! | Reddit: <a href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
<p><font face="monospace, monospace" size="2"><b>T:</b><a href="tel:%2B19184209001" value="+19184209001" target="_blank">+19184209001</a> | <b>F:</b><a href="tel:%2B19184209002" value="+19184209002" target="_blank">+19184209002</a> | <b>M:</b>+1918424WEST (9378)<br><b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</font></p></div></div></div></div></div></div></div></div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">







<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a>brian@freeswitch.org</a></span></font></p>
<p><font face="courier new, monospace" size="1"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font face="monospace, monospace" size="2"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p><p><font face="monospace, monospace">Got Bugs? Report them <a href="https://freeswitch.org/jira" target="_blank">here</a>! | Reddit: <a href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
<p><font face="monospace, monospace" size="2"><b>T:</b><a href="tel:%2B19184209001" value="+19184209001" target="_blank">+19184209001</a> | <b>F:</b><a href="tel:%2B19184209002" value="+19184209002" target="_blank">+19184209002</a> | <b>M:</b>+1918424WEST (9378)<br><b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</font></p></div></div></div></div></div></div></div></div></div></div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a>consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a>FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
</blockquote><br><br>-- <br><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">







<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;brian@freeswitch.org&#39;);" target="_blank">brian@freeswitch.org</a></span></font></p>
<p><font size="1" face="courier new, monospace"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font size="2" face="monospace, monospace"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p><p><font face="monospace, monospace">Got Bugs? Report them <a href="https://freeswitch.org/jira" target="_blank">here</a>! | Reddit: <a href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
<p><font size="2" face="monospace, monospace"><b>T:</b>+19184209001 | <b>F:</b>+19184209002 | <b>M:</b>+1918424WEST (9378)<br><b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</font></p></div></div></div></div></div></div></div></div></div><br>
</blockquote></div></div>