diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway.c b/src/mod/endpoints/mod_media_gateway/media_gateway.c index 2025ab2443..e63c922f65 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway.c @@ -448,7 +448,7 @@ void megaco_termination_destroy(mg_termination_t *term) if(switch_test_flag(term, MG_DTMF_REMOVAL_ENABLE)){ switch_clear_flag(term, MG_DTMF_REMOVAL_ENABLE); - megaco_tdm_term_dtmf_removal(term,0x00); + //megaco_tdm_term_dtmf_removal(term,0x00); } if (term->type == MG_TERM_RTP) { @@ -792,7 +792,6 @@ switch_status_t mgco_process_mgc_failure(SuId suId) if(0x01 == profile->peer_active){ /* MGC failure during active association , release all on-going calls contexts */ megaco_release_all_calls(profile); - profile->peer_active = 0x00; } return SWITCH_STATUS_SUCCESS; diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c b/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c index db297c7ff1..9d0f19295a 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c @@ -744,9 +744,12 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i if(is_rtp){ mg_termination_t* tdm_term = NULL; /* disable dtmf removal */ - tdm_term = megaco_context_get_peer_term(mg_ctxt, term); - if(term->u.rtp.rfc2833_pt){ - megaco_tdm_term_dtmf_removal(tdm_term,0x01); + if(NULL != (tdm_term = megaco_context_get_peer_term(mg_ctxt, term))){ + if(term->u.rtp.rfc2833_pt){ + megaco_tdm_term_dtmf_removal(tdm_term,0x01); + }else{ + megaco_tdm_term_dtmf_removal(tdm_term,0x00); + } } } diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway_xml.c b/src/mod/endpoints/mod_media_gateway/media_gateway_xml.c index 3f3e2c01c5..40ced6087d 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway_xml.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway_xml.c @@ -264,9 +264,11 @@ void mg_create_tdm_term(megaco_profile_t *profile, const char *tech, const char term->name, term->u.tdm.span_name, term->u.tdm.channel); megaco_prepare_tdm_termination(term); +#if 0 /* by-default : DTMF removal disable * by default do not modify in-band audio stream*/ megaco_tdm_term_dtmf_removal(term,0x00); +#endif profile->total_cfg_term++; }