adding code to generate "DTMF Removal Enable/Disable" event from mod_media gateway to freetdm.
This commit is contained in:
parent
50b044d66f
commit
c916c159e7
|
@ -448,7 +448,7 @@ void megaco_termination_destroy(mg_termination_t *term)
|
||||||
|
|
||||||
if(switch_test_flag(term, MG_DTMF_REMOVAL_ENABLE)){
|
if(switch_test_flag(term, MG_DTMF_REMOVAL_ENABLE)){
|
||||||
switch_clear_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) {
|
if (term->type == MG_TERM_RTP) {
|
||||||
|
@ -792,7 +792,6 @@ switch_status_t mgco_process_mgc_failure(SuId suId)
|
||||||
if(0x01 == profile->peer_active){
|
if(0x01 == profile->peer_active){
|
||||||
/* MGC failure during active association , release all on-going calls contexts */
|
/* MGC failure during active association , release all on-going calls contexts */
|
||||||
megaco_release_all_calls(profile);
|
megaco_release_all_calls(profile);
|
||||||
profile->peer_active = 0x00;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
|
@ -744,9 +744,12 @@ switch_status_t handle_mg_add_cmd(megaco_profile_t* mg_profile, MgMgcoCommand *i
|
||||||
if(is_rtp){
|
if(is_rtp){
|
||||||
mg_termination_t* tdm_term = NULL;
|
mg_termination_t* tdm_term = NULL;
|
||||||
/* disable dtmf removal */
|
/* disable dtmf removal */
|
||||||
tdm_term = megaco_context_get_peer_term(mg_ctxt, term);
|
if(NULL != (tdm_term = megaco_context_get_peer_term(mg_ctxt, term))){
|
||||||
if(term->u.rtp.rfc2833_pt){
|
if(term->u.rtp.rfc2833_pt){
|
||||||
megaco_tdm_term_dtmf_removal(tdm_term,0x01);
|
megaco_tdm_term_dtmf_removal(tdm_term,0x01);
|
||||||
|
}else{
|
||||||
|
megaco_tdm_term_dtmf_removal(tdm_term,0x00);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
term->name, term->u.tdm.span_name, term->u.tdm.channel);
|
||||||
megaco_prepare_tdm_termination(term);
|
megaco_prepare_tdm_termination(term);
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* by-default : DTMF removal disable
|
/* by-default : DTMF removal disable
|
||||||
* by default do not modify in-band audio stream*/
|
* by default do not modify in-band audio stream*/
|
||||||
megaco_tdm_term_dtmf_removal(term,0x00);
|
megaco_tdm_term_dtmf_removal(term,0x00);
|
||||||
|
#endif
|
||||||
|
|
||||||
profile->total_cfg_term++;
|
profile->total_cfg_term++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue