diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-09 14:54:13 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-09 14:54:13 +0000 |
commit | c5c8971b8dfb42a3284f312f3b8e3cde030b5cf2 (patch) | |
tree | 773bd58d66d35a2d9f2114da8e46bddcc4d7de41 /rtp.c | |
parent | c9292124fcd44f6a3dc53583b9a38a0d42b72fda (diff) |
Update comment for fmtp 16, implement in RTP (bug #2999)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4409 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-x | rtp.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -192,8 +192,13 @@ static struct ast_frame *send_dtmf(struct ast_rtp *rtp) 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)); - rtp->f.frametype = AST_FRAME_DTMF; - rtp->f.subclass = rtp->resp; + if (rtp->resp == 'X') { + 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.samples = 0; rtp->f.mallocd = 0; @@ -235,6 +240,8 @@ static struct ast_frame *process_cisco_dtmf(struct ast_rtp *rtp, unsigned char * resp = '#'; } else if (event < 16) { resp = 'A' + (event - 12); + } else if (event < 17) { + resp = 'X'; } if (rtp->resp && (rtp->resp != resp)) { f = send_dtmf(rtp); @@ -269,6 +276,8 @@ static struct ast_frame *process_rfc2833(struct ast_rtp *rtp, unsigned char *dat resp = '#'; } else if (event < 16) { resp = 'A' + (event - 12); + } else if (event < 17) { + resp = 'X'; } if (rtp->resp && (rtp->resp != resp)) { f = send_dtmf(rtp); |