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
This commit is contained in:
parent
bb172c4719
commit
89cd305596
|
@ -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;
|
||||
|
||||
|
|
Reference in New Issue