Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 52762) +++ channels/chan_sip.c (working copy) @@ -2626,7 +2626,7 @@ do_setnat(dialog, ast_test_flag(&dialog->flags[0], SIP_NAT) & SIP_NAT_ROUTE ); if (dialog->rtp) { - ast_rtp_setdtmf(dialog->rtp, ast_test_flag(&dialog->flags[0], SIP_DTMF) != SIP_DTMF_INFO); + ast_rtp_setdtmf(dialog->rtp, ast_test_flag(&dialog->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833); ast_rtp_setdtmfcompensate(dialog->rtp, ast_test_flag(&dialog->flags[1], SIP_PAGE2_RFC2833_COMPENSATE)); ast_rtp_set_rtptimeout(dialog->rtp, peer->rtptimeout); ast_rtp_set_rtpholdtimeout(dialog->rtp, peer->rtpholdtimeout); @@ -4221,7 +4221,7 @@ free(p); return NULL; } - ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_INFO); + ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833); ast_rtp_setdtmfcompensate(p->rtp, ast_test_flag(&p->flags[1], SIP_PAGE2_RFC2833_COMPENSATE)); ast_rtp_settos(p->rtp, global_tos_audio); ast_rtp_set_rtptimeout(p->rtp, global_rtptimeout); @@ -13342,7 +13342,7 @@ build_contact(p); /* Build our contact header */ if (p->rtp) { - ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_INFO); + ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833); ast_rtp_setdtmfcompensate(p->rtp, ast_test_flag(&p->flags[1], SIP_PAGE2_RFC2833_COMPENSATE)); } Index: main/rtp.c =================================================================== --- main/rtp.c (revision 52762) +++ main/rtp.c (working copy) @@ -3189,17 +3189,13 @@ * | RFC2833 | True | True | * | SIP INFO | False | False | * -------------------------------------------------- - * However, if DTMF from both channels is being monitored by the core, then - * we can still do packet-to-packet bridging, because passing through the - * core will handle DTMF mode translation. + * DTMF must be passed through the core if the modes don't match so + * that the DTMF modes can get properly translated. */ if ( (ast_test_flag(p0, FLAG_HAS_DTMF) != ast_test_flag(p1, FLAG_HAS_DTMF)) || (!c0->tech->send_digit_begin != !c1->tech->send_digit_begin)) { - if (!ast_test_flag(p0, FLAG_P2P_NEED_DTMF) || !ast_test_flag(p1, FLAG_P2P_NEED_DTMF)) { - ast_channel_unlock(c0); - ast_channel_unlock(c1); - return AST_BRIDGE_FAILED_NOWARN; - } + ast_set_flag(p0, FLAG_P2P_NEED_DTMF); + ast_set_flag(p1, FLAG_P2P_NEED_DTMF); audio_p0_res = AST_RTP_TRY_PARTIAL; audio_p1_res = AST_RTP_TRY_PARTIAL; }