mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user