[OpenSIPS-Users] dialog lifetime refresh issue

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Sep 10 10:16:46 CEST 2014


Hi,

Maybe something is missing me, but the only operation you do is to write 
into $avp(session_expires)- I do not understand how you push this info 
into the dialog module . Are you using an version < 1.10 with 
tinmeout_avp modparam ( 
http://www.opensips.org/html/docs/modules/1.10.x/dialog.html#timeout-avp-id 
) ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 10.09.2014 04:19, chow wrote:
> I use time_avp set my custom timeout for dialog lifetime, then update dialog
> lifetime when recive uac's re-invite(include sessiom-timer header),  but
> dialog send BYE to uac , it seems lifetime not refresh in re-invite.
> scritpt like this:
>
>      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.
>                  record_route();
>                                  
>                  if($(hdr(Session-Expires))){
>                      if(match_dialog()){
>                          # 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");
>                          }
>                      }else{
>                          sl_send_reply("481", "Transaction Does Exist");
>                          exit;
>                      }
>                  }
>                  
>                  if (is_present_hf("Proxy-Authorization")) {
>                      remove_hf("Proxy-Authorization");
>                  }
>                                  
>              }
>         }
>      }
>
>
> .......
>
>      if (is_method("INVITE")) {
>          # check Session time and Min-Se header if exist.update dialog timer
>          if($hdr(Session-Expires)){
>              # Handling the case "Session-Expires:4000;refresher=uac"
>              $var(se_value) = $(hdr(Session-Expires){s.select,0,;});
>                          
>              if(sstCheckMin("1")){
>                  xlog("L_ERR", "422 Session Timer Too Small reply send.\n");
>                  exit;
>              }
>              create_dialog("B");
>                          
>              $avp(session_expires) = $(var(se_value){s.int});
>              xlog("L_INFO", "set session timer for invite
> se_value:$var(se_value) dlg_lifet:$DLG_lifetime seconds\n");
>                          
>          }
>                  
>          setflag(ACC_DO); # do accounting
>      }
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/dialog-lifetime-refresh-issue-tp7593404.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