<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have a question regarding the final response and 
how to accelerate failover.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have studied the documentation and have watched 
the discussions regarding fr_timer and fr_inv_timer. I do not think I understand 
the fine points of tm and would appreciated your assistance.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>My question is how do I accelerate the final 
response back to UAC? Right now it takes up to 30 seconds from when I know I 
have received a negative response to INVITE until my failure_route gets 
executed. If I do not call failure_route, it still takes up to 30 
seconds</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Right now when UAC sends an INVITE, fr_timer has a 
default value of 3. In my onreply_route, fr_inv_timer gets set to 30 when I 
receive provisional response 100. If there is further progress to a provisional 
response >= 180, fr_inv_timer gets set to 90. If I receive a negative 
response, I call failure _route from my onreply_route.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>At that point, I know I have received a negative 
acknowledge but will not signal UAC for another 30 seconds that the call 
failed.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have attached appropriate pieces of my config 
your your review. Thank you very much for any help you can provide.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Mike Montgomery</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># ------------lcr params (to get to functionality) 
------------<BR>modparam("lcr", "contact_avp", 
"$avp(i:711)")<BR>modparam("lcr|tm", "fr_inv_timer_avp", 
"$avp(i:704)")<BR>modparam("lcr", "gw_uri_avp", 
"$avp(i:709)")<BR>modparam("^auth$|lcr", "rpid_avp", 
"$avp(i:302)")<BR>modparam("lcr", "ruri_user_avp", 
"$avp(i:500)")<BR>modparam("lcr", "flags_avp", 
"$avp(i:712)")<BR>       /* Turning on the regex 
mode for prefix */<BR>#modparam("lcr", "prefix_mode", 
1)<BR>modparam("lcr","fr_inv_timer_next",10)<BR>modparam("lcr|tm","fr_inv_timer",10)<BR>modparam("tm", 
"fr_timer", 3)<BR>modparam("tm", "onreply_avp_mode", 1)<BR>modparam("tm", 
"fr_timer_avp", "$avp(i:24)")<BR>modparam("tm", "pass_provisional_replies", 
1)<BR>avp_aliases="fr_timer=i:24"<BR>avp_aliases="fr_inv_timer=i:704"<BR>modparam("tm", 
"restart_fr_on_each_reply", 0)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>route[13] {<BR>xlog("L_INFO","enter route [13] 
RequestURI=$ru RequestUser=$rU Source=$si Method=$rm TO $tu FromURI=$fu 
FromUser=$fU \n");<BR>    #From an external domain 
outbound<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>        
if(allow_trusted()) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>                
xlog("L_INFO","PRE Strip requested URI = $ru \n");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>            
prefix2domain("0", "2");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>                
xlog("L_INFO","Strip prefix >>>> requested URI = $ru 
\n");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>            
$avp(s:can_uri) = $ru;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>                
xlog("L_INFO"," Canonical URI = $avp(s:can_uri) \n");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>            
revert_uri();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># if no caller ID add dummy callerID</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>            if 
($fU!~"^[0-9]*") 
{<BR>                
uac_replace_from("sip:14436230000@$si");<BR>                
xlog("L_INFO","NO CALLERID inserted>>>>> ............ $fu  
\n");<BR>            } 
else 
{<BR>                
xlog("L_INFO","valid CALLERID <<<<< ............ $fu  
\n");<BR>            
}</FONT></DIV>
<DIV><FONT face=Arial 
size=2><BR>            if 
(!load_gws()) 
{<BR>                
xlog("L_INFO"," load_gws() FAILED >>> gw_uri_avp = $avp(i:709) 
\n");<BR>                
sl_send_reply("503", "Unable to load 
gateways");<BR>                
exit;<BR>            
}</DIV>
<DIV> </DIV>
<DIV>               
xlog("L_INFO"," load gateway... flags = $avp(i:712) \n");</DIV>
<DIV> </DIV>
<DIV>            
if(!next_gw()){<BR>                
xlog("L_INFO"," next_gw() FAILED >>> ruri_user_avp = $avp(i:500) 
\n");<BR>                
sl_send_reply("503", "Unable to find a 
gateway");<BR>                
exit;<BR>            
}<BR>                
xlog("L_INFO"," 1. next gateway... flags = $avp(i:712) \n");</DIV>
<DIV> </DIV>
<DIV># set provisional response 
timer<BR>            
$avp(fr_timer)=3;</DIV>
<DIV> </DIV>
<DIV>            
t_on_reply("2");</DIV>
<DIV> </DIV>
<DIV>            if 
(!t_relay()) 
{<BR>                
sl_reply_error();<BR>            
};<BR>            
exit;</DIV>
<DIV> </DIV>
<DIV>        } else 
{<BR>                
sl_send_reply("403", "Forbidden 
r13");<BR>                
exit;<BR>        };<BR>}<BR></DIV>
<DIV>onreply_route[2] {<BR>        
xlog("L_INFO","enter onreply_route [2] RequestURI=$ru RequestUser=$rU Source=$si 
Method=$rm TO $tu FromURI=$fu FromUser=$fU \n");</DIV>
<DIV> </DIV>
<DIV>        
if(status=~"100"){<BR>           
$avp(fr_inv_timer) = 
35;<BR>           
xlog("L_INFO"," ----- Reply Route 100 Trying = $rs, $rr 
\n");<BR>        };</DIV>
<DIV> </DIV>
<DIV>        
if(status=~"18[0-3]"){<BR>           
$avp(fr_inv_timer) = 
100;<BR>           
xlog("L_INFO"," ----- Reply Route $rs $rr 
\n");<BR>        };</DIV>
<DIV> </DIV>
<DIV>        
if(status=~"[3-6][0-9][0-9]"){<BR>           
xlog("L_INFO"," ----- Reply Route  FAILURE status = $rs, $rr 
\n");<BR>          
t_on_failure("2");<BR>        
};<BR>    exit;<BR>        
}<BR><BR>failure_route[2] {<BR>xlog("L_INFO","enter failure_route [2] Source=$si 
Method=$rm TO $tu FROM $fu \n");<BR></DIV>
<DIV>xlog("L_INFO"," ----- \n");<BR>xlog("L_INFO"," ----- FAILURE status = $rs 
\n");<BR>xlog("L_INFO"," ----- \n");</DIV>
<DIV> </DIV>
<DIV>    ##--<BR>    ##-- If cancelled, 
exit.<BR>    ##--<BR>    if (t_was_cancelled()) 
{<BR>        exit;<BR>    
};</DIV>
<DIV> </DIV>
<DIV>     if (!use_next_gw()) 
{<BR>         t_reply("503", "No 
gateways available");<BR>          
xlog("L_INFO"," failure route NO MORE GATEWAYS 503 back to caller 
\n");<BR>         
exit;<BR>         };</DIV>
<DIV> </DIV>
<DIV>        xlog("L_INFO"," failure route 
next gateway... dr_ruri= $avp(dr_ruri) ... dr_attrs = $avp(dr_attrs) destination 
= $dd \n");</DIV>
<DIV> </DIV>
<DIV>        # Set accounting flags again 
Account INVITE packets<BR>        
setflag(5);<BR>        # Set accounting flags 
again Account Missed calls<BR>        
setflag(8);</DIV>
<DIV> </DIV>
<DIV>    t_on_reply("2");</DIV>
<DIV> </DIV>
<DIV>    t_relay();</DIV>
<DIV> </DIV>
<DIV>    exit;<BR>}<BR></DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>