diff options
author | Jason Parker <jparker@digium.com> | 2007-01-17 00:22:20 +0000 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2007-01-17 00:22:20 +0000 |
commit | 9ca780a2714d401c9c3dc0ed328461d4e0891a49 (patch) | |
tree | b0c9a21201cf578259dcb70e89221819c8e7d2e1 /main/rtp.c | |
parent | 73bc822fa87809a3d0b9a08b7fbdf9d037fe0d2e (diff) |
Merged revisions 51170 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r51170 | qwell | 2007-01-16 18:20:56 -0600 (Tue, 16 Jan 2007) | 4 lines
Fix issue with dtmf continuation packets when the dtmf digit is 0...
Issue 8831
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/rtp.c')
-rw-r--r-- | main/rtp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/rtp.c b/main/rtp.c index e80cb3ead..90890d3ef 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -143,7 +143,8 @@ struct ast_rtp { unsigned int dtmfduration; /* DTMF Transmission Variables */ unsigned int lastdigitts; - char send_digit; + char sending_digit; /* boolean - are we sending digits */ + char send_digit; /* digit we are sending */ int send_payload; int send_duration; int nat; @@ -1142,7 +1143,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp) struct ast_rtp *bridged = NULL; /* If time is up, kill it */ - if (rtp->send_digit) + if (rtp->sending_digit) ast_rtp_senddigit_continuation(rtp); len = sizeof(sin); @@ -2203,6 +2204,7 @@ int ast_rtp_senddigit_begin(struct ast_rtp *rtp, char digit) } /* Since we received a begin, we can safely store the digit and disable any compensation */ + rtp->sending_digit = 1; rtp->send_digit = digit; rtp->send_payload = payload; @@ -2294,6 +2296,7 @@ int ast_rtp_senddigit_end(struct ast_rtp *rtp, char digit) ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); } + rtp->sending_digit = 0; rtp->send_digit = 0; /* Increment lastdigitts */ rtp->lastdigitts += 960; |