sofia-sip: extend timeout for session expires on short timeouts to be 90% of timeout instead of 1/3 to handle devices that do not refresh in time such as polycom (SFSIP-212)
This commit is contained in:
parent
52cd8cdd64
commit
a7f4892887
|
@ -1 +1 @@
|
|||
Mon May 31 08:54:37 EDT 2010
|
||||
Mon May 31 09:47:08 EDT 2010
|
||||
|
|
|
@ -1552,6 +1552,7 @@ static void nua_session_usage_refresh(nua_handle_t *nh,
|
|||
return;
|
||||
|
||||
if (ss->ss_timer->refresher == nua_remote_refresher) {
|
||||
SU_DEBUG_3(("nua(%p): session almost expired, sending BYE before timeout.\n", (void *)nh));
|
||||
ss->ss_reason = "SIP;cause=408;text=\"Session timeout\"";
|
||||
nua_stack_bye(nh->nh_nua, nh, nua_r_bye, NULL);
|
||||
return;
|
||||
|
@ -4493,14 +4494,14 @@ session_timer_set(nua_session_usage_t *ss, int uas)
|
|||
t->timer_set = 1;
|
||||
}
|
||||
else if (t->refresher == nua_remote_refresher) {
|
||||
/* if the side not performing refreshes does not receive a
|
||||
session refresh request before the session expiration, it SHOULD send
|
||||
a BYE to terminate the session, slightly before the session
|
||||
expiration. The minimum of 32 seconds and one third of the session
|
||||
interval is RECOMMENDED. */
|
||||
/* RFC 4028 10.3 and 10.4: Send BYE before the session expires.
|
||||
Increased interval from 2/3 to 9/10 of session expiration delay
|
||||
because some endpoints won't UPDATE early enough with very short
|
||||
sessions (e.g. 120). */
|
||||
|
||||
unsigned interval = t->interval;
|
||||
|
||||
interval -= 32 > interval / 3 ? interval / 3 : 32;
|
||||
interval -= 32 > interval / 10 ? interval / 10 : 32;
|
||||
|
||||
nua_dialog_usage_set_refresh_range(du, interval, interval);
|
||||
t->timer_set = 1;
|
||||
|
|
Loading…
Reference in New Issue