diff options
author | Joshua Colp <jcolp@digium.com> | 2012-12-01 00:47:42 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2012-12-01 00:47:42 +0000 |
commit | 898ca023d56191a8bda76fc0f1bcafccded850f3 (patch) | |
tree | 3a1ccc024d03a1311188c174b5e2c8bd7232f1c3 /channels/chan_motif.c | |
parent | 8bbbf4cf2fce94d24fe735174c1e879bf4220dbb (diff) |
Tweak extension used for incoming calls received on Motif.
Based on feedback from numerous individuals this patch tweaks incoming calls
to first look for an extension with the name of the endpoint. If no such extension
exists the call will silently fall back to the "s" extension as it previously
did.
........
Merged revisions 376983 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_motif.c')
-rw-r--r-- | channels/chan_motif.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_motif.c b/channels/chan_motif.c index fad388ea2..d56708149 100644 --- a/channels/chan_motif.c +++ b/channels/chan_motif.c @@ -686,7 +686,11 @@ static struct ast_channel *jingle_new(struct jingle_endpoint *endpoint, struct j } ast_channel_context_set(chan, endpoint->context); - ast_channel_exten_set(chan, "s"); + if (ast_exists_extension(NULL, endpoint->context, endpoint->name, 1, NULL)) { + ast_channel_exten_set(chan, endpoint->name); + } else { + ast_channel_exten_set(chan, "s"); + } ast_channel_priority_set(chan, 1); ao2_unlock(endpoint); |