<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>freeswitch@internal> version<br/>
FreeSWITCH Version 1.5.15b+git~20150218T214505Z~5febdbbc08~64bit (git 5febdbb 2015-02-18 21:45:05Z 64bit)</div>
<div> </div>
<div>I'm also getting the same results with stable branch</div>
<div>
<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> Thursday, February 19, 2015 at 11:38 PM<br/>
<b>From:</b> "Brian West" <brian@freeswitch.org><br/>
<b>To:</b> "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org>, "FreeSWITCH Docs Team" <Freeswitch-docs@lists.freeswitch.org><br/>
<b>Subject:</b> Re: [Freeswitch-users] piped failover doesn't work in dialplan, but works from console</div>
<div name="quoted-content">
<div>
<p><span>freeswitch@internal> originate {fail_on_single_reject=CALL_REJECTED:NO_ANSWER}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999</span></p>
<p><span>-ERR NO_ANSWER</span></p>
<p> </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> </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> </p>
<p><span>What code are you running?</span></p>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On Thu, Feb 19, 2015 at 2:35 PM, Mi Ke <span><<a href="mi.ke@null.net" target="_parent">mi.ke@null.net</a>></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> </div>
<div>Thank you for your response.</div>
<div> </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> </div>
<div>Commas in the list are not working either, even in console (where colons do):</div>
<div> </div>
<div>
<div>freeswitch@internal> originate {fail_on_single_reject=CALL_REJECTED,NO_ANSWER}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999 <---- 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>
<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> Thursday, February 19, 2015 at 10:00 PM<br/>
<b>From:</b> "Brian West" <<a href="brian@freeswitch.org" target="_parent">brian@freeswitch.org</a>><br/>
<b>To:</b> "FreeSWITCH Users Help" <<a href="freeswitch-users@lists.freeswitch.org" target="_parent">freeswitch-users@lists.freeswitch.org</a>><br/>
<b>Subject:</b> Re: [Freeswitch-users] piped failover doesn't work in dialplan, but works from console</div>
<div>
<div class="h5">
<div>
<div>
<p><span>originate {fail_on_single_reject='CALL_REJECTED\,NO_ANSWER'}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999</span></p>
<p> </p>
<p><span>Where are you getting the idea you can use a colon to separate the causes?</span></p>
<p> </p>
<p><span> </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 </span></p>
<p><span> rejections should terminate the attempt rather than a timeout, answer, or rejection by all. </span></p>
<p><span> If the value is set to 'true' any fail cause will end the attempt otherwise it can contain a comma (,) separated </span></p>
<p><span> list of cause names which should be considered fatal </span></p>
<p> </p>
<p><span> */</span><span> </span></p>
<p> </p>
<p> </p>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On Thu, Feb 19, 2015 at 10:38 AM, Mi Ke <span><<a href="http://mi.ke@null.net" target="_blank">mi.ke@null.net</a>></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> </div>
<div>I'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> </div>
<div>freeswitch@internal> originate {fail_on_single_reject=CALL_REJECTED:USER_BUSY}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999<br/>
-ERR USER_BUSY</div>
<div> </div>
<div>
<div>freeswitch@internal> originate {fail_on_single_reject=CALL_REJECTED:NO_ANSWER}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999<br/>
-ERR NO_ANSWER</div>
<div> </div>
<div>it does not work in dialplan:</div>
<div> </div>
<div>
<div> <extension name="outbound"><br/>
<condition field="destination_number" expression="^\d{7}$"><br/>
<action application="set" data="bridge_answer_timeout=120"/><br/>
<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE:NO_ROUTE_DESTINATION:CALL_REJECTED"/><br/>
<action application="set" data="fail_on_single_reject=USER_BUSY:NO_ANSWER:NO_USER_RESPONSE:RECOVERY_ON_TIMER_EXPIRE:ORIGINATOR_CANCEL"/><br/>
<action application="set" data="bridge_early_media=true"/><br/>
<action application="set" data="hangup_after_bridge=true"/><br/>
<action application="odbc_query" inline="true" data="route_out"/><br/>
<action application="bridge" data="${bridge_to}"/><br/>
<action application="hangup" data="${last_bridge_hangup_cause}"/><br/>
<anti-action application="hangup" data="INVALID_NUMBER_FORMAT"/><br/>
</condition><br/>
</extension></div>
<div> </div>
<div>or when included in bridge dialstring:</div>
<div> </div>
<div><action application="bridge" data="{fail_on_single_reject=USER_BUSY:NO_ANSWER}${bridge_to}"/></div>
<div> </div>
<div>i.e. it tries *all* gateways in the dialstring and ignores returning codes completely.</div>
<div> </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> </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> </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>
<div> </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> | <b>F:</b><a>+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>
_________________________________________________________________________ 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>
<div> </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 | <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>
_________________________________________________________________________ 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>