<HTML dir=ltr><HEAD><TITLE>Re: [asterisk-users] Dial timeout with SIP - how to set timeout for INVITE ACK</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText4202 dir=ltr>
<DIV dir=ltr><FONT size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>"You want to know if the remote address/proxy is up and running before you<BR>bother trying to wait on it for very long. Is this right?" , yes this would be a good start ?</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>- But the IP could be up and the SIP service down, we need a signaling timeout, I beleive a good&nbsp;way in term of responsability would be :</FONT></DIV></DIV>
<DIV dir=ltr><FONT face=Verdana><FONT color=#000000 size=2>&nbsp;</FONT><FONT color=#000000 size=2>If I do not receive a response to the SIP INVITE&nbsp;in timeout duration then I would cancel the call and try with another route.</FONT></FONT></DIV>
<DIV dir=ltr>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana size=2>- With AGI can we control and react to the signaling events, I guess not&nbsp;?<BR></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2>Thank you</DIV></FONT>
<DIV dir=ltr><FONT face=Verdana size=2>&nbsp;</DIV></FONT>
<DIV dir=ltr>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr><FONT face=Tahoma size=2><B>From:</B> asterisk-users-bounces@lists.digium.com on behalf of SIP<BR><B>Sent:</B> Thu 18/12/2008 6:13 PM<BR><B>To:</B> Asterisk Users Mailing List - Non-Commercial Discussion<BR><B>Subject:</B> Re: [asterisk-users] Dial timeout with SIP - how to set timeout for INVITE ACK<BR></FONT><BR></DIV></DIV>
<DIV><BR>
<P><FONT size=2>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt; *From:* asterisk-users-bounces@lists.digium.com on behalf of Philipp<BR>&gt; Kempgen<BR>&gt; *Sent:* Thu 18/12/2008 4:17 PM<BR>&gt; *To:* Asterisk Users<BR>&gt; *Subject:* Re: [asterisk-users] Dial timeout with SIP - how to set<BR>&gt; timeout for INVITE ACK<BR>&gt;<BR>&gt; Julien Chavanton schrieb:<BR>&gt; &gt; I have a concern with Dial command, I want to enable a secondary<BR>&gt; route with a remote partner, if the first route fails then we use the<BR>&gt; second one :<BR>&gt;<BR>&gt; &gt; Solution1: it will try both (there will be 2 simultanious actives<BR>&gt; calls ringing) this is not clean when calling an endusers<BR>&gt; &gt;<BR>&gt; &gt;&nbsp; exten =&gt; _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5<BR>&gt; &lt;SIP/${EXTEN}@remote-sip1,5 &lt;<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip1,5">mailto:SIP/$%7BEXTEN%7D@remote-sip1,5</A>&gt;&gt; )<BR>&gt; &gt;&nbsp; exten =&gt; _X.,1,Dial(SIP/${EXTEN}@remote-sip2,5<BR>&gt; &lt;SIP/${EXTEN}@remote-sip2,5 &lt;<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip2,5">mailto:SIP/$%7BEXTEN%7D@remote-sip2,5</A>&gt;&gt; )<BR>&gt;<BR>&gt; You can't have the same "priority" (1) more than once per<BR>&gt; extension (_X.).<BR>&gt;<BR>&gt; &gt; Solution2: it will wait until 5 seconds of timeout (on answer) and<BR>&gt; then try the second alternative "n"<BR>&gt; &gt;<BR>&gt; &gt;&nbsp; exten =&gt; _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5<BR>&gt; &lt;SIP/${EXTEN}@remote-sip1,5 &lt;<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip1,5">mailto:SIP/$%7BEXTEN%7D@remote-sip1,5</A>&gt;&gt; )<BR>&gt; &gt;&nbsp; exten =&gt; _X.,n,Dial(SIP/${EXTEN}@remote-sip2,5<BR>&gt; &lt;SIP/${EXTEN}@remote-sip2,5 &lt;<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip2,5">mailto:SIP/$%7BEXTEN%7D@remote-sip2,5</A>&gt;&gt; )<BR>&gt; &gt;<BR>&gt; &gt; the problem is we can not select what timeout represents, timeout on<BR>&gt; ACK from INVITE would be perfect I think (1 second for example),<BR>&gt; timeout for answer ? this is to hard to predict, some mobile phone can<BR>&gt; ring for 30 seconds, etc.<BR>&gt;<BR>&gt; So why not use 30 and let Asterisk take care of the SIP details/<BR>&gt; timeouts?<BR>&gt;<BR>&gt; And just to be sure: Don't put those "mailto" things in<BR>&gt; extensions.conf.&nbsp; :-)<BR>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; Philipp Kempgen<BR>&gt;<BR>Julien Chavanton wrote:<BR>&gt; &gt;So why not use 30 and let Asterisk take care of the SIP details/<BR>&gt; &gt;timeouts?<BR>&gt;&nbsp;<BR>&gt; Asterisk will wait the until it receive "answer" or timeout<BR>&gt;&nbsp;<BR>&gt; I need to timeout a SIP call on SIP INVITE ACK, in ISDN for exmaple<BR>&gt; this is translated to PROCEEDING<BR>&gt; Meaning "I have received the call, now I will look what to do with it"<BR>&gt;&nbsp;<BR>&gt; The result with the suggested timeout is not good enought, you may<BR>&gt; wait for the whole timeout even if the other side as not sent<BR>&gt; anything, this will be the case for all your calls, depending on the<BR>&gt; timeout this would be killing the traffic.<BR>&gt;&nbsp;<BR>&gt;&nbsp;<BR><BR>It sounds as though you want the result of the SIP INVITE (looking for,<BR>say, a provisional 1XX response) and want the timeout to be set for<BR>whether or not you receive the provisional response in time?&nbsp; i.e. You<BR>want to know if the remote address/proxy is up and running before you<BR>bother trying to wait on it for very long. Is this right? Or am I<BR>missing the point of the question?<BR><BR>N.<BR><BR>_______________________________________________<BR>-- Bandwidth and Colocation Provided by <A href="http://www.api-digital.com/">http://www.api-digital.com</A> --<BR><BR>asterisk-users mailing list<BR>To UNSUBSCRIBE or update options visit:<BR>&nbsp;&nbsp; <A href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A><BR></FONT></P></DIV></BODY></HTML>