[asterisk-commits] file: trunk r376984 - in /trunk: ./ channels/ configs/

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


Author: file
Date: Fri Nov 30 18:47:42 2012
New Revision: 376984

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

Merged revisions 376983 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/channels/chan_motif.c
    trunk/configs/motif.conf.sample

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/channels/chan_motif.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_motif.c?view=diff&rev=376984&r1=376983&r2=376984
==============================================================================
--- trunk/channels/chan_motif.c (original)
+++ trunk/channels/chan_motif.c Fri Nov 30 18:47:42 2012
@@ -686,7 +686,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: trunk/configs/motif.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/motif.conf.sample?view=diff&rev=376984&r1=376983&r2=376984
==============================================================================
--- trunk/configs/motif.conf.sample (original)
+++ trunk/configs/motif.conf.sample Fri Nov 30 18:47:42 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