[asterisk-commits] rmudgett: trunk r349782 - in /trunk: UPGRADE.txt pbx/pbx_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 5 17:06:22 CST 2012


Author: rmudgett
Date: Thu Jan  5 17:06:17 2012
New Revision: 349782

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=349782
Log:
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

Modified:
    trunk/UPGRADE.txt
    trunk/pbx/pbx_config.c

Modified: trunk/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/trunk/UPGRADE.txt?view=diff&rev=349782&r1=349781&r2=349782
==============================================================================
--- trunk/UPGRADE.txt (original)
+++ trunk/UPGRADE.txt Thu Jan  5 17:06:17 2012
@@ -48,6 +48,11 @@
 ===
  - A new option "tonezone" for setting default tonezone for the channel driver
    or individual devices
+
+users.conf:
+ - A defined user with hasvoicemail=yes now finally uses a Gosub to stdexten
+   as documented in extensions.conf.sample since v1.6.0 instead of a Macro as
+   documented in v1.4.
 
 From 1.8 to 10:
 

Modified: trunk/pbx/pbx_config.c
URL: http://svnview.digium.com/svn/asterisk/trunk/pbx/pbx_config.c?view=diff&rev=349782&r1=349781&r2=349782
==============================================================================
--- trunk/pbx/pbx_config.c (original)
+++ trunk/pbx/pbx_config.c Thu Jan  5 17:06:17 2012
@@ -1743,8 +1743,8 @@
 			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);
 			}




More information about the asterisk-commits mailing list