<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Preformattato HTML Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Testo fumetto Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TestofumettoCarattere
        {mso-style-name:"Testo fumetto Carattere";
        mso-style-priority:99;
        mso-style-link:"Testo fumetto";
        font-family:"Tahoma","sans-serif";}
span.PreformattatoHTMLCarattere
        {mso-style-name:"Preformattato HTML Carattere";
        mso-style-priority:99;
        mso-style-link:"Preformattato HTML";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:116028119;
        mso-list-type:hybrid;
        mso-list-template-ids:-985620382 1099701196 68157465 68157467 68157455 68157465 68157467 68157455 68157465 68157467;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:88.8pt;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:2103068793;
        mso-list-type:hybrid;
        mso-list-template-ids:-1053528668 -279933016 68157465 68157467 68157455 68157465 68157467 68157455 68157465 68157467;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:88.8pt;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:124.8pt;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=IT link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Hello list,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> My
reasons to do failover are:<o:p></o:p></span></p>
<p class=MsoListParagraph style='margin-left:88.8pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo2'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>a)<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=EN-US>one of the two providers could
be unreachable<o:p></o:p></span></p>
<p class=MsoListParagraph style='margin-left:88.8pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo2'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>b)<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=EN-US>both providers may be UP but one
of them could return a SIP error message (maybe caused by DOWN E1s)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Googling
I found a few possible solutions:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoListParagraph style='margin-left:88.8pt;text-indent:-18.0pt;
mso-list:l1 level1 lfo1'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=EN-US>Using DIALSTATUS variable.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:70.8pt'><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoListParagraph style='margin-left:88.8pt;text-indent:-18.0pt;
mso-list:l1 level1 lfo1'><![if !supportLists]><span lang=EN-US><span
style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=EN-US>Dialing in sequence:<o:p></o:p></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})<o:p></o:p></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})<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p>
<p class=MsoListParagraph style='margin-left:88.8pt;text-indent:-18.0pt;
mso-list:l1 level1 lfo1'><![if !supportLists]><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><span style='mso-list:Ignore'>3.<span
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>ChanIsAvail<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:70.8pt'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></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).<o:p></o:p></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).<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></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?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Thanks in advance,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Alex<o:p></o:p></span></p>
</div>
</body>
</html>