allow space after filename in play_and_detect_speech

This commit is contained in:
Christopher Rienzo 2012-04-25 17:58:41 +00:00
parent 893d7eff9d
commit 65c4f76f40

View File

@ -464,6 +464,7 @@ SWITCH_STANDARD_APP(play_and_detect_speech_function)
char *lbuf = NULL;
const char *response = "DONE";
char *detect = NULL;
char *s;
switch_channel_set_variable(channel, "detect_speech_result", "");
@ -474,6 +475,12 @@ SWITCH_STANDARD_APP(play_and_detect_speech_function)
goto done;
}
/* trim any trailing space */
s = detect;
while (--s >= lbuf && switch_isspace(*s)) {
*s = '\0';
}
/* split input at "detect:" */
detect[0] = '\0';
detect += 7;