aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-09 19:50:39 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-09 19:50:39 +0000
commitdec9b2a43568e27f87036ac7b780f8438978ea93 (patch)
tree4b4c6bc19ff6d08d0eaf722796a6466f6029380a /main
parentbaf70212e876613dda19e33b43442b8d07f6b8b7 (diff)
Merged revisions 162205 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r162205 | file | 2008-12-09 15:48:35 -0400 (Tue, 09 Dec 2008) | 14 lines Merged revisions 162204 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r162204 | file | 2008-12-09 15:47:07 -0400 (Tue, 09 Dec 2008) | 7 lines Make sure that the timestamp for DTMF is not the same as the previous voice frame and do not send audio when transmitting DTMF as this confuses some equipment. (closes issue #13209) Reported by: ip-rob Patches: 13209.diff uploaded by file (license 11) Tested by: ip-rob, bujones ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@162206 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/rtp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/rtp.c b/main/rtp.c
index b99783827..e020f937d 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2574,6 +2574,7 @@ int ast_rtp_senddigit_begin(struct ast_rtp *rtp, char digit)
rtp->dtmfmute = ast_tvadd(ast_tvnow(), ast_tv(0, 500000));
rtp->send_duration = 160;
+ rtp->lastdigitts = rtp->lastts + rtp->send_duration;
/* Get a pointer to the header */
rtpheader = (unsigned int *)data;
@@ -2693,10 +2694,9 @@ 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->lastts += rtp->send_duration;
rtp->sending_digit = 0;
rtp->send_digit = 0;
- /* Increment lastdigitts */
- rtp->lastdigitts += 960;
rtp->seqno++;
return res;
@@ -3004,6 +3004,10 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
int pred;
int mark = 0;
+ if (rtp->sending_digit) {
+ return 0;
+ }
+
ms = calc_txstamp(rtp, &f->delivery);
/* Default prediction */
if (f->frametype == AST_FRAME_VOICE) {