提交 c916c159 authored 作者: Kapil Gupta's avatar Kapil Gupta

adding code to generate "DTMF Removal Enable/Disable" event from mod_media gateway to freetdm.

上级 50b044d6
......@@ -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;
......
......@@ -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);
}
}
}
......
......@@ -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++;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论