[Freeswitch-svn] [commit] r3786 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Thu Dec 21 15:48:09 EST 2006
Author: anthm
Date: Thu Dec 21 15:48:09 2006
New Revision: 3786
Modified:
freeswitch/trunk/src/switch_ivr.c
Log:
expand vars
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Thu Dec 21 15:48:09 2006
@@ -4489,6 +4489,7 @@
int proceed = 0, ovector[30];
char substituted[1024] = "";
char *odata = NULL;
+ char *expanded = NULL;
if ((proceed = switch_perform_regex(data, pattern, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
for (action = switch_xml_child(input, "action"); action; action = action->next) {
@@ -4501,7 +4502,15 @@
} else {
odata = adata;
}
+
+ expanded = switch_channel_expand_variables(channel, odata);
+ if (expanded == odata) {
+ expanded = NULL;
+ } else {
+ odata = expanded;
+ }
+
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Handle %s:[%s] (%s)\n", func, odata, lang);
if (!strcasecmp(func, "play-file")) {
@@ -4556,6 +4565,7 @@
}
switch_clean_re(re);
+ switch_safe_free(expanded);
}
input = input->next;
More information about the Freeswitch-svn
mailing list