Julien Chavanton
2008-Dec-18 15:22 UTC
[asterisk-users] Dial timeout with SIP - how to set timeout for INVITE ACK
I have a concern with Dial command, I want to enable a secondary route with a remote partner, if the first route fails then we use the second one : Solution1: it will try both (there will be 2 simultanious actives calls ringing) this is not clean when calling an endusers exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5 <mailto:SIP/${EXTEN}@remote-sip1,5> ) exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip2,5 <mailto:SIP/${EXTEN}@remote-sip2,5> ) Solution2: it will wait until 5 seconds of timeout (on answer) and then try the second alternative "n" exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5 <mailto:SIP/${EXTEN}@remote-sip1,5> ) exten => _X.,n,Dial(SIP/${EXTEN}@remote-sip2,5 <mailto:SIP/${EXTEN}@remote-sip2,5> ) the problem is we can not select what timeout represents, timeout on ACK from INVITE would be perfect I think (1 second for example), timeout for answer ? this is to hard to predict, some mobile phone can ring for 30 seconds, etc. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081218/70c61e96/attachment.htm
Philipp Kempgen
2008-Dec-18 16:17 UTC
[asterisk-users] Dial timeout with SIP - how to set timeout for INVITE ACK
Julien Chavanton schrieb:> I have a concern with Dial command, I want to enable a secondary route with a remote partner, if the first route fails then we use the second one :> Solution1: it will try both (there will be 2 simultanious actives calls ringing) this is not clean when calling an endusers > > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5 <mailto:SIP/${EXTEN}@remote-sip1,5> ) > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip2,5 <mailto:SIP/${EXTEN}@remote-sip2,5> )You can't have the same "priority" (1) more than once per extension (_X.).> Solution2: it will wait until 5 seconds of timeout (on answer) and then try the second alternative "n" > > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5 <mailto:SIP/${EXTEN}@remote-sip1,5> ) > exten => _X.,n,Dial(SIP/${EXTEN}@remote-sip2,5 <mailto:SIP/${EXTEN}@remote-sip2,5> ) > > the problem is we can not select what timeout represents, timeout on ACK from INVITE would be perfect I think (1 second for example), timeout for answer ? this is to hard to predict, some mobile phone can ring for 30 seconds, etc.So why not use 30 and let Asterisk take care of the SIP details/ timeouts? And just to be sure: Don't put those "mailto" things in extensions.conf. :-) Philipp Kempgen -- http://www.das-asterisk-buch.de - http://www.the-asterisk-book.com Amooma GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 --
John Todd
2008-Dec-18 19:09 UTC
[asterisk-users] Dial timeout with SIP - how to set timeout for INVITE ACK
On Dec 18, 2008, at 7:22 AM, Julien Chavanton wrote:> I have a concern with Dial command, I want to enable a secondary > route with a remote partner, if the first route fails then we use > the second one : > > > Solution1: it will try both (there will be 2 simultanious actives > calls ringing) this is not clean when calling an endusers > > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5) > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip2,5) > > > > Solution2: it will wait until 5 seconds of timeout (on answer) and > then try the second alternative "n" > > exten => _X.,1,Dial(SIP/${EXTEN}@remote-sip1,5) > exten => _X.,n,Dial(SIP/${EXTEN}@remote-sip2,5) > > the problem is we can not select what timeout represents, timeout on > ACK from INVITE would be perfect I think (1 second for example), > timeout for answer ? this is to hard to predict, some mobile phone > can ring for 30 seconds, etc.You should look at the configurable T1 timers in sip.conf, which allow you to specify the retransmit intervals. I think this will do what you want, but it is a very dangerous setting that can lead to significant unintended consequences. First, do some reading on what the T1 timer does - Google can help there. ;--------------------------- SIP timers ---------------------------------------------------- ; These timers are used primarily in INVITE transactions. ; The default for Timer T1 is 500 ms or the measured run-trip time between ; Asterisk and the device if you have qualify=yes for the device. ; ;t1min=100 ; Minimum roundtrip time for messages to monitored hosts ; Defaults to 100 ms ;timert1=500 ; Default T1 timer ; Defaults to 500 ms or the measured round-trip ; time to a peer (qualify=yes). ;timerb=32000 ; Call setup timer. If a provisional response is not received ; in this amount of time, the call will autocongest ; Defaults to 64*timert1 JT --- John Todd email:jtodd at digium.com Digium, Inc. | Asterisk Open Source Community Director 445 Jan Davis Drive NW - Huntsville AL 35806 - USA direct: +1-256-428-6083 http://www.digium.com/