<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>freeswitch@internal&gt; version<br/>
FreeSWITCH Version 1.5.15b+git~20150218T214505Z~5febdbbc08~64bit (git 5febdbb 2015-02-18 21:45:05Z 64bit)</div>

<div>&nbsp;</div>

<div>I&#39;m also getting the same results with stable branch</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, February 19, 2015 at 11:38 PM<br/>
<b>From:</b>&nbsp;&quot;Brian West&quot; &lt;brian@freeswitch.org&gt;<br/>
<b>To:</b>&nbsp;&quot;FreeSWITCH Users Help&quot; &lt;freeswitch-users@lists.freeswitch.org&gt;, &quot;FreeSWITCH Docs Team&quot; &lt;Freeswitch-docs@lists.freeswitch.org&gt;<br/>
<b>Subject:</b>&nbsp;Re: [Freeswitch-users] piped failover doesn&#39;t work in dialplan, but works from console</div>

<div name="quoted-content">
<div>
<p><span>freeswitch@internal&gt; originate {fail_on_single_reject=CALL_REJECTED:NO_ANSWER}error/NO_ANSWER&#124;error/USER_BUSY&#124;error/CALL_REJECTED 999</span></p>

<p><span>-ERR NO_ANSWER</span></p>

<p>&nbsp;</p>

<p><span>2015-02-19 15:35:39.032653 [DEBUG] switch_ivr_originate.c:2100 Parsing global variables</span></p>

<p><span>2015-02-19 15:35:39.032653 [DEBUG] switch_event.c:1688 Parsing variable [fail_on_single_reject]=[CALL_REJECTED:NO_ANSWER]</span></p>

<p>&nbsp;</p>

<p><span>2015-02-19 15:35:39.032653 [NOTICE] switch_ivr_originate.c:2732 Cannot create outgoing channel of type [error] cause: [NO_ANSWER]</span></p>

<p>&nbsp;</p>

<p><span>What code are you running?</span></p>
</div>

<div class="gmail_extra">&nbsp;
<div class="gmail_quote">On Thu, Feb 19, 2015 at 2:35 PM, Mi Ke <span>&lt;<a href="mi.ke@null.net" target="_parent">mi.ke@null.net</a>&gt;</span> wrote:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>Hello Brian,</div>

<div>&nbsp;</div>

<div>Thank you for your response.</div>

<div>&nbsp;</div>

<div>The idea was taken here: <a href="https://wiki.freeswitch.org/wiki/Variable_fail_on_single_reject" target="_blank">https://wiki.freeswitch.org/wiki/Variable_fail_on_single_reject</a></div>

<div>&nbsp;</div>

<div>Commas in the list are not working either, even in console (where colons do):</div>

<div>&nbsp;</div>

<div>
<div>freeswitch@internal&gt; originate {fail_on_single_reject=CALL_REJECTED,NO_ANSWER}error/NO_ANSWER&#124;error/USER_BUSY&#124;error/CALL_REJECTED 999 &lt;---- should be no_answer<br/>
-ERR CALL_REJECTED</div>

<div>2015-02-19 20:29:34.377089 [DEBUG] switch_ivr_originate.c:2100 Parsing global variables<br/>
2015-02-19 20:29:34.377089 [DEBUG] switch_event.c:1688 Parsing variable [fail_on_single_reject]=[CALL_REJECTED]<br/>
2015-02-19 20:29:34.377089 [NOTICE] switch_ivr_originate.c:2732 Cannot create outgoing channel of type [error] cause: [NO_ANSWER]<br/>
2015-02-19 20:29:34.377089 [DEBUG] switch_ivr_originate.c:3720 Originate Resulted in Error Cause: 19 [NO_ANSWER]<br/>
2015-02-19 20:29:34.377089 [NOTICE] switch_ivr_originate.c:2732 Cannot create outgoing channel of type [error] cause: [USER_BUSY]<br/>
2015-02-19 20:29:34.377089 [DEBUG] switch_ivr_originate.c:3720 Originate Resulted in Error Cause: 17 [USER_BUSY]<br/>
2015-02-19 20:29:34.377089 [NOTICE] switch_ivr_originate.c:2732 Cannot create outgoing channel of type [error] cause: [CALL_REJECTED]</div>

<div>&nbsp;
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b>&nbsp;Thursday, February 19, 2015 at 10:00 PM<br/>
<b>From:</b>&nbsp;&quot;Brian West&quot; &lt;<a href="brian@freeswitch.org" target="_parent">brian@freeswitch.org</a>&gt;<br/>
<b>To:</b>&nbsp;&quot;FreeSWITCH Users Help&quot; &lt;<a href="freeswitch-users@lists.freeswitch.org" target="_parent">freeswitch-users@lists.freeswitch.org</a>&gt;<br/>
<b>Subject:</b>&nbsp;Re: [Freeswitch-users] piped failover doesn&#39;t work in dialplan, but works from console</div>

<div>
<div class="h5">
<div>
<div>
<p><span>originate {fail_on_single_reject=&#39;CALL_REJECTED&#92;,NO_ANSWER&#39;}error/NO_ANSWER&#124;error/USER_BUSY&#124;error/CALL_REJECTED 999</span></p>

<p>&nbsp;</p>

<p><span>Where are you getting the idea you can use a colon to separate the causes?</span></p>

<p>&nbsp;</p>

<p><span>&nbsp; &nbsp; </span><span>/* When using the AND operator, the </span><span>fail_on_single_reject</span><span> flag may be set in order to indicate that a single &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></p>

<p><span>&nbsp;&nbsp; &nbsp; &nbsp; rejections should terminate the attempt rather than a timeout, answer, or rejection by all. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></p>

<p><span>&nbsp;&nbsp; &nbsp; &nbsp; If the value is set to &#39;true&#39; any fail cause will end the attempt otherwise it can contain a comma (,) separated&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></p>

<p><span>&nbsp;&nbsp; &nbsp; &nbsp; list of cause names which should be considered fatal&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></p>

<p>&nbsp;</p>

<p><span>&nbsp; &nbsp; &nbsp;*/</span><span>&nbsp;</span></p>

<p>&nbsp;</p>

<p>&nbsp;</p>
</div>

<div class="gmail_extra">&nbsp;
<div class="gmail_quote">On Thu, Feb 19, 2015 at 10:38 AM, Mi Ke <span>&lt;<a href="http://mi.ke@null.net" target="_blank">mi.ke@null.net</a>&gt;</span> wrote:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Dear All,</div>

<div>&nbsp;</div>

<div>I&#39;m experimenting with the piped failover on the latest master. I want a failover to stop gw hunting and return from bridge when B-leg receives a specific disconnect code e.g. USER_BUSY or NO_ANSWER, but while it works as expected with error channels in console i.e.:</div>

<div>&nbsp;</div>

<div>freeswitch@internal&gt; originate {fail_on_single_reject=CALL_REJECTED:USER_BUSY}error/NO_ANSWER&#124;error/USER_BUSY&#124;error/CALL_REJECTED 999<br/>
-ERR USER_BUSY</div>

<div>&nbsp;</div>

<div>
<div>freeswitch@internal&gt; originate {fail_on_single_reject=CALL_REJECTED:NO_ANSWER}error/NO_ANSWER&#124;error/USER_BUSY&#124;error/CALL_REJECTED 999<br/>
-ERR NO_ANSWER</div>

<div>&nbsp;</div>

<div>it does not work in dialplan:</div>

<div>&nbsp;</div>

<div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;extension name=&quot;outbound&quot;&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field=&quot;destination_number&quot; expression=&quot;^&#92;d{7}&#36;&quot;&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;bridge_answer_timeout=120&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=NORMAL_TEMPORARY_FAILURE:NO_ROUTE_DESTINATION:CALL_REJECTED&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;fail_on_single_reject=USER_BUSY:NO_ANSWER:NO_USER_RESPONSE:RECOVERY_ON_TIMER_EXPIRE:ORIGINATOR_CANCEL&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;bridge_early_media=true&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;odbc_query&quot; inline=&quot;true&quot; data=&quot;route_out&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;bridge&quot; data=&quot;&#36;{bridge_to}&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;hangup&quot; data=&quot;&#36;{last_bridge_hangup_cause}&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;anti-action application=&quot;hangup&quot; data=&quot;INVALID_NUMBER_FORMAT&quot;/&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/extension&gt;</div>

<div>&nbsp;</div>

<div>or when included in bridge dialstring:</div>

<div>&nbsp;</div>

<div>&lt;action application=&quot;bridge&quot; data=&quot;{fail_on_single_reject=USER_BUSY:NO_ANSWER}&#36;{bridge_to}&quot;/&gt;</div>

<div>&nbsp;</div>

<div>i.e. it tries *all* gateways in the dialstring and ignores returning codes completely.</div>

<div>&nbsp;</div>

<div>I tried the same test when remote gateways were just hanging up with USER_BUSY code on receiving calls, but it did not affect the same negative result - all remote peers were tried in order and return code were ignored.</div>

<div>&nbsp;</div>

<div>I had the same experience with ver 1.2, but that time set continue_on_single_reject=err1,err2,err3 in dialplan worked for me flawlessly. However the same approach does not work for 1.5 and 1.4. Has anyone succeded in getting it to work as expected?</div>

<div>&nbsp;</div>

<div>Thanks / Mike</div>
</div>
</div>
</div>
</div>
<br/>
_________________________________________________________________________<br/>
Professional FreeSWITCH Consulting Services:<br/>
<a href="http://consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br/>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br/>
<br/>
Official FreeSWITCH Sites<br/>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br/>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br/>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br/>
<br/>
FreeSWITCH-users mailing list<br/>
<a href="http://FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br/>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br/>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br/>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></blockquote>
</div>
&nbsp;

<div>&nbsp;</div>
--

<div>
<div>
<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="http://brian@freeswitch.org" target="_blank">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"/></font></p>

<p><font face="courier new, 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="courier new, monospace"><b>T:</b><a>+19184209001</a> &#124; <b>F:</b><a>+19184209002</a> &#124; <b>M:</b>+1918424WEST (9378)<br/>
<b>iNUM:</b>+883 5100 1420 9001 &#124;&nbsp;<b>ISN:</b>410*543 &#124;&nbsp;<b>Skype:</b>briankwest</font></p>
</div>
</div>
</div>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: <a href="consulting@freeswitch.org" target="_parent">consulting@freeswitch.org</a> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a> Official FreeSWITCH Sites <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a> <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> FreeSWITCH-users mailing list <a href="FreeSWITCH-users@lists.freeswitch.org" target="_parent">FreeSWITCH-users@lists.freeswitch.org</a> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br/>
_________________________________________________________________________<br/>
Professional FreeSWITCH Consulting Services:<br/>
<a href="consulting@freeswitch.org" target="_parent">consulting@freeswitch.org</a><br/>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br/>
<br/>
Official FreeSWITCH Sites<br/>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br/>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br/>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br/>
<br/>
FreeSWITCH-users mailing list<br/>
<a href="FreeSWITCH-users@lists.freeswitch.org" target="_parent">FreeSWITCH-users@lists.freeswitch.org</a><br/>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br/>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br/>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></blockquote>
</div>
&nbsp;

<div>&nbsp;</div>
--

<div class="gmail_signature">
<div>
<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="brian@freeswitch.org" target="_parent">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"/></font></p>

<p><font face="courier new, 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="courier new, monospace"><b>T:</b>+19184209001 &#124; <b>F:</b>+19184209002 &#124; <b>M:</b>+1918424WEST (9378)<br/>
<b>iNUM:</b>+883 5100 1420 9001 &#124;&nbsp;<b>ISN:</b>410*543 &#124;&nbsp;<b>Skype:</b>briankwest</font></p>
</div>
</div>
</div>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a> Official FreeSWITCH Sites <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a> <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div>
</div>
</div>
</div></div></body></html>