mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-12 21:09:00 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@162205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3050,6 +3050,7 @@ int ast_rtp_senddigit_begin(struct ast_rtp *rtp, char digit)
|
|||||||
|
|
||||||
rtp->dtmfmute = ast_tvadd(ast_tvnow(), ast_tv(0, 500000));
|
rtp->dtmfmute = ast_tvadd(ast_tvnow(), ast_tv(0, 500000));
|
||||||
rtp->send_duration = 160;
|
rtp->send_duration = 160;
|
||||||
|
rtp->lastdigitts = rtp->lastts + rtp->send_duration;
|
||||||
|
|
||||||
/* Get a pointer to the header */
|
/* Get a pointer to the header */
|
||||||
rtpheader = (unsigned int *)data;
|
rtpheader = (unsigned int *)data;
|
||||||
@@ -3169,10 +3170,9 @@ int ast_rtp_senddigit_end(struct ast_rtp *rtp, char digit)
|
|||||||
ast_inet_ntoa(rtp->them.sin_addr),
|
ast_inet_ntoa(rtp->them.sin_addr),
|
||||||
ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
|
ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
|
||||||
}
|
}
|
||||||
|
rtp->lastts += rtp->send_duration;
|
||||||
rtp->sending_digit = 0;
|
rtp->sending_digit = 0;
|
||||||
rtp->send_digit = 0;
|
rtp->send_digit = 0;
|
||||||
/* Increment lastdigitts */
|
|
||||||
rtp->lastdigitts += 960;
|
|
||||||
rtp->seqno++;
|
rtp->seqno++;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@@ -3498,6 +3498,10 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
|
|||||||
int pred;
|
int pred;
|
||||||
int mark = 0;
|
int mark = 0;
|
||||||
|
|
||||||
|
if (rtp->sending_digit) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
ms = calc_txstamp(rtp, &f->delivery);
|
ms = calc_txstamp(rtp, &f->delivery);
|
||||||
/* Default prediction */
|
/* Default prediction */
|
||||||
if (f->frametype == AST_FRAME_VOICE) {
|
if (f->frametype == AST_FRAME_VOICE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user