diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 31adce6f18..ddf0b5dccf 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1511,6 +1511,10 @@ static switch_status_t sofia_send_dtmf(switch_core_session_t *session, const swi tech_pvt = (private_object_t *) switch_core_session_get_private(session); switch_assert(tech_pvt != NULL); + if (sofia_test_flag(tech_pvt, TFLAG_DROP_DTMF)) { + return SWITCH_STATUS_SUCCESS; + } + dtmf_type = tech_pvt->dtmf_type; /* We only can send INFO when we have no media */ diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h index 799574da84..864d3a1e6f 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -352,6 +352,7 @@ typedef enum { TFLAG_SLA_BARGING, TFLAG_PASS_ACK, TFLAG_CRYPTO_RECOVER, + TFLAG_DROP_DTMF, /* No new flags below this line */ TFLAG_MAX } TFLAGS; diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index ac6ba9a9e9..105236cdbd 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -969,6 +969,11 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t * switch_core_session_set_private(session, tech_pvt); + if (switch_true(switch_channel_get_variable_dup(tech_pvt->channel, "drop_dtmf", SWITCH_FALSE, -1))) { + sofia_set_flag(tech_pvt, TFLAG_DROP_DTMF); + } + + if (channame) { sofia_glue_set_name(tech_pvt, channame); }