[asterisk-commits] file: branch 11 r376983 - in /branches/11: channels/ configs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 30 18:46:44 CST 2012


Author: file
Date: Fri Nov 30 18:46:40 2012
New Revision: 376983

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376983
Log:
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.

Modified:
    branches/11/channels/chan_motif.c
    branches/11/configs/motif.conf.sample

Modified: branches/11/channels/chan_motif.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_motif.c?view=diff&rev=376983&r1=376982&r2=376983
==============================================================================
--- branches/11/channels/chan_motif.c (original)
+++ branches/11/channels/chan_motif.c Fri Nov 30 18:46:40 2012
@@ -678,7 +678,11 @@
 	}
 
 	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);

Modified: branches/11/configs/motif.conf.sample
URL: http://svnview.digium.com/svn/asterisk/branches/11/configs/motif.conf.sample?view=diff&rev=376983&r1=376982&r2=376983
==============================================================================
--- branches/11/configs/motif.conf.sample (original)
+++ branches/11/configs/motif.conf.sample Fri Nov 30 18:46:40 2012
@@ -49,6 +49,11 @@
 ;
 ; 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




More information about the asterisk-commits mailing list