[asterisk-bugs] [Asterisk 0018831]: default subscribecontext ignored when allowguest=yes
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Feb 18 14:06:59 CST 2011
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=18831
======================================================================
Reported By: meitinger
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18831
Category: Channels/chan_sip/Subscriptions
Reproducibility: always
Severity: minor
Priority: normal
Status: ready for review
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): 1.4
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2011-02-17 13:30 CST
Last Modified: 2011-02-18 14:06 CST
======================================================================
Summary: default subscribecontext ignored when allowguest=yes
Description:
Let's say sip.conf is configured like this:
[general]
allowguest=yes
context=from-guest-sip
allowsubscribe=yes
subscribecontext=all-hints
If an unauthenticated client then tries to subscribe for notifications,
Asterisk will look for the hint extension under from-guest-sip instead of
all-hints. In my opinion, this is an error. Asterisk should either deny
unauthenticated clients to subscribe at all or lookup the hints in the same
context as it would do if the client had authenticated first. If others
agree, please change
if (req->method == SIP_SUBSCRIBE && !ast_strlen_zero(p->subscribecontext))
ast_string_field_set(p, context, p->subscribecontext);
to something like
if (req->method == SIP_SUBSCRIBE) {
if (!ast_strlen_zero(p->subscribecontext))
ast_string_field_set(p, context, p->subscribecontext);
else if (!ast_strlen_zero(default_subscribecontext))
ast_string_field_set(p, context, default_subscribecontext);
}
in function "get_destination" in chan_sip.c
Thanks.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-02-18 14:06 lmadsen Description Updated
======================================================================
More information about the asterisk-bugs
mailing list