Hello all,
I´ve checked on SST module and it does not mention anything about
refreshing the dialog timeout value. We need to handle this through UPDATE
messages.
We are using dialog module:
modparam("dialog", "timeout_avp", "$avp(session_expires)")
When we get the INVITE, we do:
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}) >= MIN_SE)
{
# Setting/Updating dialog's timeout
$avp(session_expires) = $(var(se_value){s.int});
xlog("L_ERR","******** set timer for INVITE:
$avp(session_expires) seconds");
}
else
{
xlog("L_ERR","Session-Expires header value lower than
minimum supported (MIN_SE)");
append_to_reply("Min-SE: MIN_SE\r\n");
sl_send_reply("422","Session Interval Too Small");
exit;
}
}
Using dlg_list, I can see the dialog timeout was correctly set. When I do
the same thing for the UPDATE, the dialog timeout is not refreshed:
if (is_method("UPDATE") && $(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}) >= MIN_SE)
{
$avp(session_expires) = $(var(se_value){s.int});
} else {
xlog("L_ERR","Session timer not refreshed");
}
sl_send_reply("200", "OK");
exit;
}
else
{
sl_send_reply("481", "Transaction Does Not Exist");
exit;
}
}
Any hints, please?
Thanks in advance.
Mariana.
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users