Make pbx_config.c use Gosub instead of Macro call for stdexten.

Users created by users.conf with hasvoicemail=yes have been documented as
using a Gosub to stdexten since v1.6.0.  However, the code still generates
dialplan to access stdexten as a Macro as documented in v1.4; which does
not work with the newer extensions.conf.sample file.

* Make generated dialplan access the stdexten dialplan with the documented
Gosub instead of the older Macro style.

(closes issue ASTERISK-18809)
Reported by: Jay Allen
Patches:
      gosub_patch-pbx_config.patch (license #6323) patch uploaded by Jay Allen (modified)
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2012-01-05 23:06:17 +00:00
parent 6fa808447b
commit d6b359ff0b
2 changed files with 7 additions and 2 deletions

View File

@@ -1743,8 +1743,8 @@ 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), "stdexten,%s,${HINT}", cat);
ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Macro", strdup(tmp), ast_free_ptr, registrar);
snprintf(tmp, sizeof(tmp), "%s,stdexten(${HINT})", cat);
ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Gosub", strdup(tmp), ast_free_ptr, registrar);
} else {
ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", strdup("${HINT}"), ast_free_ptr, registrar);
}