Hi,<div><br></div><div>I do use the first solution based on DIALSTATUS variable. (<a href="http://www.voip-info.org/wiki/view/Superdial+macro">http://www.voip-info.org/wiki/view/Superdial+macro</a>)</div><div><br></div><div>
since it's included to a separated context named [superdial-macro], I don't have to repeat it over and over, so the fact that it's not a oneliner doesn't bother me at all :) </div><div><br><div class="gmail_quote">
On Tue, Apr 6, 2010 at 3:37 PM, Alexandru Oniciuc <span dir="ltr"><<a href="mailto:Alexandru.Oniciuc@trivenet.it">Alexandru.Oniciuc@trivenet.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="IT" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">Hello list,</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> I
need a hand to find the best dialplan failover solution when using two SIP Trunks.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> My
reasons to do failover are:</span></p>
<p style="margin-left:88.8pt"><span lang="EN-US"><span>a)<span style="font:7.0pt "Times New Roman"">
</span></span></span><span lang="EN-US">one of the two providers could
be unreachable</span></p>
<p style="margin-left:88.8pt"><span lang="EN-US"><span>b)<span style="font:7.0pt "Times New Roman"">
</span></span></span><span lang="EN-US">both providers may be UP but one
of them could return a SIP error message (maybe caused by DOWN E1s)</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> Googling
I found a few possible solutions:</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p style="margin-left:88.8pt"><span lang="EN-US"><span>1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><span lang="EN-US">Using DIALSTATUS variable.</span></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-US"> </span></p>
<p style="margin-left:88.8pt"><span lang="EN-US"><span>2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><span lang="EN-US">Dialing in sequence:</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> exten
=> _X.,1,Dial(SIP/${TRUNK1}/${EXTEN})</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> exten
=> _X.,2,Dial(SIP/${TRUNK2}/${EXTEN})</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> </span></p>
<p style="margin-left:88.8pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""><span>3.<span style="font:7.0pt "Times New Roman""> </span></span></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">ChanIsAvail</span></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> Using
the first method it’s possible to get the CONGESTION and CHANUNAVAIL
status which pretty much solves my problem but it takes more than 2 lines of
dialplan(I like one liners).</span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US">The second solution
requires less space in the dialplan but it should work only when the called
party is busy (or maybe even when the first trunk is down).</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US">Is there a clean
way to send the call to the second SIP provider if the first one is unreachable
or spits out sip error messages?</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance,</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Alex</span></p>
</div>
</div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Mvh,<br>Aurimas Skirgaila<br>
</div>