<div dir="ltr">The ^^: make it do
<p class=""><span class="">QUOTED_ESC_COMMA</span></p><p class="">vs </p><p class="">
</p><p class=""><span class="">UNQUOTED_ESC_COMMA</span></p><p class=""><span class="">Which will make it do this later in the code:</span></p><p class=""><span class=""><br></span></p><p class=""><span class=""> </span><span class="">for</span><span class=""> (p = chan_type + 1; p && p < bend && </span><span class="">*p</span><span class="">; p++) { </span></p><p class=""><span class=""> </span><span class="">if</span><span class=""> (</span><span class="">*p</span><span class=""> == QUOTED_ESC_COMMA) { </span></p><p class=""><span class=""> </span><span class="">*p</span><span class=""> = </span><span class="">','</span><span class="">; </span></p><p class=""><span class=""> } </span></p><p class=""><span class="">
</span></p><p class=""><span class=""> }</span></p><p class=""><span class="">I've had both cases work for me in testing.</span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 19, 2015 at 3:58 PM, Bote Man <span dir="ltr"><<a href="mailto:bote_radio@botecomm.com" target="_blank">bote_radio@botecomm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">It’s not only a colon that is used, it is two carats followed by a colon to tell FS what delimiter to use:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">^^:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The example from the wiki page shows this:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><action application="set" data="fail_on_single_reject=<b>^^:</b>CALL_REJECTED:NORMAL_CLEARING:USER_BUSY"/><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">But I defer to Brian since he knows the code much better than I.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Bote<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Mi Ke<br><b>Sent:</b> Thursday, 19 February, 2015 15:35</span></p><div><div class="h5"><br><b>Subject:</b> Re: [Freeswitch-users] piped failover doesn't work in dialplan, but works from console<u></u><u></u></div></div><p></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">Hello Brian,<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">Thank you for your response.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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><u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">Commas in the list are not working either, even in console (where colons do):<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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]<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p><div style="border:none;border-left:solid #c3d9e5 1.5pt;padding:0in 0in 0in 8.0pt;margin-left:7.5pt;margin-top:7.5pt;margin-right:3.75pt;margin-bottom:3.75pt;word-wrap:break-word" name="quote"><div style="margin-bottom:7.5pt"><p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">Sent:</span></b><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> Thursday, February 19, 2015 at 10:00 PM<br><b>From:</b> "Brian West" <<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>><br><b>To:</b> "FreeSWITCH Users Help" <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br><b>Subject:</b> Re: [Freeswitch-users] piped failover doesn't work in dialplan, but works from console<u></u><u></u></span></p></div><div name="quoted-content"><div><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">originate {fail_on_single_reject='CALL_REJECTED\,NO_ANSWER'}error/NO_ANSWER|error/USER_BUSY|error/CALL_REJECTED 999<u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">Where are you getting the idea you can use a colon to separate the causes?<u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> /* When using the AND operator, the fail_on_single_reject flag may be set in order to indicate that a single <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> rejections should terminate the attempt rather than a timeout, answer, or rejection by all. <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> If the value is set to 'true' any fail cause will end the attempt otherwise it can contain a comma (,) separated <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> list of cause names which should be considered fatal <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> */ <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p><p><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">On Thu, Feb 19, 2015 at 10:38 AM, Mi Ke <<a href="http://mi.ke@null.net" target="_blank">mi.ke@null.net</a>> wrote: <u></u><u></u></span></p><div><div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">Dear All,<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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.:<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">it does not work in dialplan:<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <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><u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">or when included in bridge dialstring:<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""><action application="bridge" data="{fail_on_single_reject=USER_BUSY:NO_ANSWER}${bridge_to}"/><u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">i.e. it tries *all* gateways in the dialstring and ignores returning codes completely.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">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?<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">Thanks / Mike<u></u><u></u></span></p></div></div></div></div></div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""><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><u></u><u></u></span></p></div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""> <u></u><u></u></span></p></div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">-- <u></u><u></u></span></p><div><div><p><b><i><span style="font-size:13.5pt;font-family:"Courier New"">Brian West</span></i></b><span style="font-size:9.0pt;font-family:"Courier New""><br></span><span style="font-size:10.0pt;font-family:"Courier New""><a href="http://brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""><u></u><u></u></span></p><p><span style="font-size:7.5pt;font-family:"Courier New""><img border="0" src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"></span><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""><u></u><u></u></span></p><p><b><i><span style="font-size:9.0pt;font-family:"Courier New"">Twitter: @FreeSWITCH , @briankwest</span></i></b><span style="font-size:9.0pt;font-family:"Courier New""><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></span><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""><u></u><u></u></span></p><p><b><span style="font-size:9.0pt;font-family:"Courier New"">T:</span></b><span style="font-size:9.0pt;font-family:"Courier New""><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</span><span style="font-size:9.0pt;font-family:"Verdana","sans-serif""><u></u><u></u></span></p></div></div></div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif"">_________________________________________________________________________ Professional FreeSWITCH Consulting Services: <a href="mailto:consulting@freeswitch.org" target="_blank">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="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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<span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u><u></u></span></a></span></p></div></div></div></div></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">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="mailto:FreeSWITCH-users@lists.freeswitch.org">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><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><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="mailto:brian@freeswitch.org" 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 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>