mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 18:38:02 +00:00
From now on, apply maxexpiry and minexpiry to all subscriptions. Thanks to fourcheeze in the IRC channel
for pointing this out. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -10888,13 +10888,12 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
|
||||
if (p && !ast_test_flag(p, SIP_NEEDDESTROY)) {
|
||||
p->expiry = atoi(get_header(req, "Expires"));
|
||||
|
||||
/* The next 4 lines can be removed if the SNOM Expires bug is fixed */
|
||||
if (p->subscribed == DIALOG_INFO_XML) {
|
||||
if (p->expiry > max_expiry)
|
||||
p->expiry = max_expiry;
|
||||
if (p->expiry < min_expiry)
|
||||
p->expiry = min_expiry;
|
||||
}
|
||||
/* check if the requested expiry-time is within the approved limits from sip.conf */
|
||||
if (p->expiry > max_expiry)
|
||||
p->expiry = max_expiry;
|
||||
if (p->expiry < min_expiry)
|
||||
p->expiry = min_expiry;
|
||||
|
||||
if (sipdebug || option_debug > 1)
|
||||
ast_log(LOG_DEBUG, "Adding subscription for extension %s context %s for peer %s\n", p->exten, p->context, p->username);
|
||||
if (p->autokillid > -1)
|
||||
|
||||
@@ -58,8 +58,8 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
|
||||
; SIP compatibility (defaults to "no")
|
||||
;tos=184 ; Set IP QoS to either a keyword or numeric val
|
||||
;tos=lowdelay ; lowdelay,throughput,reliability,mincost,none
|
||||
;maxexpiry=3600 ; Max length of incoming registration we allow
|
||||
;minexpiry=60 ; Minimum length of registration (default 60)
|
||||
;maxexpiry=3600 ; Max length of incoming registrations/subscriptions we allow (seconds)
|
||||
;minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
|
||||
;defaultexpiry=120 ; Default length of incoming/outoing registration
|
||||
;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
|
||||
;checkmwi=10 ; Default time between mailbox checks for peers
|
||||
|
||||
Reference in New Issue
Block a user