]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Tweak extension used for incoming calls received on Motif.
authorJoshua Colp <jcolp@digium.com>
Sat, 1 Dec 2012 00:46:40 +0000 (00:46 +0000)
committerJoshua Colp <jcolp@digium.com>
Sat, 1 Dec 2012 00:46:40 +0000 (00:46 +0000)
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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376983 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_motif.c
configs/motif.conf.sample

index 4a2a50e22d9557a239d2f4699b7280155bd4de26..bfaed50cfd9b0e1fdde84f650906a34fbd3a4809 100644 (file)
@@ -678,7 +678,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);
index c651e69309a963868eea1b141ae860253eb1df7e..ae3ab30d72154aac69d10276a744456d41282b18 100644 (file)
 ;
 ; The only supported method for DTMF is RFC2833. This is always enabled on audio streams and negotiated if possible.
 
+; Incoming Calls
+;
+; Incoming calls will first look for the extension matching the name of the endpoint in the configured context. If
+; no such extension exists the call will automatically fall back to the "s" extension.
+
 ; CallerID
 ;
 ; The incoming caller id number is populated with the username of the caller and the name is populated with the full