[asterisk-commits] trunk - r8642 in /trunk: channels/chan_sip.c
configs/sip.conf.sample
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jan 25 05:01:09 MST 2006
Author: oej
Date: Wed Jan 25 06:01:07 2006
New Revision: 8642
URL: http://svn.digium.com/view/asterisk?rev=8642&view=rev
Log:
>From now on, apply maxexpiry and minexpiry to all subscriptions. Thanks to fourcheeze in the IRC channel
for pointing this out.
Modified:
trunk/channels/chan_sip.c
trunk/configs/sip.conf.sample
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=8642&r1=8641&r2=8642&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jan 25 06:01:07 2006
@@ -10888,13 +10888,12 @@
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)
Modified: trunk/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/sip.conf.sample?rev=8642&r1=8641&r2=8642&view=diff
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Wed Jan 25 06:01:07 2006
@@ -58,8 +58,8 @@
; 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
More information about the asterisk-commits
mailing list