]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
adding code to generate "DTMF Removal Enable/Disable" event from mod_media gateway...
authorKapil Gupta <kgupta@sangoma.com>
Sat, 8 Sep 2012 11:37:25 +0000 (07:37 -0400)
committerKapil Gupta <kgupta@sangoma.com>
Sat, 8 Sep 2012 11:37:25 +0000 (07:37 -0400)
src/mod/endpoints/mod_media_gateway/media_gateway.c
src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
src/mod/endpoints/mod_media_gateway/media_gateway_xml.c

index 2025ab2443886458c6da3124d8dbb1093c595a29..e63c922f65988fe18e277d7594c8bb79c7510a95 100644 (file)
@@ -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;
index db297c7ff12efe7a805f50816898e2789cde64c0..9d0f19295a9ee8a6d5de2c7959fe6f81d6cd5196 100644 (file)
@@ -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);
+                       }
                }
        }
 
index 3f3e2c01c517e2eb3310a02c04ce2e5fa06d59dd..40ced6087d11e2136a2a3a83e2f7f186e52e01d4 100644 (file)
@@ -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++;
 }