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)
; 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