Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
b47c9d92
提交
b47c9d92
authored
9月 10, 2012
作者:
Kapil Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adding echo cancel code based on tdmc package
上级
9537ed37
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
368 行增加
和
301 行删除
+368
-301
media_gateway.c
src/mod/endpoints/mod_media_gateway/media_gateway.c
+18
-2
media_gateway_cmd_handler.c
...d/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
+315
-298
media_gateway_stack.h
src/mod/endpoints/mod_media_gateway/media_gateway_stack.h
+3
-1
media_gateway_utils.c
src/mod/endpoints/mod_media_gateway/media_gateway_utils.c
+8
-0
mod_media_gateway.h
src/mod/endpoints/mod_media_gateway/mod_media_gateway.h
+24
-0
没有找到文件。
src/mod/endpoints/mod_media_gateway/media_gateway.c
浏览文件 @
b47c9d92
...
...
@@ -493,6 +493,7 @@ switch_status_t megaco_context_is_term_present(mg_context_t *ctx, mg_termination
switch_status_t
megaco_context_add_termination
(
mg_context_t
*
ctx
,
mg_termination_t
*
term
)
{
mg_termination_t
*
tdm_term
=
NULL
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_assert
(
ctx
!=
NULL
);
...
...
@@ -531,7 +532,19 @@ switch_status_t megaco_context_add_termination(mg_context_t *ctx, mg_termination
switch_ivr_uuid_bridge
(
ctx
->
terminations
[
0
]
->
uuid
,
ctx
->
terminations
[
1
]
->
uuid
);
ctx
->
terminations
[
0
]
->
profile
->
mg_stats
->
total_num_of_call_recvd
++
;
if
(
MG_TERM_TDM
==
ctx
->
terminations
[
0
]
->
type
){
tdm_term
=
ctx
->
terminations
[
0
];
}
else
{
tdm_term
=
ctx
->
terminations
[
1
];
}
if
(
MG_EC_ENABLE
==
tdm_term
->
ec_type
){
mg_term_set_ec
(
tdm_term
,
0x01
);
}
else
if
(
MG_EC_DISABLE
==
tdm_term
->
ec_type
){
mg_term_set_ec
(
tdm_term
,
0x00
);
}
mg_set_term_ec_status
(
tdm_term
,
MG_EC_UNDEFINED
);
ctx
->
terminations
[
0
]
->
profile
->
mg_stats
->
total_num_of_call_recvd
++
;
}
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -893,7 +906,10 @@ void mg_term_set_ec(mg_termination_t *term, int enable)
switch_core_session_rwunlock
(
session
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Sent echo_cancel event to [%s] to [%s]
\n
"
,
term
->
uuid
,
enable
?
"enable"
:
"disable"
);
}
}
else
{
mg_ec_types_t
status
=
((
enable
)
?
MG_EC_ENABLE
:
MG_EC_DISABLE
);
mg_set_term_ec_status
(
term
,
status
);
}
switch_event_destroy
(
&
event
);
}
...
...
src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
浏览文件 @
b47c9d92
差异被折叠。
点击展开。
src/mod/endpoints/mod_media_gateway/media_gateway_stack.h
浏览文件 @
b47c9d92
...
...
@@ -167,7 +167,9 @@ typedef enum {
(_reqId)->id.val = 0xFFFFFFFF;
switch_status_t
mg_prc_descriptors
(
megaco_profile_t
*
mg_profile
,
MgMgcoCommand
*
inc_cmd
,
mg_termination_t
*
term
,
CmMemListCp
*
memCp
);
void
mg_set_term_ec_status
(
mg_termination_t
*
term
,
mg_ec_types_t
status
);
switch_status_t
mg_prc_descriptors
(
megaco_profile_t
*
mg_profile
,
MgMgcoCommand
*
inc_cmd
,
mg_termination_t
*
term
,
CmMemListCp
*
memCp
);
void
handle_sng_log
(
uint8_t
level
,
char
*
fmt
,
...);
void
handle_mgco_sta_ind
(
Pst
*
pst
,
SuId
suId
,
MgMgtSta
*
msg
);
void
handle_mgco_txn_sta_ind
(
Pst
*
pst
,
SuId
suId
,
MgMgcoInd
*
msg
);
...
...
src/mod/endpoints/mod_media_gateway/media_gateway_utils.c
浏览文件 @
b47c9d92
...
...
@@ -2397,3 +2397,11 @@ void mg_apply_tdm_ec(mg_termination_t* term, mg_context_t *mg_ctxt)
}
}
/*****************************************************************************************************************************/
void
mg_set_term_ec_status
(
mg_termination_t
*
term
,
mg_ec_types_t
status
)
{
if
(
NULL
!=
term
)
{
term
->
ec_type
=
status
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_INFO
,
"Setting Term EC[%s]
\n
"
,
mg_ec_types_tostr
(
term
->
ec_type
));
}
}
/*****************************************************************************************************************************/
src/mod/endpoints/mod_media_gateway/mod_media_gateway.h
浏览文件 @
b47c9d92
...
...
@@ -132,6 +132,29 @@ typedef enum {
MG_T38_FAX_NOTIFY_INVALID
,
}
mg_t38_fax_notify_t
;
typedef
enum
{
MG_EC_UNDEFINED
=
0
,
MG_EC_ENABLE
,
MG_EC_DISABLE
,
MG_EC_INVALID
}
mg_ec_types_t
;
static
inline
const
char
*
mg_ec_types_tostr
(
mg_ec_types_t
type
)
{
switch
(
type
)
{
case
MG_EC_UNDEFINED
:
return
"UNDEFINED"
;
case
MG_EC_ENABLE
:
return
"ENABLE"
;
case
MG_EC_DISABLE
:
return
"DISABLE"
;
case
MG_EC_INVALID
:
return
"INVALID"
;
default:
return
"Invalid"
;
}
return
NULL
;
}
typedef
enum
{
MGM_AUDIO
=
0
,
...
...
@@ -205,6 +228,7 @@ struct mg_termination_s {
int
*
mg_error_code
;
/* MEGACO error code */
uint32_t
flags
;
const
char
*
tech
;
/* Endpoint controlling the TDM interface - only FreeTDM tested so far */
mg_ec_types_t
ec_type
;
union
{
struct
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论