Commit RTP fixes this time
authorMark Spencer <markster@digium.com>
Sat, 16 Aug 2003 16:51:58 +0000 (16:51 +0000)
committerMark Spencer <markster@digium.com>
Sat, 16 Aug 2003 16:51:58 +0000 (16:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1353 65c4cc65-6c06-0410-ace0-fbb531ad65f3

rtp.c

diff --git a/rtp.c b/rtp.c
index 03606b0..484e53f 100755 (executable)
--- a/rtp.c
+++ b/rtp.c
@@ -233,7 +233,10 @@ static struct ast_frame *process_rfc2833(struct ast_rtp *rtp, unsigned char *dat
        }
        else if(event_end & 0x80)
        {
-               f = send_dtmf(rtp);
+               if (rtp->resp) {
+                       f = send_dtmf(rtp);
+                       rtp->resp = 0;
+               }
                resp = 0;
                duration = 0;
        }
@@ -241,8 +244,8 @@ static struct ast_frame *process_rfc2833(struct ast_rtp *rtp, unsigned char *dat
        {
                f = send_dtmf(rtp);
        }
-
-       rtp->resp = resp;
+       if (!(event_end & 0x80))
+               rtp->resp = resp;
        rtp->dtmfcount = dtmftimeout;
        rtp->dtmfduration = duration;
        return f;