]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
don't pass audio until the call has been acked if configured to do so (bug #3677)
authorRussell Bryant <russell@russellbryant.com>
Tue, 5 Apr 2005 08:32:04 +0000 (08:32 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 5 Apr 2005 08:32:04 +0000 (08:32 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5400 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
channels/chan_agent.c

diff --git a/CHANGES b/CHANGES
index ffbb657d29010bb2c9d28a6694e287d586bd84ae..3b1521c20535478e2621f86d1c263e063845738b 100755 (executable)
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,9 @@
  -- chan_mgcp
     -- Fixed setting of accountcode
     -- Fixed where *67 to block callerid only worked for first call
+ -- chan_agent
+    -- We now will not pass audio until the agent has acked the call if the configuration
+       is set up for the agent to do so.
  -- res_agi
     -- A fix has been added to prevent calls from being hung up when more than one
        call is executing an AGI script calling the GET DATA command.
index 5d3781017c713612ca9e732a58f951040c2fb476..84819a2bfce0fb0e104112642689d0c8e6ce8e49 100755 (executable)
@@ -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)