[OpenSIPS-Users] dialog lifetime refresh issue
chow
zhouxiaoqiang.mstech at gmail.com
Wed Sep 10 03:19:44 CEST 2014
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.
More information about the Users
mailing list