diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 19:39:55 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-19 19:39:55 +0000 |
commit | 71d9fcf1247cfdcdc87de15212ef3d39750fae75 (patch) | |
tree | bb91127a3c079c0712e8236835e55d0f705d8439 /channels/chan_sip.c | |
parent | f9b9945c97801e3a17bad721a62cf1768a83b541 (diff) |
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/branches/1.2@28794 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6c4091c16..f3d93f52a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10823,13 +10823,17 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, } return 0; } - /* Initialize the context if it hasn't been already */ + 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_copy_string(p->context, p->subscribecontext, sizeof(p->context)); else if (ast_strlen_zero(p->context)) strcpy(p->context, default_context); /* Get destination right away */ - gotdest = get_destination(p, NULL); build_contact(p); if (gotdest) { if (gotdest < 0) |