DTMF removal code - by default making disable
This commit is contained in:
parent
1c907e5b04
commit
84cd6f0873
|
@ -244,6 +244,10 @@ switch_status_t megaco_tdm_term_dtmf_removal(mg_termination_t *term, int enable)
|
|||
|
||||
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);
|
||||
|
||||
|
@ -441,6 +445,11 @@ void megaco_termination_destroy(mg_termination_t *term)
|
|||
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);
|
||||
|
|
|
@ -747,8 +747,6 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -264,6 +264,10 @@ 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);
|
||||
|
||||
/* 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++;
|
||||
}
|
||||
/****************************************************************************************************************************/
|
||||
|
|
|
@ -120,6 +120,7 @@ enum {
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue