<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> </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> </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 way in term of responsability would be :</FONT></DIV></DIV>
<DIV dir=ltr><FONT face=Verdana><FONT color=#000000 size=2> </FONT><FONT color=#000000 size=2>If I do not receive a response to the SIP INVITE 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> </DIV>
<DIV dir=ltr><FONT face=Verdana size=2>- With AGI can we control and react to the signaling events, I guess not ?<BR></FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2>Thank you</DIV></FONT>
<DIV dir=ltr><FONT face=Verdana size=2> </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>><BR>> ------------------------------------------------------------------------<BR>> *From:* asterisk-users-bounces@lists.digium.com on behalf of Philipp<BR>> Kempgen<BR>> *Sent:* Thu 18/12/2008 4:17 PM<BR>> *To:* Asterisk Users<BR>> *Subject:* Re: [asterisk-users] Dial timeout with SIP - how to set<BR>> timeout for INVITE ACK<BR>><BR>> Julien Chavanton schrieb:<BR>> > I have a concern with Dial command, I want to enable a secondary<BR>> route with a remote partner, if the first route fails then we use the<BR>> second one :<BR>><BR>> > Solution1: it will try both (there will be 2 simultanious actives<BR>> calls ringing) this is not clean when calling an endusers<BR>> ><BR>> > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5<BR>> <SIP/${EXTEN}@remote-sip1,5 <<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip1,5">mailto:SIP/$%7BEXTEN%7D@remote-sip1,5</A>>> )<BR>> > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip2,5<BR>> <SIP/${EXTEN}@remote-sip2,5 <<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip2,5">mailto:SIP/$%7BEXTEN%7D@remote-sip2,5</A>>> )<BR>><BR>> You can't have the same "priority" (1) more than once per<BR>> extension (_X.).<BR>><BR>> > Solution2: it will wait until 5 seconds of timeout (on answer) and<BR>> then try the second alternative "n"<BR>> ><BR>> > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5<BR>> <SIP/${EXTEN}@remote-sip1,5 <<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip1,5">mailto:SIP/$%7BEXTEN%7D@remote-sip1,5</A>>> )<BR>> > exten => _X.,n,Dial(SIP/${EXTEN}@remote-sip2,5<BR>> <SIP/${EXTEN}@remote-sip2,5 <<A href="mailto:SIP/$%7BEXTEN%7D@remote-sip2,5">mailto:SIP/$%7BEXTEN%7D@remote-sip2,5</A>>> )<BR>> ><BR>> > the problem is we can not select what timeout represents, timeout on<BR>> ACK from INVITE would be perfect I think (1 second for example),<BR>> timeout for answer ? this is to hard to predict, some mobile phone can<BR>> ring for 30 seconds, etc.<BR>><BR>> So why not use 30 and let Asterisk take care of the SIP details/<BR>> timeouts?<BR>><BR>> And just to be sure: Don't put those "mailto" things in<BR>> extensions.conf. :-)<BR>><BR>><BR>> Philipp Kempgen<BR>><BR>Julien Chavanton wrote:<BR>> >So why not use 30 and let Asterisk take care of the SIP details/<BR>> >timeouts?<BR>> <BR>> Asterisk will wait the until it receive "answer" or timeout<BR>> <BR>> I need to timeout a SIP call on SIP INVITE ACK, in ISDN for exmaple<BR>> this is translated to PROCEEDING<BR>> Meaning "I have received the call, now I will look what to do with it"<BR>> <BR>> The result with the suggested timeout is not good enought, you may<BR>> wait for the whole timeout even if the other side as not sent<BR>> anything, this will be the case for all your calls, depending on the<BR>> timeout this would be killing the traffic.<BR>> <BR>> <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? 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> <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>