<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Dear Brian,</div>

<div>&nbsp;</div>

<div>I have tuned escaping as per your advise and variable parsing looks OK now:</div>

<div>&nbsp;</div>

<div>2015-02-20 00:20:27.057113 [DEBUG] switch_ivr_originate.c:2100 Parsing global variables<br/>
2015-02-20 00:20:27.057113 [DEBUG] switch_event.c:1688 Parsing variable [fail_on_single_reject]=[USER_BUSY,NO_ANSWER,NO_USER_RESPONSE,RECOVERY_ON_TIMER_EXPIRE,ORIGINATOR_CANCEL] &lt;---properly escaped now<br/>
2015-02-20 00:20:27.057113 [DEBUG] switch_ivr_originate.c:2550 Parsing session specific variables<br/>
2015-02-20 00:20:27.057113 [DEBUG] switch_event.c:1688 Parsing variable [rtp_secure_media]=[true]<br/>
2015-02-20 00:20:27.057113 [DEBUG] switch_event.c:1688 Parsing variable [sdp_secure_savp_only]=[true]<br/>
2015-02-20 00:20:27.057113 [DEBUG] switch_event.c:1688 Parsing variable [origination_caller_id_number]=[1111]<br/>
2015-02-20 00:20:27.057113 [DEBUG] switch_event.c:1688 Parsing variable [origination_caller_id_name]=[aaaa]</div>

<div>&nbsp;</div>

<div>However a failover&#39;s behaviour in console and in dialplan is still different:</div>

<div>&nbsp;</div>

<div>2015-02-20 00:20:27.057113 [NOTICE] switch_channel.c:1055 New Channel sofia/external/5555@1.1.1.1 [45088610-b896-11e4-99d1-858de6bd5367]<br/>
2015-02-20 00:20:27.057113 [DEBUG] mod_sofia.c:4701 (sofia/external/5555@1.1.1.1) State Change CS_NEW -&gt; CS_INIT</div>

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

<div>call originates and hit 1.1.1.1</div>

<div>&nbsp;</div>

<div>
<div>2015-02-20 00:20:27.117077 [DEBUG] sofia.c:5845 Remote Reason: 17<br/>
2015-02-20 00:20:27.117077 [DEBUG] sofia.c:6617 Channel sofia/external/5555@1.1.1.1 entering state [terminated][486]<br/>
2015-02-20 00:20:27.117077 [NOTICE] sofia.c:7533 Hangup sofia/external/5555@1.1.1.1 [CS_CONSUME_MEDIA] [USER_BUSY]<br/>
2015-02-20 00:20:27.117077 [DEBUG] switch_channel.c:3222 Send signal sofia/external/5555@1.1.1.1 [KILL]</div>

<div>&nbsp;</div>

<div>
<div>2015-02-20 00:20:27.117077 [DEBUG] switch_core_state_machine.c:823 (sofia/external/5555@1.1.1.1) State REPORTING<br/>
2015-02-20 00:20:27.117077 [DEBUG] switch_ivr_originate.c:3720 Originate Resulted in Error Cause: 17 [USER_BUSY]</div>

<div>&nbsp;</div>

<div>it should stop here since USER_BUSY is in fail_on_single_reject list, but hunting continues:</div>

<div><br/>
2015-02-20 00:20:27.117077 [DEBUG] switch_ivr_originate.c:2550 Parsing session specific variables<br/>
2015-02-20 00:20:27.117077 [DEBUG] switch_event.c:1688 Parsing variable [rtp_secure_media]=[true]<br/>
2015-02-20 00:20:27.117077 [DEBUG] switch_event.c:1688 Parsing variable [sdp_secure_savp_only]=[true]<br/>
2015-02-20 00:20:27.117077 [DEBUG] switch_event.c:1688 Parsing variable [origination_caller_id_number]=[2222]<br/>
2015-02-20 00:20:27.117077 [DEBUG] switch_event.c:1688 Parsing variable [origination_caller_id_name]=[bbbb]</div>

<div>&nbsp;
<div>and the same continues for gw 2.2.2.2</div>

<div>&nbsp;</div>

<div>Meanwhile from console everything is OK:</div>

<div>&nbsp;</div>

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

<div>2015-02-20 00:35:15.057125 [DEBUG] switch_ivr_originate.c:2100 Parsing global variables<br/>
2015-02-20 00:35:15.057125 [DEBUG] switch_event.c:1688 Parsing variable [fail_on_single_reject]=[CALL_REJECTED,USER_BUSY,NO_ANSWER]<br/>
2015-02-20 00:35:15.057125 [NOTICE] switch_ivr_originate.c:2732 Cannot create outgoing channel of type [error] cause: [NO_ANSWER]</div>

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

<div>My dialplan is:</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{4}&#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;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;set&quot; data=&quot;sip_jitter_buffer_during_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>bridge data var as returned from the db backend is:</div>

<div>&nbsp;</div>

<div>
<div>{fail_on_single_reject=USER_BUSY&#92;,NO_ANSWER&#92;,NO_USER_RESPONSE&#92;,RECOVERY_ON_TIMER_EXPIRE&#92;,ORIGINATOR_CANCEL}[rtp_secure_media=true,sdp_secure_savp_only=true,origination_caller_id_number=1111,origination_caller_id_name=aaaa,called_id=5555]sofia/external/5555@1.1.1.1;transport=tls&#124;[rtp_secure_media=true,sdp_secure_savp_only=true,origination_caller_id_number=2222,origination_caller_id_name=bbbb,called_id=5555]sofia/external/5555@2.2.2.2;transport=tls</div>

<div>&nbsp;</div>

<div>a testing sites at 1.1.1.1 and 2.2.2.2 are doing nothing but hangup incoming calls with code 17</div>

<div>&nbsp;</div>

<div>Any ideas?</div>

<div>&nbsp;</div>

<div>Thanks / Mike</div>
</div>

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

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

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

<div>&nbsp;</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;Friday, February 20, 2015 at 12:10 AM<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;<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>So you get what I mean about a quoted list, Look below, its showing it its parsing variable&nbsp;<span style="font-family: Verdana;font-size: 12.0px;">&nbsp;[fail_on_single_reject]=[CALL_</span><span style="font-family: Verdana;font-size: 12.0px;">REJECTED] &lt;-- Notice it says only CALL_REJECTED.</span>

<div>&nbsp;</div>

<div><font face="Verdana"><span style="font-size: 12.0px;">These three are the same from FS_CLI:</span></font></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>originate {fail_on_single_reject=&#39;CALL_REJECTED,NO_ANSWER&#39;}error/NO_ANSWER&#124;error/USER_BUSY&#124;error/CALL_REJECTED 999</span></p>

<p>&nbsp;</p>

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

<p><span>this is not:</span></p>

<p>&nbsp;</p>

<p><span>originate {fail_on_single_reject=CALL_REJECTED,NO_ANSWER}error/NO_ANSWER&#124;error/USER_BUSY&#124;error/CALL_REJECTED 999</span></p>

<div><font face="Verdana"><span style="font-size: 12.0px;">You also have to be VERY careful when using ESL with say perl for example, You may have to quad escape the commas or various other elements to get thru the entire gambit of processing to finally arrive at FreeSWITCH with the proper formatting.</span></font></div>

<div>&nbsp;
<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.0px 0.0px 0.0px 0.8ex;border-left-width: 1.0px;border-left-color: rgb(204,204,204);border-left-style: 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>
</div>
</div>
</div>
</div>
_________________________________________________________________________<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>
</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>