<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 4:26 PM, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:13px">My understanding is that today there is no channel variable in FS that lets control reject causes to stop bridge iterations over | separated endpoints.</span></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:13px">Am I right or am I wrong?</span></blockquote><div><br></div>







</span><div>fail_on_single_reject should be working for exactly that purpose. For example I use the following:</div>







<p><span>&lt;action </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;continue_on_fail=GATEWAY_DOWN,INVALID_GATEWAY&quot;</span><span>/&gt;<br></span><span>&lt;action </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;fail_on_single_reject=!^^:GATEWAY_DOWN:INVALID_GATEWAY&quot;</span><span>/&gt;<br></span><span>&lt;action </span><span>application</span><span>=</span><span>&quot;set&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;hangup_after_bridge=true&quot;</span><span>/&gt;<br></span><span>&lt;action </span><span>application</span><span>=</span><span>&quot;bridge&quot;</span><span> </span><span>data</span><span>=</span><span>&quot;</span>sofia/gateway/gw1/$1|sofia/gateway/gw2/$1|sofia/gateway/gw3/$1<span>&quot;</span><span>/&gt;</span></p><p><span>This passes routes via multiple carriers. If the gateway is down/non-existent it will try the next sequential destination(s), but any other failure cause causes the bridge to end without trying the next (</span>fail_on_single_reject). If all the gateways are down it returns to dialplan (continue_on_fail) otherwise it hangs up with the reject cause from the bridge.</p></div><br></blockquote></div><br></div><div class="gmail_extra">Hi Steven,<br><br></div><div class="gmail_extra">I believe your explanation is spot on and makes a lot of sense. From a documentation standpoint I can see why some are confused. Both the wiki and the source code explicitly mention the AND (i.e. comma) condition being affected by fail_on_single_reject but not the OR (i.e. pipe) condition. <br><br></div><div class="gmail_extra">If there are no objections I&#39;d like to submit this tidbit to be included in the fail_on_single_reject wiki entry.<br><br></div><div class="gmail_extra">-MC<br></div></div>