<div dir="ltr"><div>Like to report back, in case anybody bumping to the same problem.</div><div><br></div><div>After digging more and looking at debug log. Apparently the culprit is on the way I set channel variable. On my case, dialstring should be : </div>
<div><br></div><div><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px"> <action application="bridge" data="{ignore_early_media=</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">true,fail_on_single_reject=^^:NO_</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">ANSWER:ALLOTTED_TIMEOUT</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">}[leg_timeout=</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">20}]sofia/gateway/gw1/</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">7321231234|[leg_timeout=20]</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">sofia/gateway/gw2/7321231234|[</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">leg_timeout=20]sofia/gateway/</span><span style="font-family:arial,sans-serif;font-size:13.600000381469727px;text-indent:48px">gw3/7321231234}"/></span><br>
</div><div><br></div><div>Once that in-place, it work as expected.</div><div><br></div><div>Thats all, my bad, Freeswitch Rock!!</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 18, 2013 at 3:58 PM, Johny Kadarisman Kwan <span dir="ltr"><<a href="mailto:jkr888@gmail.com" target="_blank">jkr888@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p class="MsoNormal"><span style="font-size:10pt">I’m
attempting to setup FS to failover from gw1, gw2, and gw3 subsequently. AND if any
gateway response with NO_ANSWER or ALLOTED_TIMEOUT, then the next attempt
should be stop. Using “fail_on_single_reject” var, I tried following script : </span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </span></p>
<p class="MsoNormal"><span style="font-size:10pt"> <extension
name="public_extensions"></span></p>
<p class="MsoNormal"><span style="font-size:10pt"> <condition
field="destination_number" expression="^1234$"></span></p>
<p class="MsoNormal"><span style="font-size:10pt"> <action application="sleep"
data="2000"/></span></p>
<p class="MsoNormal"><span style="font-size:10pt"> <action
application="answer"/></span></p>
<p class="MsoNormal" style="text-indent:0.5in"><span style="font-size:10pt"> <action application="bridge" data="{ignore_early_media=true,fail_on_single_reject=NO_ANSWER,
ALLOTTED_TIMEOUT}[leg_timeout=20}]sofia/gateway/gw1/7321231234|[leg_timeout=20]sofia/gateway/gw2/7321231234|[leg_timeout=20]sofia/gateway/gw3/7321231234}"/></span></p>
<p class="MsoNormal"><span style="font-size:10pt"> <action
application="hangup"/></span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </condition></span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </extension></span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </span></p>
<p class="MsoNormal"><span style="font-size:10pt">Bridge
app still continue attempting call to each gw1, gw2, and gw3 when ALLOTED_TIMEOUT response. From searching lists, above dialplan should work out fine. Did I misses any steps?</span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </span></p>
<p class="MsoNormal"><span style="font-size:10pt">Btw,
tried above on FreeSWITCH Version 1.5.6b+git~20131010T172322Z~1cd6d44b06 (git
1cd6d44 2013-10-10 17:23:22Z) windows
built. </span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </span></p>
<p class="MsoNormal"><span style="font-size:10pt">Thanks,</span></p>
<p class="MsoNormal"><span style="font-size:10pt">Jkwan</span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </span></p>
<p class="MsoNormal"><span style="font-size:10pt"> </span></p></div>
</blockquote></div><br></div>