<div dir="ltr"><div><div><div>Hi Team,<br><br>What is the right way to reset timers <b>$T_fr_inv_timeout</b> and <b>$T_fr_timeout</b> ??<br><br>I am using OpenSIPS-2.2 version<br>The below scenario will help to understand issue,<br><br>There are 4 SIP users,<br>1111,2222,3333,4444 <br><br>What I want to achieve is:<br>1111 ---> 2222 (FORWARD ON NOANSWER) ---> 3333 (FORWARD ON NOANSWER) ---> 4444<br><br><b>1st Test Case Scenario:</b><br><br>1111<br>2222 (fr_inv_timeout 20 sec)<br>3333 (fr_inv_timeout 25 sec)<br>4444 (fr_inv_timeout 30 sec)<br><br><br>when 1111 calls 2222 : OpenSIPS generates CANCEL at 20 secs (thats working proper as expexted) and forwards call to 3333 as per my configuration.<br>so in --> 3333 : OpenSIPS generates CANCEL at <b>20 secs instead of 25 secs</b> and send 408 to 1111. and not processing the 2nd forwarding.<br><br><b>2nd Test Case Scenario:</b><br>1111<br>2222 (fr_inv_timeout 20 sec)<br>3333 (fr_inv_timeout 15 sec)<br>4444 (fr_inv_timeout 30 sec)<br><br>when 1111 calls 2222 : OpenSIPS generates CANCEL at 20 secs (that is working proper as expexted) and forwards call to 3333 as per my configuration.<br>now --> 3333 : OpenSIPS generates CANCEL at 15 secs and forwards the call to 4444, Here OpenSIPS generates CANCEL <b>after 5 secs instead of 30 secs.</b><br><br><br>We set timeout by using $T_fr_inv_timeout.<br>------------<br>route[ring_timeout]{<br>                xlog("L_INFO","------------------- RING_TIMEOUT ---------------\n");<br>                if (!is_method("INVITE"))<br>                        return;<br>                avp_db_load("$rU","$avp(ringtimeout)/usr_preferences"); <br>                if($avp(ringtimeout)!=null)     <br>                {<br>                        $T_fr_inv_timeout = NULL;<br>                        xlog("L_INFO","$rU: Ring timeout : $avp(ringtimeout)");<br>                        $T_fr_inv_timeout =$(avp(ringtimeout){<a href="http://s.int">s.int</a>}) ;<br>                        xlog("L_INFO","$rU: Ring timeout is setted: [$T_fr_inv_timeout]");<br>                }<br>                else<br>                {<br>                        xlog("L_INFO","$rU: Ring timeout is NOT setted");<br>                }<br>}<br>------------------<br><br>From both the scenarios what we found, it sticks to the first timeout of 2222,that is 20secs in our case.<br>In first scenario it generates CANCEL on 3333 at 20 secs instead of 25 that is 2222's Timeout.<br>In second scenario it generates CANCEL on 3333 at 15sec and on 4444 at 5 sec (15 + 5 = 20 sec) that is also 2222's timeout.<br><br><br>Can I know the right method to set $T_fr_inv_timeout ?<br><br></div>Let me know if any other information is needed.<br><br><br></div>Thanks,<br></div>Ravi<br><div><div><div><br></div></div></div></div>