MODAPP-273

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13298 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2009-05-14 01:41:54 +00:00
parent fc4e62b09a
commit 165e3f738c
1 changed files with 17 additions and 1 deletions

View File

@ -1807,6 +1807,7 @@ SWITCH_STANDARD_APP(phrase_function)
char *mydata = NULL;
switch_input_args_t args = { 0 };
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_status_t status;
if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) {
const char *lang;
@ -1825,7 +1826,22 @@ SWITCH_STANDARD_APP(phrase_function)
switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "" );
switch_ivr_phrase_macro(session, macro, mdata, lang, &args);
status = switch_ivr_phrase_macro(session, macro, mdata, lang, &args);
} else {
status = SWITCH_STATUS_NOOP;
}
switch (status) {
case SWITCH_STATUS_SUCCESS:
case SWITCH_STATUS_BREAK:
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "PHRASE PLAYED");
break;
case SWITCH_STATUS_NOOP:
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "NOTHING");
break;
default:
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "UNKNOWN ERROR");
break;
}
}