[Serusers] Dynamic Invite Timer w/AVPOPS

Jan Janak jan at iptel.org
Fri Dec 3 23:15:22 CET 2004


Hello,

Please create an issue in http://bugs.sip-router.org or send a patch to
serdev at lists.iptel.org if you discover a bug (I have fixed this one already in
CVS). Thanks.

  Jan.

On 03-12 19:54, Marian Dumitru wrote:
> Hi Paul,
> 
> The script looks ok. The problem is in other part; it took my some time 
> to trace it - there is a bug in TM in setting the "fr_inv_timer_avp" 
> parameter. Because of this, the AVP was not found and default value was 
> applied for timeout.
> 
> Please find attach a patch to fix the problem.
> 
> Best regards,
> Marian
> 
> Java Rockx wrote:
> >Thanks, however I must be doing something wrong because the avp_write() 
> >doesn't seem to have any
> >effect on the INVITE timer timeout.
> >
> >My ser.cfg looks like this:
> >
> ># ------------- tm parameters
> >modparam("tm", "fr_timer", 15)
> >modparam("tm", "fr_inv_timer", 22)
> >modparam("tm", "wt_timer", 5)
> >modparam("tm", "fr_inv_timer_avp", "inv_timeout")
> >
> >route {
> >
> >        # sanity checks, record route, alias lookup, etc, etc
> >
> >        if (!lookup("location")) {
> >
> >                if (uri=~"^sip:[0-9]{10}@") {
> >                                                                                                  
> >             
> >                        # Send to PSTN Gateway
> >                        avp_write("45", "inv_timeout");
> >                        route(3);
> >                        break;
> >                }
> >  
> >                sl_send_reply("404", "User Not Found");
> >                break;
> >        };
> >
> >        # normal SIP->SIP routing with default fr_inv_timer
> >        # set to 22 seconds with mod_param() above
> >        route(2);
> >}
> >
> >Shouldn't this do the trick?
> >
> >Regards,
> >Paul
> >
> >
> >--- Marian Dumitru <marian.dumitru at voice-sistem.ro> wrote:
> >
> >
> >>Hi Paul,
> >>
> >>you can control final_response_timer and final_response_invite_timer via 
> >> avps. Set in TM fr_inv_avp / fr_inv_timer_avp parameters with some AVP 
> >>string names and use AVPOPS to give values to these AVPS:
> >>
> >>modparam("tm","fr_inv_timer_avp","inv_timeout")
> >>
> >>....
> >>avp_write("20","inv_timeout"); # set timeout to 20 sec
> >>t_relay();
> >>.....
> >>
> >>Best regards,
> >>Marian
> >>
> >>Java Rockx wrote:
> >>
> >>>Hi All.
> >>>
> >>>I thought I read something a while ago about using avpops to dymanically 
> >>>change the INVITE
> >>
> >>timer -
> >>
> >>>but I can't seem to find that thread.
> >>>
> >>>Can anyone tell me if this is possible?
> >>>
> >>>I'd like to have a shorter INVITE timer for SIP->SIP calls and a longer 
> >>>INVITE timer for
> >>
> >>SIP->PSTN
> >>
> >>>calls. We see some 408 replies because a SIP phone is dialing a cell 
> >>>phone and get transfered
> >>
> >>to
> >>
> >>>the voicemail of the cell phone user, but to prevent the 408 due to a 
> >>>slow voicemail system we
> >>>have our INVITE timer currently set at 40 seconds which is rather 
> >>>annoying for SIP->SIP calls.
> >>>
> >>>I'm using -dev-21
> >>>
> >>>Regards,
> >>>Paul
> >>>
> >>>
> >>>		
> >>>__________________________________ 
> >>>Do you Yahoo!? 
> >>>Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> >>>http://info.mail.yahoo.com/mail_250
> >>>
> >>>_______________________________________________
> >>>Serusers mailing list
> >>>serusers at lists.iptel.org
> >>>http://lists.iptel.org/mailman/listinfo/serusers
> >>>
> >>
> >>-- 
> >>Voice Sistem
> >>http://www.voice-sistem.ro
> >>
> >
> >
> >
> >
> >		
> >__________________________________ 
> >Do you Yahoo!? 
> >All your favorites on one personal page ? Try My Yahoo!
> >http://my.yahoo.com 
> >
> 
> -- 
> Voice Sistem
> http://www.voice-sistem.ro

> Index: modules/tm/t_funcs.c
> ===================================================================
> RCS file: /cvsroot/ser/sip_router/modules/tm/t_funcs.c,v
> retrieving revision 1.172
> diff -u -r1.172 t_funcs.c
> --- modules/tm/t_funcs.c	1 Nov 2004 14:09:08 -0000	1.172
> +++ modules/tm/t_funcs.c	3 Dec 2004 18:49:14 -0000
> @@ -340,7 +340,7 @@
>  	fr_inv_timer_avp.s = &fr_inv_timer_param;
>  
>  	fr_timer_param.len = strlen(fr_timer_param.s);
> -	fr_inv_timer_param.len = strlen(fr_timer_param.s);
> +	fr_inv_timer_param.len = strlen(fr_inv_timer_param.s);
>  }
>  
>  

> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list