[asterisk-commits] oej: trunk r339206 - in /trunk: CHANGES main/manager.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 4 04:43:07 CDT 2011
Author: oej
Date: Tue Oct 4 04:43:03 2011
New Revision: 339206
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=339206
Log:
Generate error message when AMI action originate extension doesn't exist
Review: https://reviewboard.asterisk.org/r/1445/
Is this a bug or a new feature? No responses on Asterisk-dev so I'm
committing to trunk only.
Modified:
trunk/CHANGES
trunk/main/manager.c
Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=339206&r1=339205&r2=339206
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Oct 4 04:43:03 2011
@@ -40,6 +40,10 @@
-----------------------------
* Added command "cdr show pgsql status" to check connection status
+AMI (Asterisk Manager Interface) changes
+----------------------------------------
+ * Originate now generates an error response if the extension given
+ is not found in the dialplan
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.8 to Asterisk 10 -------------------
Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=339206&r1=339205&r2=339206
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Oct 4 04:43:03 2011
@@ -3997,6 +3997,16 @@
}
}
+ /* Check early if the extension exists. If not, we need to bail out here. */
+ if (exten && context && pi) {
+ if (! ast_exists_extension(NULL, context, exten, pi, l)) {
+ /* The extension does not exist. */
+ astman_send_error(s, m, "Extension does not exist.");
+ res = 0;
+ goto fast_orig_cleanup;
+ }
+ }
+
/* Allocate requested channel variables */
vars = astman_get_variables(m);
More information about the asterisk-commits
mailing list