expand vars

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3786 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-12-21 20:48:09 +00:00
parent 803df51cd7
commit a8cf41acde
1 changed files with 10 additions and 0 deletions

View File

@ -4489,6 +4489,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
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) {
@ -4502,6 +4503,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
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_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
}
switch_clean_re(re);
switch_safe_free(expanded);
}
input = input->next;