]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
quickfix
authorMathieu Rene <mrene@avgs.ca>
Thu, 9 Aug 2012 22:00:15 +0000 (18:00 -0400)
committerMathieu Rene <mrene@avgs.ca>
Thu, 9 Aug 2012 22:00:15 +0000 (18:00 -0400)
src/mod/endpoints/mod_media_gateway/media_gateway.c
src/mod/endpoints/mod_sofia/rtp.c

index ff9699853817081e2da5d368cc8d39ea7f967ddf..8409cdc0e18b413d923ec9a40f5e7d7c46f4db60 100644 (file)
@@ -171,7 +171,9 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
         switch_channel_set_private(channel, PVT_MG_TERM, term);
         switch_core_event_hook_add_recv_dtmf(session, mg_on_dtmf);
                
-        switch_core_session_execute_application_async(session, "spandsp_start_fax_detect", "mg_notify cng 120 cng");
+        if (term->type == MG_TERM_TDM) {
+            switch_core_session_execute_application_async(session, "spandsp_start_fax_detect", "mg_notify cng 120 cng");
+        }
     }
     
     switch_set_flag(term, MGT_ACTIVE);
index 2afbb3fe02bbbb334d9ab3c0b22814774b59d6e1..3a41065fe30a0afcfd113f640e10f143ee36fe61 100644 (file)
@@ -476,7 +476,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
                                        rate,
                                        ptime,
                                        1,
-                                       /*SWITCH_CODEC_FLAG_ENCODE |*/ SWITCH_CODEC_FLAG_DECODE,
+                                       SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
                                        NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                        goto fail;
@@ -487,7 +487,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
                                                rate,
                                                ptime,
                                                1,
-                                               SWITCH_CODEC_FLAG_ENCODE /*| SWITCH_CODEC_FLAG_DECODE*/
+                                               SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE
                                                NULL, switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
                                goto fail;