diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 19:43:33 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 19:43:33 +0000 |
commit | 2f125fe36e3b3fa203bc9e17e527a0303064d114 (patch) | |
tree | 08042544e3897557f594ccd82afb25dcc13fe9d3 /channels/chan_sip.c | |
parent | b474b62f4a076678653839da4c72075407d5430d (diff) |
Merged revisions 28794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r28794 | kpfleming | 2006-05-19 14:39:55 -0500 (Fri, 19 May 2006) | 2 lines
use the specified 'subscribecontext' for a peer rather than the context found via the target domain (domain contexts are for calls, not for subscriptions) (issue #7122, reported by raarts)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@28795 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 44e44f864..32764b8cf 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11702,14 +11702,19 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, return 0; } - /* Initialize the context if it hasn't been already */ + /* Get destination right away */ + gotdest = get_destination(p, NULL); + + /* Initialize the context if it hasn't been already; + note this is done _after_ handling any domain lookups, + because the context specified there is for calls, not + subscriptions + */ if (!ast_strlen_zero(p->subscribecontext)) ast_string_field_set(p, context, p->subscribecontext); else if (ast_strlen_zero(p->context)) ast_string_field_set(p, context, default_context); - /* Get destination right away */ - gotdest = get_destination(p, NULL); build_contact(p); if (gotdest) { transmit_response(p, "404 Not Found", req); |