Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6046698b
提交
6046698b
authored
8月 07, 2012
作者:
root
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixing channel mapping issue and removing unwanted prints
上级
3b0290b6
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
16 行增加
和
11 行删除
+16
-11
media_gateway.c
src/mod/endpoints/mod_media_gateway/media_gateway.c
+1
-1
media_gateway_cmd_handler.c
...d/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
+2
-0
media_gateway_stack.h
src/mod/endpoints/mod_media_gateway/media_gateway_stack.h
+1
-1
media_gateway_xml.c
src/mod/endpoints/mod_media_gateway/media_gateway_xml.c
+8
-5
mod_media_gateway.c
src/mod/endpoints/mod_media_gateway/mod_media_gateway.c
+4
-4
没有找到文件。
src/mod/endpoints/mod_media_gateway/media_gateway.c
浏览文件 @
6046698b
...
...
@@ -63,7 +63,7 @@ megaco_profile_t* megaco_get_profile_by_suId(SuId suId)
switch_hash_this
(
hi
,
&
var
,
NULL
,
&
val
);
profile
=
(
megaco_profile_t
*
)
val
;
if
(
profile
->
idx
==
suId
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Got profile[%s] associated with suId[%d]
\n
"
,
profile
->
name
,
suId
);
//
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Got profile[%s] associated with suId[%d]\n",profile->name, suId);
found
=
0x01
;
break
;
}
...
...
src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
浏览文件 @
6046698b
...
...
@@ -1563,6 +1563,7 @@ switch_status_t mg_send_end_of_axn(SuId suId, MgMgcoTransId* transId, MgMgcoCont
ctxt
.
cmdStatus
.
pres
=
PRSNT_NODEF
;
ctxt
.
cmdStatus
.
val
=
CH_CMD_STATUS_END_OF_AXN
;
#if 0
#ifdef BIT_64
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG,
"mg_send_end_of_axn: Sending END_OF_AXN for transId[%d], peerId[%d], context[type = %s, value = %d]\n",
...
...
@@ -1572,6 +1573,7 @@ switch_status_t mg_send_end_of_axn(SuId suId, MgMgcoTransId* transId, MgMgcoCont
"mg_send_end_of_axn: Sending END_OF_AXN for transId[%lu], peerId[%lu], context[type = %s, value = %lu]\n",
transId->val, peerId->val, PRNT_MG_CTXT_TYPE(ctxtId->type.val), ctxtId->val.val);
#endif
#endif
ret
=
sng_mgco_send_axn_req
(
suId
,
&
ctxt
);
...
...
src/mod/endpoints/mod_media_gateway/media_gateway_stack.h
浏览文件 @
6046698b
...
...
@@ -193,7 +193,7 @@ switch_status_t mg_build_mgco_err_request(MgMgcoInd **errcmd,U32 trans_id, MgM
switch_status_t
mg_send_audit_rsp
(
SuId
suId
,
MgMgcoCommand
*
req
);
switch_status_t
handle_mg_audit_cmd
(
megaco_profile_t
*
mg_profile
,
MgMgcoCommand
*
auditReq
);
switch_status_t
mg_stack_termination_is_in_service
(
megaco_profile_t
*
mg_profile
,
char
*
term_str
,
int
len
);
void
mg_create_tdm_term
(
megaco_profile_t
*
profile
,
const
char
*
tech
,
const
char
*
channel_prefix
,
const
char
*
prefix
,
int
j
);
void
mg_create_tdm_term
(
megaco_profile_t
*
profile
,
const
char
*
tech
,
const
char
*
channel_prefix
,
const
char
*
prefix
,
int
j
,
int
k
);
void
mg_util_set_cmd_name_string
(
MgStr
*
errTxt
,
MgMgcoCommand
*
cmd
);
switch_status_t
mgco_init_ins_service_change
(
SuId
suId
);
...
...
src/mod/endpoints/mod_media_gateway/media_gateway_xml.c
浏览文件 @
6046698b
...
...
@@ -103,14 +103,14 @@ switch_status_t config_profile(megaco_profile_t *profile, switch_bool_t reload)
startchan
=
atoi
(
chanmap
[
0
]);
endchan
=
atoi
(
chanmap
[
1
]);
for
(
j
=
startchan
;
j
<=
endchan
;
j
++
)
{
mg_create_tdm_term
(
profile
,
tech
,
channel_prefix
,
prefix
,
j
);
mg_create_tdm_term
(
profile
,
tech
,
channel_prefix
,
prefix
,
j
,
j
);
}
}
}
else
{
/* case (i) */
p
=
channel_map_dup
;
startchan
=
endchan
=
atoi
(
p
);
mg_create_tdm_term
(
profile
,
tech
,
channel_prefix
,
prefix
,
startchan
);
mg_create_tdm_term
(
profile
,
tech
,
channel_prefix
,
prefix
,
startchan
,
startchan
);
}
}
else
{
...
...
@@ -123,7 +123,10 @@ switch_status_t config_profile(megaco_profile_t *profile, switch_bool_t reload)
endchan
=
atoi
(
p
);
for
(
j
=
startchan
;
j
<=
endchan
;
j
++
)
{
mg_create_tdm_term
(
profile
,
tech
,
channel_prefix
,
prefix
,
j
);
if
(
0
==
i
)
mg_create_tdm_term
(
profile
,
tech
,
channel_prefix
,
prefix
,
j
,
j
);
else
mg_create_tdm_term
(
profile
,
tech
,
channel_prefix
,
prefix
,
j
,
j
-
1
);
}
}
}
...
...
@@ -197,7 +200,7 @@ done:
}
/****************************************************************************************************************************/
void
mg_create_tdm_term
(
megaco_profile_t
*
profile
,
const
char
*
tech
,
const
char
*
channel_prefix
,
const
char
*
prefix
,
int
chan_num
)
void
mg_create_tdm_term
(
megaco_profile_t
*
profile
,
const
char
*
tech
,
const
char
*
channel_prefix
,
const
char
*
prefix
,
int
chan_num
,
int
tdm_chan_num
)
{
mg_termination_t
*
term
;
switch_memory_pool_t
*
pool
;
...
...
@@ -211,7 +214,7 @@ void mg_create_tdm_term(megaco_profile_t *profile, const char *tech, const char
term
->
tech
=
switch_core_strdup
(
pool
,
tech
);
term
->
active_events
=
NULL
;
term
->
name
=
switch_core_sprintf
(
pool
,
"%s%d"
,
prefix
,
chan_num
);
term
->
u
.
tdm
.
channel
=
chan_num
;
term
->
u
.
tdm
.
channel
=
tdm_
chan_num
;
term
->
u
.
tdm
.
span_name
=
switch_core_strdup
(
pool
,
channel_prefix
);
switch_set_flag
(
term
,
MG_OUT_OF_SERVICE
);
...
...
src/mod/endpoints/mod_media_gateway/mod_media_gateway.c
浏览文件 @
6046698b
...
...
@@ -526,8 +526,8 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
inc_context
=
&
cmd
->
contextId
;
memcpy
(
&
out_ctxt
,
inc_context
,
sizeof
(
MgMgcoContextId
));
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"%s: Received Command Type[%s]
\n
"
,
__PRETTY_FUNCTION__
,
PRNT_MG_CMD_TYPE
(
cmd
->
cmdType
.
val
));
/*
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"%s: Received Command Type[%s] \n", __PRETTY_FUNCTION__, PRNT_MG_CMD_TYPE(cmd->cmdType.val));
*/
/*get mg profile associated with SuId */
if
(
NULL
==
(
mg_profile
=
megaco_get_profile_by_suId
(
suId
))){
...
...
@@ -591,8 +591,8 @@ void handle_mgco_cmd_ind(Pst *pst, SuId suId, MgMgcoCommand* cmd)
}
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Termination-Id received..value[%s] type[%d]
\n
"
,
termId
->
name
.
lcl
.
val
,
termId
->
type
.
val
);
/*
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
"Termination-Id received..value[%s] type[%d] \n", termId->name.lcl.val, termId->type.val);
*/
/*If term type is other then check if that term is configured with us..for term type CHOOSE/ALL , no need to check */
/* check is only if command is not AUDIT */
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论