sprintf(buf,"%s",(1 == enable)?"enable":"disable");
+ if(enable){
+ switch_set_flag(term, MG_DTMF_REMOVAL_ENABLE);
+ }
+
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Sending DTMF Removal Event[%s] for MG Term[%s], TDM span[%s] channel[%d]\n",
buf,tdm_term->name, tdm_term->u.tdm.span_name, tdm_term->u.tdm.channel);
switch_clear_flag(term, MGT_ALLOCATED);
switch_clear_flag(term, MGT_ACTIVE);
switch_clear_flag(term, MG_FAX_NOTIFIED);
+
+ if(switch_test_flag(term, MG_DTMF_REMOVAL_ENABLE)){
+ switch_clear_flag(term, MG_DTMF_REMOVAL_ENABLE);
+ megaco_tdm_term_dtmf_removal(term,0x00);
+ }
if (term->type == MG_TERM_RTP) {
switch_core_hash_delete_wrlock(term->profile->terminations, term->name, term->profile->terminations_rwlock);
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);
}
}
term->name, term->u.tdm.span_name, term->u.tdm.channel);
megaco_prepare_tdm_termination(term);
+ /* by-default : DTMF removal disable
+ * by default do not modify in-band audio stream*/
+ megaco_tdm_term_dtmf_removal(term,0x00);
+
profile->total_cfg_term++;
}
/****************************************************************************************************************************/
MG_IN_SERVICE = (1 << 2),
MG_OUT_OF_SERVICE = (1 << 3),
MG_FAX_NOTIFIED = (1 << 4),
+ MG_DTMF_REMOVAL_ENABLE = (1 << 5),
} mg_termination_flags;