<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:x="urn:schemas-microsoft-com:office:excel" 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=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 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:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.st
        {mso-style-name:st;}
p.yiv5436046734msonormal, li.yiv5436046734msonormal, div.yiv5436046734msonormal
        {mso-style-name:yiv5436046734msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.yiv5436046734msohyperlink
        {mso-style-name:yiv5436046734msohyperlink;}
span.yiv5436046734msohyperlinkfollowed
        {mso-style-name:yiv5436046734msohyperlinkfollowed;}
span.yiv5436046734emailstyle17
        {mso-style-name:yiv5436046734emailstyle17;}
p.yiv5436046734msonormal1, li.yiv5436046734msonormal1, div.yiv5436046734msonormal1
        {mso-style-name:yiv5436046734msonormal1;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.yiv5436046734msohyperlink1
        {mso-style-name:yiv5436046734msohyperlink1;
        color:blue;
        text-decoration:underline;}
span.yiv5436046734msohyperlinkfollowed1
        {mso-style-name:yiv5436046734msohyperlinkfollowed1;
        color:purple;
        text-decoration:underline;}
span.yiv5436046734emailstyle171
        {mso-style-name:yiv5436046734emailstyle171;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle26
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Alright, thanks for the info. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></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"'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Stanislav Sinyagin<br><b>Sent:</b> Wednesday, January 8, 2014 4:12 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] Handling unavailble destinations<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt;background:white'><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black'>Grant,<br><br>Kamalilio Dispatcher module is able to ping its destinations, so in theory it should not even try to send INVITE to a destination which is unavailable.<br><br>Also if both destinations are offline, Kamailio should return a failure code immediately, so that SBC sends the failure response right away.<br><br>If you collect the SIP packet capture, most probably your SBC is already sending <span class=st>100 Trying response back to the carrier. If it does not, then it probably didn't receive it from Kamailio, so you need to tune kamailio again.</span><br><br><span class=st>I hope this helps.</span><br><br><o:p></o:p></span></p><div><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-size:10.0pt;font-family:"Helvetica","sans-serif";color:black'><o:p>&nbsp;</o:p></span></p></div><div><div><div><div class=MsoNormal align=center style='text-align:center;background:white'><span style='font-family:"Helvetica","sans-serif";color:black'><hr size=1 width="100%" align=center></span></div><p class=MsoNormal style='background:white'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>From:</span></b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> Grant Bagdasarian &lt;<a href="mailto:GB@cm.nl">GB@cm.nl</a>&gt;<br><b>To:</b> &quot;FreeSWITCH Users Help (<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>)&quot; &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt; <br><b>Sent:</b> Wednesday, January 8, 2014 2:41 PM<br><b>Subject:</b> [Freeswitch-users] Handling unavailble destinations</span><span style='font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'><o:p>&nbsp;</o:p></span></p><div id=yiv5436046734><div><div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>Hello,<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>Consider the following scenario:<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>Carrier ------------ SBC1 ------------ PROXY1 ------------ DESTINATION1/DESTINATION2<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>The carrier sends an incoming call to our SBC (SBC1).<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>The SBC bridges the incoming leg with an outgoing leg towards the Proxy (PROXY1). But it does not answer the incoming leg, it stays in an early state until the call is answered down the road.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>The Proxy(Kamailio) tries to contact DESTINATION1 OR DESTINATION2 by distributing the traffic round-robin style.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>Let’s say the first destination is not available. The proxy will then try to contact Destination2 after its timeout triggers. This works fine.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>Our carrier has its own timeout. If we don’t connect the call in time, they cancel the current request and send a new one to the fallback IP. <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>What I want is the following: have the SBC1 tell the carrier for the incoming leg that we are trying to connect the call by perhaps sending provisional messages every X interval.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>And have the proxy control which destination is available. If both destinations are unavailable, the proxy should respond with a failure message which is sent back to the incoming leg by the SBC.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>Normally if a destination is available I use&nbsp; &lt;action application=&quot;set&quot; data=&quot;bridge_early_media=true&quot; /&gt; to send the provisional messages from the outgoing leg back to the incoming leg. <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>But when the destination is not available, no responses received, the carrier cancels the call when their timeout occurs. <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica","sans-serif";color:black'>Am I making any sense? Is it possible to accomplish this?<o:p></o:p></span></p></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt;background:white'><span style='font-family:"Helvetica","sans-serif";color:black'><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>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.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://wiki.freeswitch.org/" target="_blank">http://wiki.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><br><o:p></o:p></span></p></div></div></div></div></div></body></html>