[asterisk-commits] moy: branch moy/mfcr2 r168053 - in /team/moy/mfcr2: ./ apps/ build_tools/ cdr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 9 11:37:03 CST 2009


Author: moy
Date: Fri Jan  9 11:37:01 2009
New Revision: 168053

URL: http://svn.digium.com/view/asterisk?view=rev&rev=168053
Log:
merged changes from trunk rev 168017

Added:
    team/moy/mfcr2/apps/app_originate.c
      - copied unchanged from r168017, trunk/apps/app_originate.c
    team/moy/mfcr2/configs/cli_permissions.conf.sample
      - copied unchanged from r168017, trunk/configs/cli_permissions.conf.sample
    team/moy/mfcr2/doc/api-1.6.2-changes.txt
      - copied unchanged from r168017, trunk/doc/api-1.6.2-changes.txt
    team/moy/mfcr2/funcs/func_audiohookinherit.c
      - copied unchanged from r168017, trunk/funcs/func_audiohookinherit.c
    team/moy/mfcr2/main/strings.c
      - copied unchanged from r168017, trunk/main/strings.c
Modified:
    team/moy/mfcr2/   (props changed)
    team/moy/mfcr2/.cleancount
    team/moy/mfcr2/CHANGES
    team/moy/mfcr2/UPGRADE-1.6.txt
    team/moy/mfcr2/apps/app_chanisavail.c
    team/moy/mfcr2/apps/app_chanspy.c
    team/moy/mfcr2/apps/app_dial.c
    team/moy/mfcr2/apps/app_directed_pickup.c
    team/moy/mfcr2/apps/app_directory.c
    team/moy/mfcr2/apps/app_disa.c
    team/moy/mfcr2/apps/app_dumpchan.c
    team/moy/mfcr2/apps/app_externalivr.c
    team/moy/mfcr2/apps/app_fax.c
    team/moy/mfcr2/apps/app_festival.c
    team/moy/mfcr2/apps/app_followme.c
    team/moy/mfcr2/apps/app_jack.c
    team/moy/mfcr2/apps/app_macro.c
    team/moy/mfcr2/apps/app_meetme.c
    team/moy/mfcr2/apps/app_minivm.c
    team/moy/mfcr2/apps/app_mixmonitor.c
    team/moy/mfcr2/apps/app_page.c
    team/moy/mfcr2/apps/app_playback.c
    team/moy/mfcr2/apps/app_queue.c
    team/moy/mfcr2/apps/app_record.c
    team/moy/mfcr2/apps/app_rpt.c
    team/moy/mfcr2/apps/app_sms.c
    team/moy/mfcr2/apps/app_speech_utils.c
    team/moy/mfcr2/apps/app_stack.c
    team/moy/mfcr2/apps/app_voicemail.c
    team/moy/mfcr2/build_tools/cflags-devmode.xml
    team/moy/mfcr2/cdr/cdr_adaptive_odbc.c
    team/moy/mfcr2/cdr/cdr_manager.c
    team/moy/mfcr2/cdr/cdr_pgsql.c
    team/moy/mfcr2/cdr/cdr_sqlite3_custom.c
    team/moy/mfcr2/channels/chan_agent.c
    team/moy/mfcr2/channels/chan_alsa.c
    team/moy/mfcr2/channels/chan_dahdi.c
    team/moy/mfcr2/channels/chan_features.c
    team/moy/mfcr2/channels/chan_iax2.c
    team/moy/mfcr2/channels/chan_local.c
    team/moy/mfcr2/channels/chan_misdn.c
    team/moy/mfcr2/channels/chan_oss.c
    team/moy/mfcr2/channels/chan_phone.c
    team/moy/mfcr2/channels/chan_sip.c
    team/moy/mfcr2/channels/chan_skinny.c
    team/moy/mfcr2/channels/chan_usbradio.c
    team/moy/mfcr2/channels/h323/README
    team/moy/mfcr2/channels/h323/ast_h323.cxx
    team/moy/mfcr2/channels/iax2-parser.c
    team/moy/mfcr2/channels/iax2-provision.c
    team/moy/mfcr2/channels/misdn_config.c
    team/moy/mfcr2/configs/extconfig.conf.sample
    team/moy/mfcr2/configs/extensions.conf.sample
    team/moy/mfcr2/configs/phoneprov.conf.sample
    team/moy/mfcr2/configs/queues.conf.sample
    team/moy/mfcr2/configs/sip.conf.sample
    team/moy/mfcr2/configs/voicemail.conf.sample
    team/moy/mfcr2/configure
    team/moy/mfcr2/configure.ac
    team/moy/mfcr2/contrib/asterisk-ng-doxygen
    team/moy/mfcr2/contrib/scripts/autosupport
    team/moy/mfcr2/contrib/scripts/autosupport.8
    team/moy/mfcr2/contrib/scripts/safe_asterisk
    team/moy/mfcr2/contrib/scripts/sip-friends.sql
    team/moy/mfcr2/doc/CODING-GUIDELINES
    team/moy/mfcr2/doc/appdocsxml.dtd
    team/moy/mfcr2/doc/janitor-projects.txt
    team/moy/mfcr2/doc/realtimetext.txt   (props changed)
    team/moy/mfcr2/doc/sip-retransmit.txt   (props changed)
    team/moy/mfcr2/doc/tex/cdrdriver.tex
    team/moy/mfcr2/doc/tex/misdn.tex
    team/moy/mfcr2/doc/tex/odbcstorage.tex
    team/moy/mfcr2/doc/tex/phoneprov.tex   (props changed)
    team/moy/mfcr2/doc/tex/qos.tex
    team/moy/mfcr2/formats/format_pcm.c
    team/moy/mfcr2/funcs/func_callerid.c
    team/moy/mfcr2/funcs/func_curl.c
    team/moy/mfcr2/funcs/func_cut.c
    team/moy/mfcr2/funcs/func_logic.c
    team/moy/mfcr2/funcs/func_odbc.c
    team/moy/mfcr2/funcs/func_realtime.c
    team/moy/mfcr2/funcs/func_strings.c
    team/moy/mfcr2/funcs/func_timeout.c
    team/moy/mfcr2/include/asterisk.h
    team/moy/mfcr2/include/asterisk/_private.h
    team/moy/mfcr2/include/asterisk/app.h
    team/moy/mfcr2/include/asterisk/astobj2.h
    team/moy/mfcr2/include/asterisk/audiohook.h
    team/moy/mfcr2/include/asterisk/autoconfig.h.in
    team/moy/mfcr2/include/asterisk/cdr.h
    team/moy/mfcr2/include/asterisk/channel.h
    team/moy/mfcr2/include/asterisk/cli.h
    team/moy/mfcr2/include/asterisk/doxyref.h
    team/moy/mfcr2/include/asterisk/features.h
    team/moy/mfcr2/include/asterisk/pbx.h
    team/moy/mfcr2/include/asterisk/pval.h
    team/moy/mfcr2/include/asterisk/stringfields.h
    team/moy/mfcr2/include/asterisk/strings.h
    team/moy/mfcr2/include/asterisk/tcptls.h
    team/moy/mfcr2/include/asterisk/threadstorage.h
    team/moy/mfcr2/include/asterisk/utils.h
    team/moy/mfcr2/main/Makefile
    team/moy/mfcr2/main/app.c
    team/moy/mfcr2/main/asterisk.c
    team/moy/mfcr2/main/astmm.c
    team/moy/mfcr2/main/astobj2.c
    team/moy/mfcr2/main/audiohook.c
    team/moy/mfcr2/main/autoservice.c
    team/moy/mfcr2/main/callerid.c
    team/moy/mfcr2/main/cdr.c
    team/moy/mfcr2/main/channel.c
    team/moy/mfcr2/main/cli.c
    team/moy/mfcr2/main/config.c
    team/moy/mfcr2/main/db.c
    team/moy/mfcr2/main/dnsmgr.c
    team/moy/mfcr2/main/editline/read.c
    team/moy/mfcr2/main/features.c
    team/moy/mfcr2/main/file.c
    team/moy/mfcr2/main/frame.c
    team/moy/mfcr2/main/http.c
    team/moy/mfcr2/main/indications.c
    team/moy/mfcr2/main/logger.c
    team/moy/mfcr2/main/manager.c
    team/moy/mfcr2/main/pbx.c
    team/moy/mfcr2/main/rtp.c
    team/moy/mfcr2/main/tcptls.c
    team/moy/mfcr2/main/threadstorage.c
    team/moy/mfcr2/main/translate.c
    team/moy/mfcr2/main/udptl.c
    team/moy/mfcr2/main/utils.c
    team/moy/mfcr2/main/xmldoc.c
    team/moy/mfcr2/pbx/ael/ael-test/ref.ael-vtest13
    team/moy/mfcr2/pbx/ael/ael-test/ref.ael-vtest17
    team/moy/mfcr2/pbx/pbx_ael.c
    team/moy/mfcr2/pbx/pbx_config.c
    team/moy/mfcr2/pbx/pbx_dundi.c
    team/moy/mfcr2/pbx/pbx_realtime.c
    team/moy/mfcr2/pbx/pbx_spool.c
    team/moy/mfcr2/phoneprov/polycom_line.xml   (props changed)
    team/moy/mfcr2/res/ael/ael.flex
    team/moy/mfcr2/res/ael/ael_lex.c
    team/moy/mfcr2/res/ael/pval.c
    team/moy/mfcr2/res/res_agi.c
    team/moy/mfcr2/res/res_clialiases.c
    team/moy/mfcr2/res/res_clioriginate.c
    team/moy/mfcr2/res/res_config_curl.c
    team/moy/mfcr2/res/res_config_ldap.c
    team/moy/mfcr2/res/res_config_odbc.c
    team/moy/mfcr2/res/res_config_pgsql.c
    team/moy/mfcr2/res/res_config_sqlite.c
    team/moy/mfcr2/res/res_convert.c
    team/moy/mfcr2/res/res_crypto.c
    team/moy/mfcr2/res/res_http_post.c   (contents, props changed)
    team/moy/mfcr2/res/res_indications.c
    team/moy/mfcr2/res/res_jabber.c
    team/moy/mfcr2/res/res_monitor.c
    team/moy/mfcr2/res/res_musiconhold.c
    team/moy/mfcr2/res/res_odbc.c
    team/moy/mfcr2/res/res_phoneprov.c   (contents, props changed)
    team/moy/mfcr2/res/res_realtime.c
    team/moy/mfcr2/res/res_timing_pthread.c
    team/moy/mfcr2/res/snmp/agent.c
    team/moy/mfcr2/utils/   (props changed)
    team/moy/mfcr2/utils/Makefile
    team/moy/mfcr2/utils/ael_main.c
    team/moy/mfcr2/utils/check_expr.c
    team/moy/mfcr2/utils/conf2ael.c
    team/moy/mfcr2/utils/extconf.c
    team/moy/mfcr2/utils/hashtest.c
    team/moy/mfcr2/utils/hashtest2.c
    team/moy/mfcr2/utils/refcounter.c
    team/moy/mfcr2/utils/smsq.c

Propchange: team/moy/mfcr2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/moy/mfcr2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: team/moy/mfcr2/.cleancount
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/.cleancount?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/.cleancount (original)
+++ team/moy/mfcr2/.cleancount Fri Jan  9 11:37:01 2009
@@ -1,1 +1,1 @@
-35
+36

Modified: team/moy/mfcr2/CHANGES
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/CHANGES?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/CHANGES (original)
+++ team/moy/mfcr2/CHANGES Fri Jan  9 11:37:01 2009
@@ -25,10 +25,26 @@
    remote services. For backwards compatibility, "secret" still has the
    same function as before, but now you can configure both a remote secret and a
    local secret for mutual authentication.
+ * Added a new 'faxdetect=yes|no' configuration option to sip.conf.  When this
+   option is enabled, a SIP channel will go to the fax extension (if it exists)
+   after T38 is negotiated.  This option is disabled by default.
+ * If ATTENDED_TRANSFER_COMPLETE_SOUND is set, the sound will be played to the
+   target of an attended transfer
+ * Added two new configuration options, "qualifygap" and "qualifypeers", which allow
+   finer control over how many peers Asterisk will qualify and the gap between them
+   when all peers need to be qualified at the same time.
+ * Added a new 'ignoresdpversion' option to sip.conf.  When this is enabled
+   (either globally or for a specific peer), chan_sip will treat any SDP data
+   it receives as new data and update the media stream accordingly.  By
+   default, Asterisk will only modify the media stream if the SDP session
+   version received is different from the current SDP session version.  This
+   option is required to interoperate with devices that have non-standard SDP
+   session version implementations (observed with Microsoft OCS).  This option
+   is diabled by default.
 
 Skinny Changes
 --------------
- * The configuration file now holds seperate sections for devices and lines.
+ * The configuration file now holds separate sections for devices and lines.
    Please have a look at configs/skinny.conf.sample and change your skinny.conf
    accordingly.
 
@@ -52,9 +68,16 @@
    and FIELDQTY dialplan functions, which also manage lists.
  * Added REALTIME_FIELD and REALTIME_HASH, which should aid users in better
    obtaining realtime data from the dialplan.
+ * Added LOCAL_PEEK, which I have no idea how to use, but Leif Madsen wanted it.
+   Russell says it's, like, a scope resolution function for LOCAL variables.
+   Totally.  Hopefully, that means more to you than it does to me.
+ * Added AUDIOHOOK_INHERIT. For information on its use, please see the output
+   of "core show function AUDIOHOOK_INHERIT" from the CLI
 
 Applications
 ------------
+ * DAHDISendCallreroutingFacility parameters are now comma-separated,
+   instead of the old pipe.
  * Scheduled meetme conferences may now have their end times extended by
    using MeetMeAdmin.
  * app_authenticate now gives the ability to select a prompt other than
@@ -62,9 +85,13 @@
  * app_directory now pays attention to the searchcontexts setting in
    voicemail.conf and will look through all contexts, if no context is
    specified in the initial argument.
+ * A new application, Originate, has been introduced, that allows asynchronous
+   call origination from the dialplan.
 
 Miscellaneous
 -------------
+ * The Asterisk CLI has a new command, "channel redirect", which is similar in
+   operation to the AMI Redirect action.
  * res_jabber: autoprune has been disabled by default, to avoid misconfiguration 
    that would end up being interpreted as a bug once Asterisk started removing 
    the contacts from a user list.
@@ -77,6 +104,16 @@
    which are interpreted as relative to the astvarlibdir setting in asterisk.conf.
  * All deprecated CLI commands are removed from the sourcecode. They are now handled
    by the new clialiases module. See cli_aliases.conf.sample file.
+ * Times within timespecs are now accurate down to the minute.  This is a change
+   from historical Asterisk, which only provided timespecs rounded to the nearest
+   even (read: evenly divisible by 2) minute mark.
+ * The realtime switch now supports an option flag, 'p', which disables searches for
+   pattern matches.
+ * In addition to a time range and date range, timespecs now accept a 5th optional
+   argument, timezone.  This allows you to perform time checks on alternate
+   timezones, especially if those daylight savings time ranges vary from your
+   machine's native timezone.  See GotoIfTime, ExecIfTime, IFTIME(), and timed
+   includes.
 
 Asterisk Manager Interface
 --------------------------
@@ -402,6 +439,12 @@
 
 CLI Changes
 -----------
+  * Added CLI permissions, config file: cli_permissions.conf
+     default is to allow all commands for every local user/group.
+     Also this new feature added three new CLI commands:
+      - cli check permissions {<username>|@<groupname>|<username>@<groupname>} [<command>]
+      - cli reload permissions
+      - cli show permissions
   * New CLI command "core show hint" (usage: core show hint <exten>)
   * New CLI command "core show settings"
   * Added 'core show channels count' CLI command.
@@ -680,8 +723,12 @@
     is typically placed.
   * The configuration method for the "joinempty" and "leavewhenempty" options has
     changed to a comma-separated list of methods of determining member availability
-	instead of vague terms such as "yes," "loose," "no," and "strict." These old four
-	values are still accepted for backwards-compatibility, though.
+    instead of vague terms such as "yes," "loose," "no," and "strict." These old four
+    values are still accepted for backwards-compatibility, though.
+  * The average talktime is now calculated on queues. This information is reported via the
+    CLI commands "queue show" and "queues show"; through the AMI events AgentComplete, QueueSummary,
+    and QueueParams; and through the channelvariable QUEUETALKTIME if setinterfacevar=yes is set for
+    the queue.
 
 MeetMe Changes
 --------------

Modified: team/moy/mfcr2/UPGRADE-1.6.txt
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/UPGRADE-1.6.txt?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/UPGRADE-1.6.txt (original)
+++ team/moy/mfcr2/UPGRADE-1.6.txt Fri Jan  9 11:37:01 2009
@@ -66,6 +66,11 @@
   arguments of AGI applications.  After converting to use the ',' delimiter,
   change this option to res_agi=1.6.
 
+* As a side effect of the application delimiter change, many places that used
+  to need quotes in order to get the proper meaning are no longer required.
+  You now only need to quote strings in configuration files if you literally
+  want quotation marks within a string.
+
 * The logger.conf option 'rotatetimestamp' has been deprecated in favor of
   'rotatestrategy'.  This new option supports a 'rotate' strategy that more
   closely mimics the system logger in terms of file rotation.

Modified: team/moy/mfcr2/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_chanisavail.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_chanisavail.c (original)
+++ team/moy/mfcr2/apps/app_chanisavail.c Fri Jan  9 11:37:01 2009
@@ -160,13 +160,13 @@
 				status = inuse = ast_device_state(trychan);
 			}
 			if ((inuse <= 1) && (tempchan = ast_request(tech, chan->nativeformats, number, &status))) {
-					ast_str_append(&tmp_availchan, 0, "%s%s", tmp_availchan->used ? "&" : "", tempchan->name);
+					ast_str_append(&tmp_availchan, 0, "%s%s", ast_str_strlen(tmp_availchan) ? "&" : "", tempchan->name);
 					
 					snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
-					ast_str_append(&tmp_availorig, 0, "%s%s", tmp_availorig->used ? "&" : "", tmp);
+					ast_str_append(&tmp_availorig, 0, "%s%s", ast_str_strlen(tmp_availorig) ? "&" : "", tmp);
 
 					snprintf(tmp, sizeof(tmp), "%d", status);
-					ast_str_append(&tmp_availstat, 0, "%s%s", tmp_availstat->used ? "&" : "", tmp);
+					ast_str_append(&tmp_availstat, 0, "%s%s", ast_str_strlen(tmp_availstat) ? "&" : "", tmp);
 
 					ast_hangup(tempchan);
 					tempchan = NULL;
@@ -176,16 +176,16 @@
 					}
 			} else {
 				snprintf(tmp, sizeof(tmp), "%d", status);
-				ast_str_append(&tmp_availstat, 0, "%s%s", tmp_availstat->used ? "&" : "", tmp);
+				ast_str_append(&tmp_availstat, 0, "%s%s", ast_str_strlen(tmp_availstat) ? "&" : "", tmp);
 			}
 			cur = rest;
 		} while (cur);
 	}
 
-	pbx_builtin_setvar_helper(chan, "AVAILCHAN", tmp_availchan->str);
+	pbx_builtin_setvar_helper(chan, "AVAILCHAN", ast_str_buffer(tmp_availchan));
 	/* Store the originally used channel too */
-	pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", tmp_availorig->str);
-	pbx_builtin_setvar_helper(chan, "AVAILSTATUS", tmp_availstat->str);
+	pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", ast_str_buffer(tmp_availorig));
+	pbx_builtin_setvar_helper(chan, "AVAILSTATUS", ast_str_buffer(tmp_availstat));
 
 	return 0;
 }

Modified: team/moy/mfcr2/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_chanspy.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_chanspy.c (original)
+++ team/moy/mfcr2/apps/app_chanspy.c Fri Jan  9 11:37:01 2009
@@ -611,14 +611,19 @@
 	ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
 	ast_channel_unlock(chan);
 
-	ast_audiohook_lock(&csth.whisper_audiohook);
-	ast_audiohook_detach(&csth.whisper_audiohook);
-	ast_audiohook_unlock(&csth.whisper_audiohook);
-	ast_audiohook_destroy(&csth.whisper_audiohook);
-	ast_audiohook_lock(&csth.bridge_whisper_audiohook);
-	ast_audiohook_detach(&csth.bridge_whisper_audiohook);
-	ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
-	ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
+	if (ast_test_flag(flags, OPTION_WHISPER)) {
+		ast_audiohook_lock(&csth.whisper_audiohook);
+		ast_audiohook_detach(&csth.whisper_audiohook);
+		ast_audiohook_unlock(&csth.whisper_audiohook);
+		ast_audiohook_destroy(&csth.whisper_audiohook);
+	}
+
+	if (ast_test_flag(flags, OPTION_BARGE)) {
+		ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+		ast_audiohook_detach(&csth.bridge_whisper_audiohook);
+		ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+		ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
+	}
 
 	ast_audiohook_lock(&csth.spy_audiohook);
 	ast_audiohook_detach(&csth.spy_audiohook);
@@ -755,7 +760,7 @@
 	char *ptr;
 	int num;
 	int num_spyed_upon = 1;
-	struct chanspy_ds chanspy_ds;
+	struct chanspy_ds chanspy_ds = { 0, };
 
 	if (ast_test_flag(flags, OPTION_EXIT)) {
 		const char *c;

Modified: team/moy/mfcr2/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_dial.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_dial.c (original)
+++ team/moy/mfcr2/apps/app_dial.c Fri Jan  9 11:37:01 2009
@@ -1991,6 +1991,10 @@
 			theapp = pbx_findapp("Macro");
 
 			if (theapp && !res) { /* XXX why check res here ? */
+				/* Set peer->exten and peer->context so that MACRO_EXTEN and MACRO_CONTEXT get set */
+				ast_copy_string(peer->context, chan->context, sizeof(peer->context));
+				ast_copy_string(peer->exten, chan->exten, sizeof(peer->exten));
+
 				replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_MACRO]);
 				res = pbx_exec(peer, theapp, opt_args[OPT_ARG_CALLEE_MACRO]);
 				ast_debug(1, "Macro exited with status %d\n", res);
@@ -2081,14 +2085,19 @@
 
 				if (gosub_args) {
 					res9 = pbx_exec(peer, theapp, gosub_args);
-					ast_pbx_run(peer);
+					if (!res9) {
+						struct ast_pbx_args args;
+						/* A struct initializer fails to compile for this case ... */
+						memset(&args, 0, sizeof(args));
+						args.no_hangup_chan = 1;
+						ast_pbx_run_args(peer, &args);
+					}
 					ast_free(gosub_args);
-					if (option_debug)
-						ast_log(LOG_DEBUG, "Gosub exited with status %d\n", res9);
-				} else
+					ast_debug(1, "Gosub exited with status %d\n", res9);
+				} else {
 					ast_log(LOG_ERROR, "Could not Allocate string for Gosub arguments -- Gosub Call Aborted!\n");
-
-				res9 = 0;
+				}
+
 			} else if (!res9) {
 				ast_log(LOG_ERROR, "Could not find application Gosub\n");
 				res9 = -1;
@@ -2209,14 +2218,9 @@
 			res = ast_bridge_call(chan, peer, &config);
 		}
 
-		if (res != AST_PBX_NO_HANGUP_PEER_PARKED && ast_test_flag64(&opts, OPT_PEER_H)) {
-			ast_log(LOG_NOTICE, "PEER context: %s; PEER exten: %s;  PEER priority: %d\n",
-				peer->context, peer->exten, peer->priority);
-		}
-		if (res != AST_PBX_NO_HANGUP_PEER_PARKED)
-			strcpy(peer->context, chan->context);
-
-		if (res != AST_PBX_NO_HANGUP_PEER_PARKED && ast_test_flag64(&opts, OPT_PEER_H) && ast_exists_extension(peer, peer->context, "h", 1, peer->cid.cid_num)) {
+		strcpy(peer->context, chan->context);
+
+		if (ast_test_flag64(&opts, OPT_PEER_H) && ast_exists_extension(peer, peer->context, "h", 1, peer->cid.cid_num)) {
 			int autoloopflag;
 			int found;
 			int res9;
@@ -2236,41 +2240,34 @@
 			}
 			ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP);  /* set it back the way it was */
 		}
-		if (res != AST_PBX_NO_HANGUP_PEER && res != AST_PBX_NO_HANGUP_PEER_PARKED) {
-			if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON) && !ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {		
-				replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
-				ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
-				ast_pbx_start(peer);
-			} else {
-				if (!ast_check_hangup(chan))
-					chan->hangupcause = peer->hangupcause;
-				ast_hangup(peer);
-			}
+		if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON) && !ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {		
+			replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+			ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
+			ast_pbx_start(peer);
+		} else {
+			if (!ast_check_hangup(chan))
+				chan->hangupcause = peer->hangupcause;
+			ast_hangup(peer);
 		}
 	}
 out:
-	/* cleaning up chan is not a good idea here if AST_PBX_KEEPALIVE
-	   is returned; chan will get the love it needs from another
-	   thread */
-	if (res != AST_PBX_KEEPALIVE) {
-		if (moh) {
-			moh = 0;
-			ast_moh_stop(chan);
-		} else if (sentringing) {
-			sentringing = 0;
-			ast_indicate(chan, -1);
-		}
-		ast_channel_early_bridge(chan, NULL);
-		hanguptree(outgoing, NULL, 0); /* In this case, there's no answer anywhere */
-		pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
-		senddialendevent(chan, pa.status);
-		ast_debug(1, "Exiting with DIALSTATUS=%s.\n", pa.status);
-
-		if ((ast_test_flag64(peerflags, OPT_GO_ON)) && !ast_check_hangup(chan) && (res != AST_PBX_KEEPALIVE) && (res != AST_PBX_INCOMPLETE)) {
-			if (!ast_tvzero(calldurationlimit))
-				memset(&chan->whentohangup, 0, sizeof(chan->whentohangup));
-			res = 0;
-		}
+	if (moh) {
+		moh = 0;
+		ast_moh_stop(chan);
+	} else if (sentringing) {
+		sentringing = 0;
+		ast_indicate(chan, -1);
+	}
+	ast_channel_early_bridge(chan, NULL);
+	hanguptree(outgoing, NULL, 0); /* In this case, there's no answer anywhere */
+	pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
+	senddialendevent(chan, pa.status);
+	ast_debug(1, "Exiting with DIALSTATUS=%s.\n", pa.status);
+	
+	if ((ast_test_flag64(peerflags, OPT_GO_ON)) && !ast_check_hangup(chan) && (res != AST_PBX_INCOMPLETE)) {
+		if (!ast_tvzero(calldurationlimit))
+			memset(&chan->whentohangup, 0, sizeof(chan->whentohangup));
+		res = 0;
 	}
 
 done:
@@ -2426,7 +2423,7 @@
 	if (!con)
 		ast_log(LOG_ERROR, "Dial virtual context 'app_dial_gosub_virtual_context' does not exist and unable to create\n");
 	else
-		ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free_ptr, "app_dial");
+		ast_add_extension2(con, 1, "s", 1, NULL, NULL, "NoOp", ast_strdup(""), ast_free_ptr, "app_dial");
 
 	res = ast_register_application_xml(app, dial_exec);
 	res |= ast_register_application_xml(rapp, retrydial_exec);

Modified: team/moy/mfcr2/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_directed_pickup.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_directed_pickup.c (original)
+++ team/moy/mfcr2/apps/app_directed_pickup.c Fri Jan  9 11:37:01 2009
@@ -115,7 +115,7 @@
 /* Helper function that determines whether a channel is capable of being picked up */
 static int can_pickup(struct ast_channel *chan)
 {
-	if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING))
+	if (!chan->pbx && (chan->_state == AST_STATE_RINGING || chan->_state == AST_STATE_RING || chan->_state == AST_STATE_DOWN))
 		return 1;
 	else
 		return 0;

Modified: team/moy/mfcr2/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_directory.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_directory.c (original)
+++ team/moy/mfcr2/apps/app_directory.c Fri Jan  9 11:37:01 2009
@@ -437,6 +437,9 @@
 			if (!(cat = ast_category_new(context, "", 99999))) {
 				ast_log(LOG_WARNING, "Out of memory\n");
 				ast_config_destroy(cfg);
+				if (rtdata) {
+					ast_config_destroy(rtdata);
+				}
 				return NULL;
 			}
 			ast_category_append(cfg, cat);

Modified: team/moy/mfcr2/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_disa.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_disa.c (original)
+++ team/moy/mfcr2/apps/app_disa.c Fri Jan  9 11:37:01 2009
@@ -303,8 +303,14 @@
 					continue;
 				}
 			} else {
-				if (j == '#') { /* end of extension */
-					break;
+				if (j == '#') { /* end of extension .. maybe */
+					if (i == 0 && 
+							(ast_matchmore_extension(chan, args.context, "#", 1, chan->cid.cid_num) ||
+							 ast_exists_extension(chan, args.context, "#", 1, chan->cid.cid_num)) ) {
+						/* Let the # be the part of, or the entire extension */
+					} else {
+						break;
+					}
 				}
 			}
 

Modified: team/moy/mfcr2/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_dumpchan.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_dumpchan.c (original)
+++ team/moy/mfcr2/apps/app_dumpchan.c Fri Jan  9 11:37:01 2009
@@ -35,6 +35,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/channel.h"
+#include "asterisk/app.h"
 
 /*** DOCUMENTATION
 	<application name="DumpChan" language="en_US">
@@ -148,7 +149,7 @@
 
 static int dumpchan_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_str *vars = ast_str_alloca(BUFSIZ * 4); /* XXX very large! */
+	struct ast_str *vars = ast_str_thread_get(&global_app_buf, 16);
 	char info[1024];
 	int level = 0;
 	static char *line = "================================================================================";
@@ -156,10 +157,11 @@
 	if (!ast_strlen_zero(data))
 		level = atoi(data);
 
-	pbx_builtin_serialize_variables(chan, &vars);
-	serialize_showchan(chan, info, sizeof(info));
-	if (option_verbose >= level)
-		ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars->str, line);
+	if (option_verbose >= level) {
+		serialize_showchan(chan, info, sizeof(info));
+		pbx_builtin_serialize_variables(chan, &vars);
+		ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, ast_str_buffer(vars), line);
+	}
 
 	return 0;
 }

Modified: team/moy/mfcr2/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_externalivr.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_externalivr.c (original)
+++ team/moy/mfcr2/apps/app_externalivr.c Fri Jan  9 11:37:01 2009
@@ -122,8 +122,8 @@
 		ast_str_append(&tmp, 0, ",%s", data);
 	}
 
-	fprintf(handle, "%s\n", tmp->str);
-	ast_debug(1, "sent '%s'\n", tmp->str);
+	fprintf(handle, "%s\n", ast_str_buffer(tmp));
+	ast_debug(1, "sent '%s'\n", ast_str_buffer(tmp));
 }
 
 static void *gen_alloc(struct ast_channel *chan, void *params)
@@ -276,7 +276,7 @@
 
 		ast_str_append(&newstring, 0, "%s=%s,", variable, value);
 		ast_channel_unlock(chan);
-		ast_copy_string(outbuf, newstring->str, outbuflen);
+		ast_copy_string(outbuf, ast_str_buffer(newstring), outbuflen);
 	}
 }
 
@@ -659,7 +659,8 @@
  				continue;
   
 			if (input[0] == 'P') {
- 				send_eivr_event(eivr_events, 'P', args->str, chan);
+				struct ast_str *tmp = (struct ast_str *) args;
+ 				send_eivr_event(eivr_events, 'P', ast_str_buffer(tmp), chan);
 			} else if ( input[0] == 'T' ) {
 				ast_chan_log(LOG_WARNING, chan, "Answering channel if needed and starting generator\n");
 				if (chan->_state != AST_STATE_UP) {

Modified: team/moy/mfcr2/apps/app_fax.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_fax.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_fax.c (original)
+++ team/moy/mfcr2/apps/app_fax.c Fri Jan  9 11:37:01 2009
@@ -29,6 +29,9 @@
 #include <tiffio.h>
 
 #include <spandsp.h>
+#ifdef HAVE_SPANDSP_EXPOSE_H
+#include <spandsp/expose.h>
+#endif
 #include <spandsp/version.h>
 
 #include "asterisk/lock.h"

Modified: team/moy/mfcr2/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_festival.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_festival.c (original)
+++ team/moy/mfcr2/apps/app_festival.c Fri Jan  9 11:37:01 2009
@@ -129,7 +129,6 @@
 	int res;
 #ifdef __PPC__ 
 	char c;
-	int x;
 #endif
 
 	res = ast_safe_fork(0);

Modified: team/moy/mfcr2/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_followme.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_followme.c (original)
+++ team/moy/mfcr2/apps/app_followme.c Fri Jan  9 11:37:01 2009
@@ -960,9 +960,8 @@
 		}
 		/* This one has to exist; it was part of the query */
 		ordstr = ast_variable_retrieve(cfg, catg, "ordinal");
-		ast_str_make_space(&str, strlen(numstr) + 1);
-		ast_copy_string(str->str, numstr, str->len);
-		if ((cur = create_followme_number(str->str, timeout, atoi(ordstr)))) {
+		ast_str_set(&str, 0, "%s", numstr);
+		if ((cur = create_followme_number(ast_str_buffer(str), timeout, atoi(ordstr)))) {
 			AST_LIST_INSERT_TAIL(&new->numbers, cur, entry);
 		}
 	}
@@ -1074,6 +1073,11 @@
 	}
 	ast_mutex_unlock(&f->lock);
 
+	/* Answer the call */
+	if (chan->_state != AST_STATE_UP) {
+		ast_answer(chan);
+	}
+
 	if (ast_test_flag(&targs.followmeflags, FOLLOWMEFLAG_STATUSMSG)) 
 		ast_stream_and_wait(chan, targs.statusprompt, "");
 

Modified: team/moy/mfcr2/apps/app_jack.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_jack.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_jack.c (original)
+++ team/moy/mfcr2/apps/app_jack.c Fri Jan  9 11:37:01 2009
@@ -182,7 +182,7 @@
 			ast_str_append(&str, 0, ", %s", jack_status_to_str((1 << i)));
 	}
 	
-	ast_log(LOG_NOTICE, "%s: %s\n", prefix, str->str);
+	ast_log(LOG_NOTICE, "%s: %s\n", prefix, ast_str_buffer(str));
 }
 
 static int alloc_resampler(struct jack_data *jack_data, int input)

Modified: team/moy/mfcr2/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_macro.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_macro.c (original)
+++ team/moy/mfcr2/apps/app_macro.c Fri Jan  9 11:37:01 2009
@@ -155,6 +155,31 @@
 static char *exclusive_app = "MacroExclusive";
 static char *exit_app = "MacroExit";
 
+static void macro_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan);
+
+struct ast_datastore_info macro_ds_info = {
+	.type = "MACRO",
+	.chan_fixup = macro_fixup,
+};
+
+static void macro_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
+{
+	int i;
+	char varname[10];
+	pbx_builtin_setvar_helper(new_chan, "MACRO_DEPTH", "0");
+	pbx_builtin_setvar_helper(new_chan, "MACRO_CONTEXT", NULL);
+	pbx_builtin_setvar_helper(new_chan, "MACRO_EXTEN", NULL);
+	pbx_builtin_setvar_helper(new_chan, "MACRO_PRIORITY", NULL);
+	pbx_builtin_setvar_helper(new_chan, "MACRO_OFFSET", NULL);
+	for (i = 1; i < 100; i++) {
+		snprintf(varname, sizeof(varname), "ARG%d", i);
+		while (pbx_builtin_getvar_helper(new_chan, varname)) {
+			/* Kill all levels of arguments */
+			pbx_builtin_setvar_helper(new_chan, varname, NULL);
+		}
+	}
+}
+
 static struct ast_exten *find_matching_priority(struct ast_context *c, const char *exten, int priority, const char *callerid)
 {
 	struct ast_exten *e;
@@ -209,17 +234,31 @@
 	const char *inhangupc;
 	int offset, depth = 0, maxdepth = 7;
 	int setmacrocontext=0;
-	int autoloopflag, dead = 0, inhangup = 0;
+	int autoloopflag, inhangup = 0;
   
 	char *save_macro_exten;
 	char *save_macro_context;
 	char *save_macro_priority;
 	char *save_macro_offset;
+	struct ast_datastore *macro_store = ast_channel_datastore_find(chan, &macro_ds_info, NULL);
  
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Macro() requires arguments. See \"core show application macro\" for help.\n");
 		return -1;
 	}
+
+	do {
+		if (macro_store) {
+			break;
+		}
+		if (!(macro_store = ast_datastore_alloc(&macro_ds_info, NULL))) {
+			ast_log(LOG_WARNING, "Unable to allocate new datastore.\n");
+			break;
+		}
+		/* Just the existence of this datastore is enough. */
+		macro_store->inheritance = DATASTORE_INHERIT_FOREVER;
+		ast_channel_datastore_add(chan, macro_store);
+	} while (0);
 
 	/* does the user want a deeper rabbit hole? */
 	ast_channel_lock(chan);
@@ -367,15 +406,9 @@
 			case MACRO_EXIT_RESULT:
 				res = 0;
 				goto out;
-			case AST_PBX_KEEPALIVE:
-				ast_debug(2, "Spawn extension (%s,%s,%d) exited KEEPALIVE in macro %s on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
-				ast_verb(2, "Spawn extension (%s, %s, %d) exited KEEPALIVE in macro '%s' on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
-				goto out;
-				break;
 			default:
 				ast_debug(2, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
 				ast_verb(2, "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
-				dead = 1;
 				goto out;
 			}
 		}
@@ -448,31 +481,30 @@
 		chan->priority++;
   	}
 	out:
+
+	/* Don't let the channel change now. */
+	ast_channel_lock(chan);
+
 	/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
 	snprintf(depthc, sizeof(depthc), "%d", depth);
-	if (!dead) {
-		pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
-		ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
-	}
+	pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
+	ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
 
   	for (x = 1; x < argc; x++) {
   		/* Restore old arguments and delete ours */
 		snprintf(varname, sizeof(varname), "ARG%d", x);
   		if (oldargs[x]) {
-			if (!dead)
-				pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
+			pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
 			ast_free(oldargs[x]);
-		} else if (!dead) {
+		} else {
 			pbx_builtin_setvar_helper(chan, varname, NULL);
 		}
   	}
 
 	/* Restore macro variables */
-	if (!dead) {
-		pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
-		pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
-		pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
-	}
+	pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
+	pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
+	pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
 	if (save_macro_exten)
 		ast_free(save_macro_exten);
 	if (save_macro_context)
@@ -480,13 +512,13 @@
 	if (save_macro_priority)
 		ast_free(save_macro_priority);
 
-	if (!dead && setmacrocontext) {
+	if (setmacrocontext) {
 		chan->macrocontext[0] = '\0';
 		chan->macroexten[0] = '\0';
 		chan->macropriority = 0;
 	}
 
-	if (!dead && !strcasecmp(chan->context, fullmacro)) {
+	if (!strcasecmp(chan->context, fullmacro)) {
   		/* If we're leaving the macro normally, restore original information */
 		chan->priority = oldpriority;
 		ast_copy_string(chan->context, oldcontext, sizeof(chan->context));
@@ -494,7 +526,6 @@
 			/* Copy the extension, so long as we're not in softhangup, where we could be given an asyncgoto */
 			const char *offsets;
 			ast_copy_string(chan->exten, oldexten, sizeof(chan->exten));
-			ast_channel_lock(chan);
 			if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) {
 				/* Handle macro offset if it's set by checking the availability of step n + offset + 1, otherwise continue
 			   	normally if there is any problem */
@@ -504,12 +535,10 @@
 					}
 				}
 			}
-			ast_channel_unlock(chan);
-		}
-	}
-
-	if (!dead)
-		pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
+		}
+	}
+
+	pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
 	if (save_macro_offset)
 		ast_free(save_macro_offset);
 
@@ -521,6 +550,7 @@
 			res = 0;
 		}
 	}
+	ast_channel_unlock(chan);
 
 	return res;
 }

Modified: team/moy/mfcr2/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/moy/mfcr2/apps/app_meetme.c?view=diff&rev=168053&r1=168052&r2=168053
==============================================================================
--- team/moy/mfcr2/apps/app_meetme.c (original)
+++ team/moy/mfcr2/apps/app_meetme.c Fri Jan  9 11:37:01 2009
@@ -518,6 +518,8 @@
 	CONFFLAG_KICK_CONTINUE = (1 << 28),
 	CONFFLAG_DURATION_STOP = (1 << 29),
 	CONFFLAG_DURATION_LIMIT = (1 << 30),
+	/*! Do not write any audio to this channel until the state is up. */
+	CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31),
 };
 
 enum {
@@ -1258,7 +1260,7 @@
 			min = ((now - cnf->start) % 3600) / 60;
 			sec = (now - cnf->start) % 60;
 			if (!concise) {
-				ast_cli(a->fd, MC_DATA_FORMAT, cnf->confno, cnf->users, cmdline->str, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
+				ast_cli(a->fd, MC_DATA_FORMAT, cnf->confno, cnf->users, ast_str_buffer(cmdline), hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static", cnf->locked ? "Yes" : "No");
 			} else {
 				ast_cli(a->fd, "%s!%d!%d!%02d:%02d:%02d!%d!%d\n",
 					cnf->confno,
@@ -1343,9 +1345,9 @@
 		return CLI_SHOWUSAGE;
 	}
 
-	ast_debug(1, "Cmdline: %s\n", cmdline->str);
-
-	admin_exec(NULL, cmdline->str);
+	ast_debug(1, "Cmdline: %s\n", ast_str_buffer(cmdline));
+
+	admin_exec(NULL, ast_str_buffer(cmdline));
 	ast_free(cmdline);
 
 	return CLI_SUCCESS;
@@ -1433,9 +1435,9 @@
 		return CLI_SHOWUSAGE;
 	}
 
-	ast_debug(1, "Cmdline: %s\n", cmdline->str);
-

[... 21650 lines stripped ...]



More information about the asterisk-commits mailing list