[asterisk-bugs] [Asterisk 0017040]: Explicit context set in SIP peer overridden by default domain context
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Mar 16 14:03:39 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=17040
======================================================================
Reported By: pprindeville
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 17040
Category: Core/Configuration
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: 1.6.2.6
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2010-03-16 12:19 CDT
Last Modified: 2010-03-16 14:03 CDT
======================================================================
Summary: Explicit context set in SIP peer overridden by
default domain context
Description:
I'm running a couple of different internal domains in a multi-tenant
configuration. SIP phones (SPA-942's and PAP2T's) register in their
respective domains, but have explicit contexts set per peer-definition (for
instance, the Fax hanging off the PAP2T can only 7 and 10-digit dial... it
has no international and no internal extensions).
In trying to support E.164 (ENUM) dialling, we tried to enable incoming
SIP calls to the domains by specifying a default context for each domain,
e.g.
domain=redfish-solutions.com,redfish-internet
in the configuration snippet below. Unfortunately, doing this also puts
all of the internal SIP phones registering in that domain into the
redfish-internet context as well, which is neither desirable nor
intuitive.
I posit that the proper behavior is to always use the "context=..."
specified in a [peer] SIP definition when present, and fallback on the
domain-associated context only when it isn't present.
Summary:
If "domain=redfish-solutions.com,redfish-internet" is commented out, then
calls made by "lab_1" use the [redfish-internal] context. If it's
uncommented, then "lab_1" uses the [redfish-internet] context (making it
indistinguishable from an outside SIP caller [or hacker]).
======================================================================
----------------------------------------------------------------------
(0119464) pprindeville (reporter) - 2010-03-16 14:03
https://issues.asterisk.org/view.php?id=17040#c119464
----------------------------------------------------------------------
Looking at the source in channels/chan_sip.c get_destination():
/* If we have a context defined, overwrite the original
context */
if (!ast_strlen_zero(domain_context))
ast_string_field_set(p, context, domain_context);
I'm thinking this would work better if (a) this was a 'guest' caller and
not an explicitly configured peer, or (b) an explicitly configured peer
that didn't already have a set context.
Issue History
Date Modified Username Field Change
======================================================================
2010-03-16 14:03 pprindeville Note Added: 0119464
======================================================================
More information about the asterisk-bugs
mailing list