aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_speech_utils.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-15 15:30:21 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-15 15:30:21 +0000
commit89cd305596599292669ad7196d19acbac1b04b81 (patch)
tree7a7db4f2e9805fda03dbde80bde2dcb082f8f506 /apps/app_speech_utils.c
parentbb172c47194e22b8efa6b3d6b2bcd8fa07e84997 (diff)
Make sure that the channel is answered before doing SpeechBackground. (issue #josh-wait-I-dont-have-issue-numbers)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@27194 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_speech_utils.c')
-rw-r--r--apps/app_speech_utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index 8b1194c39..94c48668f 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -512,6 +512,12 @@ static int speech_background(struct ast_channel *chan, void *data)
return -1;
}
+ /* If channel is not already answered, then answer it */
+ if (chan->_state != AST_STATE_UP && ast_answer(chan)) {
+ LOCAL_USER_REMOVE(u);
+ return -1;
+ }
+
/* Record old read format */
oldreadformat = chan->readformat;