[OpenSIPS-Users] dialog lifetime refresh issue

chow zhouxiaoqiang.mstech at gmail.com
Wed Sep 10 10:33:22 CEST 2014


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.



More information about the Users mailing list