mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 01:01:02 +00:00
implement fmtp 16 in rtp (bug #2999)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
rtp.c
13
rtp.c
@@ -188,8 +188,13 @@ static struct ast_frame *send_dtmf(struct ast_rtp *rtp)
|
|||||||
return &null_frame;
|
return &null_frame;
|
||||||
}
|
}
|
||||||
ast_log(LOG_DEBUG, "Sending dtmf: %d (%c), at %s\n", rtp->resp, rtp->resp, ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr));
|
ast_log(LOG_DEBUG, "Sending dtmf: %d (%c), at %s\n", rtp->resp, rtp->resp, ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr));
|
||||||
rtp->f.frametype = AST_FRAME_DTMF;
|
if (rtp->resp == 'X') {
|
||||||
rtp->f.subclass = rtp->resp;
|
rtp->f.frametype = AST_FRAME_CONTROL;
|
||||||
|
rtp->f.subclass = AST_CONTROL_FLASH;
|
||||||
|
} else {
|
||||||
|
rtp->f.frametype = AST_FRAME_DTMF;
|
||||||
|
rtp->f.subclass = rtp->resp;
|
||||||
|
}
|
||||||
rtp->f.datalen = 0;
|
rtp->f.datalen = 0;
|
||||||
rtp->f.samples = 0;
|
rtp->f.samples = 0;
|
||||||
rtp->f.mallocd = 0;
|
rtp->f.mallocd = 0;
|
||||||
@@ -218,6 +223,8 @@ static struct ast_frame *process_cisco_dtmf(struct ast_rtp *rtp, unsigned char *
|
|||||||
resp = '#';
|
resp = '#';
|
||||||
} else if (event < 16) {
|
} else if (event < 16) {
|
||||||
resp = 'A' + (event - 12);
|
resp = 'A' + (event - 12);
|
||||||
|
} else if (event < 17) {
|
||||||
|
resp = 'X';
|
||||||
}
|
}
|
||||||
if (rtp->resp && (rtp->resp != resp)) {
|
if (rtp->resp && (rtp->resp != resp)) {
|
||||||
f = send_dtmf(rtp);
|
f = send_dtmf(rtp);
|
||||||
@@ -252,6 +259,8 @@ static struct ast_frame *process_rfc2833(struct ast_rtp *rtp, unsigned char *dat
|
|||||||
resp = '#';
|
resp = '#';
|
||||||
} else if (event < 16) {
|
} else if (event < 16) {
|
||||||
resp = 'A' + (event - 12);
|
resp = 'A' + (event - 12);
|
||||||
|
} else if (event < 17) {
|
||||||
|
resp = 'X';
|
||||||
}
|
}
|
||||||
if (rtp->resp && (rtp->resp != resp)) {
|
if (rtp->resp && (rtp->resp != resp)) {
|
||||||
f = send_dtmf(rtp);
|
f = send_dtmf(rtp);
|
||||||
|
|||||||
Reference in New Issue
Block a user