<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Dear Brian,</div>
<div> </div>
<div>I have tuned escaping as per your advise and variable parsing looks OK now:</div>
<div> </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] <---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> </div>
<div>However a failover's behaviour in console and in dialplan is still different:</div>
<div> </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 -> CS_INIT</div>
<div>
<div> </div>
<div>call originates and hit 1.1.1.1</div>
<div> </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> </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> </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>
<div>and the same continues for gw 2.2.2.2</div>
<div> </div>
<div>Meanwhile from console everything is OK:</div>
<div> </div>
<div>
<div>freeswitch@internal> originate {fail_on_single_reject=CALL_REJECTED\,USER_BUSY\,NO_ANSWER}error/NO_ANSWER|error/USER_BUSY|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> </div>
</div>
<div>My dialplan is:</div>
<div> </div>
<div>
<div> <extension name="outbound"><br/>
<condition field="destination_number" expression="^\d{4}$"><br/>
<action application="set" data="bridge_answer_timeout=120"/><br/>
<action application="set" data="bridge_early_media=true"/><br/>
<action application="set" data="hangup_after_bridge=true"/><br/>
<action application="set" data="sip_jitter_buffer_during_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>bridge data var as returned from the db backend is:</div>
<div> </div>
<div>
<div>{fail_on_single_reject=USER_BUSY\,NO_ANSWER\,NO_USER_RESPONSE\,RECOVERY_ON_TIMER_EXPIRE\,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|[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> </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> </div>
<div>Any ideas?</div>
<div> </div>
<div>Thanks / Mike</div>
</div>
<div> </div>
</div>
</div>
</div>
<div> </div>
</div>
<div> </div>
</div>
<div> </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> Friday, February 20, 2015 at 12:10 AM<br/>
<b>From:</b> "Brian West" <brian@freeswitch.org><br/>
<b>To:</b> "FreeSWITCH Users Help" <freeswitch-users@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>So you get what I mean about a quoted list, Look below, its showing it its parsing variable <span style="font-family: Verdana;font-size: 12.0px;"> [fail_on_single_reject]=[CALL_</span><span style="font-family: Verdana;font-size: 12.0px;">REJECTED] <-- Notice it says only CALL_REJECTED.</span>
<div> </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='CALL_REJECTED\,NO_ANSWER'}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999</span></p>
<p> </p>
<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>originate {fail_on_single_reject=CALL_REJECTED\,NO_ANSWER}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999</span></p>
<p><span>this is not:</span></p>
<p> </p>
<p><span>originate {fail_on_single_reject=CALL_REJECTED,NO_ANSWER}error/NO_ANSWER|error/USER_BUSY|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>
<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.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> </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>
</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>
<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>
</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>