aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-04 11:45:37 +0000
committerbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-04 11:45:37 +0000
commit5a28c09a6cbc3cf9d177467c75eb93ea7d4b2c19 (patch)
tree59ff776a3f8f1957c52114bc568a443a46ae9a99
parent4c3aabe7fa10b00e7b50f6a83978b8b8b93050f7 (diff)
Substitute variables in the post_process string (if it exists) before those variables could possibly disappear (channel hangup) #6462
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@11778 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_mixmonitor.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 1c3b49d99..0f5d101df 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -203,6 +203,17 @@ static void *mixmonitor_thread(void *obj)
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", name);
+ if (mixmonitor->post_process) {
+ char *p;
+
+ for (p = mixmonitor->post_process; *p ; p++) {
+ if (*p == '^' && *(p+1) == '{') {
+ *p = '$';
+ }
+ }
+ pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
+ }
+
while (1) {
struct ast_frame *next;
int write;
@@ -237,17 +248,6 @@ static void *mixmonitor_thread(void *obj)
ast_mutex_unlock(&spy.lock);
}
- if (mixmonitor->post_process) {
- char *p;
-
- for (p = mixmonitor->post_process; *p ; p++) {
- if (*p == '^' && *(p+1) == '{') {
- *p = '$';
- }
- }
- pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
- }
-
stopmon(mixmonitor->chan, &spy);
if (option_verbose > 1)