Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
a382990d
提交
a382990d
authored
1月 21, 2011
作者:
Konrad Hammel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chlog: freetdm: ss7 - bug fix: a route now supports multiple linksets
上级
becb9405
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
42 行增加
和
11 行删除
+42
-11
mod_freetdm.c
libs/freetdm/mod_freetdm/mod_freetdm.c
+1
-1
ftmod_sangoma_ss7_xml.c
...eetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c
+41
-10
没有找到文件。
libs/freetdm/mod_freetdm/mod_freetdm.c
浏览文件 @
a382990d
...
@@ -2462,7 +2462,7 @@ static ftdm_conf_node_t *get_ss7_config_node(switch_xml_t cfg, const char *confn
...
@@ -2462,7 +2462,7 @@ static ftdm_conf_node_t *get_ss7_config_node(switch_xml_t cfg, const char *confn
}
}
/* add mtp routes */
/* add mtp routes */
if
(
add_config_list_nodes
(
isup
,
rootnode
,
"mtp_routes"
,
"mtp_route"
,
NULL
,
NULL
))
{
if
(
add_config_list_nodes
(
isup
,
rootnode
,
"mtp_routes"
,
"mtp_route"
,
"linksets"
,
"linkset"
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"failed to process mtp_routes for sng_isup config %s
\n
"
,
confname
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"failed to process mtp_routes for sng_isup config %s
\n
"
,
confname
);
ftdm_conf_node_destroy
(
rootnode
);
ftdm_conf_node_destroy
(
rootnode
);
return
NULL
;
return
NULL
;
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_xml.c
浏览文件 @
a382990d
...
@@ -1269,6 +1269,10 @@ static int ftmod_ss7_parse_mtp_route(ftdm_conf_node_t *mtp_route)
...
@@ -1269,6 +1269,10 @@ static int ftmod_ss7_parse_mtp_route(ftdm_conf_node_t *mtp_route)
int
num_parms
=
mtp_route
->
n_parameters
;
int
num_parms
=
mtp_route
->
n_parameters
;
int
i
;
int
i
;
ftdm_conf_node_t
*
linkset
;
int
ls_id
;
int
numLinks
;
/* initalize the mtpRoute structure */
/* initalize the mtpRoute structure */
memset
(
&
mtpRoute
,
0x0
,
sizeof
(
mtpRoute
));
memset
(
&
mtpRoute
,
0x0
,
sizeof
(
mtpRoute
));
...
@@ -1299,11 +1303,6 @@ static int ftmod_ss7_parse_mtp_route(ftdm_conf_node_t *mtp_route)
...
@@ -1299,11 +1303,6 @@ static int ftmod_ss7_parse_mtp_route(ftdm_conf_node_t *mtp_route)
mtpRoute
.
dpc
=
atoi
(
parm
->
val
);
mtpRoute
.
dpc
=
atoi
(
parm
->
val
);
SS7_DEBUG
(
"Found an mtpRoute dpc = %d
\n
"
,
mtpRoute
.
dpc
);
SS7_DEBUG
(
"Found an mtpRoute dpc = %d
\n
"
,
mtpRoute
.
dpc
);
/**********************************************************************/
/**********************************************************************/
}
else
if
(
!
strcasecmp
(
parm
->
var
,
"linksetId"
))
{
/**********************************************************************/
mtpRoute
.
linkSetId
=
atoi
(
parm
->
val
);
SS7_DEBUG
(
"Found an mtpRoute linkset = %s
\n
"
,
parm
->
val
);
/**********************************************************************/
}
else
if
(
!
strcasecmp
(
parm
->
var
,
"isSTP"
))
{
}
else
if
(
!
strcasecmp
(
parm
->
var
,
"isSTP"
))
{
/**********************************************************************/
/**********************************************************************/
if
(
!
strcasecmp
(
parm
->
val
,
"no"
))
{
if
(
!
strcasecmp
(
parm
->
val
,
"no"
))
{
...
@@ -1383,15 +1382,47 @@ static int ftmod_ss7_parse_mtp_route(ftdm_conf_node_t *mtp_route)
...
@@ -1383,15 +1382,47 @@ static int ftmod_ss7_parse_mtp_route(ftdm_conf_node_t *mtp_route)
parm
=
parm
+
1
;
parm
=
parm
+
1
;
}
}
/* pull up the linktype, switchtype, and SSF from the linkset */
mtpRoute
.
linkType
=
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
mtpRoute
.
linkSetId
].
linkType
;
mtpRoute
.
switchType
=
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
mtpRoute
.
linkSetId
].
switchType
;
mtpRoute
.
ssf
=
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
mtpRoute
.
linkSetId
].
ssf
;
/* fill in the rest of the values in the mtpRoute struct */
/* fill in the rest of the values in the mtpRoute struct */
mtpRoute
.
nwId
=
mtpRoute
.
id
;
mtpRoute
.
nwId
=
mtpRoute
.
id
;
mtpRoute
.
cmbLinkSetId
=
mtpRoute
.
id
;
mtpRoute
.
cmbLinkSetId
=
mtpRoute
.
id
;
/* parse in the list of linksets this route is reachable by */
linkset
=
mtp_route
->
child
->
child
;
while
(
linkset
!=
NULL
)
{
/**************************************************************************/
/* extract the linkset Id */
ls_id
=
atoi
(
linkset
->
parameters
->
val
);
if
(
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
ls_id
].
id
!=
0
)
{
SS7_DEBUG
(
"Found mtpRoute linkset id = %d that is valid
\n
"
,
ls_id
);
}
else
{
SS7_ERROR
(
"Found mtpRoute linkset id = %d that is invalid
\n
"
,
ls_id
);
goto
move_along
;
}
/* pull up the linktype, switchtype, and SSF from the linkset */
mtpRoute
.
linkType
=
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
ls_id
].
linkType
;
mtpRoute
.
switchType
=
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
ls_id
].
switchType
;
mtpRoute
.
ssf
=
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
ls_id
].
ssf
;
/* extract the number of cmbLinkSetId aleady on this linkset */
numLinks
=
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
ls_id
].
numLinks
;
/* add this routes cmbLinkSetId to the list */
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
ls_id
].
links
[
numLinks
]
=
mtpRoute
.
cmbLinkSetId
;
/* increment the number of cmbLinkSets on this linkset */
g_ftdm_sngss7_data
.
cfg
.
mtpLinkSet
[
ls_id
].
numLinks
++
;
move_along:
/* move to the next linkset element */
linkset
=
linkset
->
next
;
/**************************************************************************/
}
/* while (linkset != null) */
ftmod_ss7_fill_in_mtp3_route
(
&
mtpRoute
);
ftmod_ss7_fill_in_mtp3_route
(
&
mtpRoute
);
ftmod_ss7_fill_in_nsap
(
&
mtpRoute
);
ftmod_ss7_fill_in_nsap
(
&
mtpRoute
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论