diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5412daa47480432d69261017f70a346856416dd0..866738c2a72be59ba9b8b24f1d7e993596f3a980 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6655,9 +6655,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_debug(1, "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))