summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-04-12 16:29:52 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-04-12 16:29:52 +0000
commita35c7ba8e7e5e05efb2ca3f57d31b4501bfdb75b (patch)
treea814ff52f8918c92f4e1d4b384c0b0d79f33dec3 /pbx
parentf9155c9c3d50b47b6c6b7619f1788d2e790803ca (diff)
Add option to invoke the extensions.conf stdexten using the legacy macro method.
ASTERISK-18809 eliminated the legacy macro invocation of the stdexten in favor of the Gosub method without a means of backwards compatibility. (issue ASTERISK-18809) (closes issue ASTERISK-19457) Reported by: Matt Jordan Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1855/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_config.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index 86b132279..22ea1d710 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1753,8 +1753,14 @@ static void pbx_load_users(void)
ast_add_extension2(con, 0, cat, -1, NULL, NULL, iface, NULL, NULL, registrar);
/* If voicemail, use "stdexten" else use plain old dial */
if (hasvoicemail) {
- snprintf(tmp, sizeof(tmp), "%s,stdexten(${HINT})", cat);
- ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Gosub", ast_strdup(tmp), ast_free_ptr, registrar);
+ if (ast_opt_stdexten_macro) {
+ /* Use legacy stdexten macro method. */
+ snprintf(tmp, sizeof(tmp), "stdexten,%s,${HINT}", cat);
+ ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Macro", ast_strdup(tmp), ast_free_ptr, registrar);
+ } else {
+ snprintf(tmp, sizeof(tmp), "%s,stdexten(${HINT})", cat);
+ ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Gosub", ast_strdup(tmp), ast_free_ptr, registrar);
+ }
} else {
ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", ast_strdup("${HINT}"), ast_free_ptr, registrar);
}