]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5322 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 18 Apr 2013 21:27:45 +0000 (16:27 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 18 Apr 2013 21:27:45 +0000 (16:27 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/switch_core_io.c

index 4d3d83b46da8d1a42ea859d83e60015a91da952d..2a22925bc93cc2974844faaa7d48566b22958521 100644 (file)
@@ -1107,10 +1107,6 @@ 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 (switch_channel_test_flag(tech_pvt->channel, CF_DROP_DTMF)) {
-               return SWITCH_STATUS_SUCCESS;
-       }
-
        dtmf_type = tech_pvt->mparams.dtmf_type;
 
        /* We only can send INFO when we have no media */
index 741ac0e556463f6b567acc08b26291d765159ea1..0d1c5fb367f63d8a211aaa7fd9a53805b5510957 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * FreeSWITCH Moular Media Switching Software Library / Soft-Switch Application
  * Copyright (C) 2005-2012, Anthony Minessale II <anthm@freeswitch.org>
  *
  * Version: MPL 1.1
@@ -1616,6 +1616,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_sessio
                return SWITCH_STATUS_SUCCESS;
        }
 
+       if (switch_channel_test_flag(session->channel, CF_DROP_DTMF)) {
+               const char *file = switch_channel_get_variable_dup(session->channel, "drop_dtmf_masking_file", SWITCH_FALSE, -1);
+
+               if (!zstr(file)) {
+                       switch_ivr_broadcast(switch_core_session_get_uuid(session), file, SMF_ECHO_ALEG);
+               }
+               return SWITCH_STATUS_SUCCESS;
+       }
+
        switch_assert(dtmf);
 
        new_dtmf = *dtmf;