From 70121a3edbc25738cd34071b8ebdf4e9168c97fd Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 21 Dec 2016 16:09:54 -0600 Subject: [PATCH] FS-9871: [freeswitch-core] DTMF not delivered on B leg of a bridge when A leg has no media #resolve --- src/switch_rtp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index bd14e30afb..5b1e4c8990 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -4859,13 +4859,17 @@ static void do_2833(switch_rtp_t *rtp_session) switch_frame_flag_t flags = 0; uint32_t samples = rtp_session->samples_per_interval; - if (!rtp_session->last_write_ts) { - return; - } - if (rtp_session->dtmf_data.out_digit_dur > 0) { int x, loops = 1; + if (!rtp_session->last_write_ts) { + if (rtp_session->timer.timer_interface) { + rtp_session->last_write_ts = rtp_session->timer.samplecount; + } else { + rtp_session->last_write_ts = rtp_session->samples_per_interval; + } + } + rtp_session->dtmf_data.out_digit_sofar += samples; rtp_session->dtmf_data.out_digit_sub_sofar += samples;