diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-06 13:30:51 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-06 13:30:51 +0000 |
commit | 127973c8127f402166a8c7e0d8b2d73206abf089 (patch) | |
tree | b115a5e764f5c2f4f620ee12881d3570555ea2f8 /channels | |
parent | 082038c155063f735c16c0b4e90af407c14eaf40 (diff) |
Update some old logic to stop both begin and end DTMF frames from reaching the core if rfc2833 is not enabled.
(closes issue #15036)
Reported by: dimas
Patches:
v1-15036.patch uploaded by dimas (license 88)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@192633 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 82d47d2fb..baec6e302 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4404,9 +4404,11 @@ static struct ast_frame *sip_rtp_read(struct ast_channel *ast, struct sip_pvt *p f = &ast_null_frame; } /* Don't forward RFC2833 if we're not supposed to */ - if (f && (f->frametype == AST_FRAME_DTMF) && - (ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_RFC2833)) + if (f && (f->frametype == AST_FRAME_DTMF_BEGIN || f->frametype == AST_FRAME_DTMF_END) && + (ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_RFC2833)) { + ast_log(LOG_DEBUG,"Ignoring DTMF (%c) RTP frame because dtmfmode is not RFC2833\n", f->subclass); return &ast_null_frame; + } /* We already hold the channel lock */ if (!p->owner || (f && f->frametype != AST_FRAME_VOICE)) |