mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-27 16:07:15 -07:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@28794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+6
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user