Fixed ackcall (once again, this time differently) in chan_agent
authorJim Dixon <telesistant@hotmail.com>
Wed, 22 Dec 2004 20:50:23 +0000 (20:50 +0000)
committerJim Dixon <telesistant@hotmail.com>
Wed, 22 Dec 2004 20:50:23 +0000 (20:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 402c094..2b3930d 100755 (executable)
@@ -354,7 +354,7 @@ static struct ast_frame  *agent_read(struct ast_channel *ast)
                        p->acknowledged = 0;
                }
        }
-       if (f && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {
+       if ((p->chan && (p->chan->_state != AST_STATE_UP)) && f && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {
 /* TC */
                if (p->ackcall) {
                        if (option_verbose > 2)