don't pass audio until the call has been acked if configured to do so (bug #3677)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-04-05 08:32:04 +00:00
parent d54b330a2e
commit 6bee09440d
2 changed files with 8 additions and 0 deletions

View File

@@ -367,6 +367,11 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
ast_frfree(f);
f = NULL;
}
if (f && (f->frametype == AST_FRAME_VOICE) && !p->acknowledged) {
/* Don't pass along agent audio until call is acknowledged */
ast_frfree(f);
f = &null_frame;
}
CLEANUP(ast,p);
ast_mutex_unlock(&p->lock);
if (recordagentcalls && f == &answer_frame)