From a064847a11bfdc0fe0d743a47c722300f7e21831 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 12 Dec 2008 22:34:41 +0000 Subject: [PATCH] sonus sonus sonus, sonus is a 4 letter word git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10744 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_glue.c | 10 ++++++++++ src/switch_rtp.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 3b0065c6ad..e96f7d219e 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -2197,6 +2197,16 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t * switch_set_flag_locked(tech_pvt, TFLAG_BUGGY_2833); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Activate Buggy RFC2833 Mode!\n"); } + + if (strstr(tech_pvt->origin, "Sonus_UAC")) { + switch_set_flag_locked(tech_pvt, TFLAG_BUGGY_2833); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, + "Hello,\nI see you have a Sonus!\n" + "FYI, Sonus cannot follow the RFC on the proper way to send DTMF.\n" + "Sadly, my creator had to spend several hours figuring this out so I thought you'd like to know that!\n" + "Don't worry, DTMF will work but you may want to ask them to fix it......\n" + ); + } } if ((m = sdp->sdp_media) && (m->m_mode == sdp_sendonly || m->m_mode == sdp_inactive)) { diff --git a/src/switch_rtp.c b/src/switch_rtp.c index ff099e085a..61bb82deb0 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1204,6 +1204,9 @@ static void do_2833(switch_rtp_t *rtp_session) rtp_session->dtmf_data.timestamp_dtmf, rtp_session->dtmf_data.out_digit_sofar, rtp_session->dtmf_data.out_digit_sub_sofar, rtp_session->dtmf_data.out_digit_dur, rtp_session->seq); + if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BUGGY_2833)) { + rtp_session->dtmf_data.timestamp_dtmf = rtp_session->last_write_ts + samples; + } } if (loops != 1) {