]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4769 try this patch and put {drop_dtmf=true} in your dial string
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 26 Oct 2012 19:46:36 +0000 (14:46 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 26 Oct 2012 19:46:36 +0000 (14:46 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia_glue.c

index 31adce6f1895ac664d697f0aba12be0f660cca84..ddf0b5dccfd1c79329e3db99288317de9328eb80 100644 (file)
@@ -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 */
index 799574da84baa930c81a69c42a72dd5bf7f7f627..864d3a1e6f5bb23f4713ae56cc3e91d8f8caeeac 100644 (file)
@@ -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;
index ac6ba9a9e917e465ec85742eee7dfa305a78cc6e..105236cdbd83a52423bbab185214613d3a89f808 100644 (file)
@@ -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);
        }