[asterisk-commits] tilghman: trunk r264779 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 20 17:23:34 CDT 2010


Author: tilghman
Date: Thu May 20 17:23:32 2010
New Revision: 264779

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264779
Log:
Let ExtensionState resolve dynamic hints.

(closes issue #16623)
 Reported by: tilghman
 Patches: 
       20100116__issue16623.diff.txt uploaded by tilghman (license 14)
 Tested by: lmadsen

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=264779&r1=264778&r2=264779
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu May 20 17:23:32 2010
@@ -4195,6 +4195,17 @@
 		return -1;                   /* No hint, return -1 */
 	}
 
+	if (e->exten[0] == '_') {
+		/* Create this hint on-the-fly */
+		ast_add_extension(e->parent->name, 0, exten, e->priority, e->label,
+			e->matchcid ? e->cidmatch : NULL, e->app, ast_strdup(e->data), ast_free_ptr,
+			e->registrar);
+		if (!(e = ast_hint_extension(c, context, exten))) {
+			/* Improbable, but not impossible */
+			return -1;
+		}
+	}
+
 	return ast_extension_state2(e);  /* Check all devices in the hint */
 }
 




More information about the asterisk-commits mailing list