[OpenSIPS-Users] dialog lifetime refresh issue
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Sep 10 19:19:24 CEST 2014
Hi,
yes, that is true....the idea is the loose_route() function hides the
dialog matching (for the sequential requests) ; and when this matching
is done, the lifetime / timeout is updated. So you need to set your avp
before the matching (the loose_route() ), otherwise it will be ignored.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 10.09.2014 11:33, chow wrote:
> hi,the opensips version is 1.10.1. In the code, I did not see $ DLG_timeout,
> so, I use timeout_avp.
> I fix script config , modify $avp(session_expires) value before
> loose_route , it work. why?
>
> In the code , I see in dlg_handlers.c have function void dlg_onroute(struct
> sip_msg* req, str *route_params, void *param), this function update our
> dialog lifetime if timeout_avp changed.
> In my option , loose_route() function triger the dlg_onroute() function.
> right?
>
> script like this:
> if (is_method("INVITE")) {
> if($(hdr(Session-Expires))){
> # handling the case
> "Session-Expires:4000;refresher=uac"
> $var(se_value) =
> $(hdr(Session-Expires){s.select,0,;});
>
> if($(var(se_value){s.int})>=SIP_MIN_SESSION_TIME){
> $avp(session_expires) =
> $(var(se_value){s.int});
> xlog("L_INFO", "set session timer by reinvite
> se_value:$(var(se_value){s.int}) dlg_lifettime:$DLG_lifetime seconds\n");
> }else{
> xlog("L_ERR", "Session timer not refreshed");
> }
> }
> }
> if (has_totag()) {
> if (loose_route()) {
> if (is_method("INVITE")) {
> # even if in most of the cases is useless, do RR for
> # re-INVITEs alos, as some buggy clients do change route
> set
> # during the dialog.
>
>
> if (is_present_hf("Proxy-Authorization")) {
> remove_hf("Proxy-Authorization");
> }
>
> }
> }
> }
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/dialog-lifetime-refresh-issue-tp7593404p7593411.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list