Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
69bada70
提交
69bada70
authored
6月 11, 2012
作者:
kapil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
removign sctp/peer id from <m2ua_interface> config xml block
上级
8b017f6c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
43 行增加
和
33 行删除
+43
-33
ftmod_sangoma_ss7_m2ua.c
...etdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_m2ua.c
+43
-18
ftmod_sangoma_ss7_m2ua.h
...etdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_m2ua.h
+0
-2
ftmod_sangoma_ss7_m2ua_xml.c
.../src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_m2ua_xml.c
+0
-13
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_m2ua.c
浏览文件 @
69bada70
...
@@ -51,8 +51,9 @@ static int ftmod_sctp_config(int id);
...
@@ -51,8 +51,9 @@ static int ftmod_sctp_config(int id);
static
ftdm_status_t
ftmod_sctp_sap_config
(
int
id
);
static
ftdm_status_t
ftmod_sctp_sap_config
(
int
id
);
static
ftdm_status_t
ftmod_sctp_tsap_config
(
int
id
);
static
ftdm_status_t
ftmod_sctp_tsap_config
(
int
id
);
static
int
ftmod_m2ua_gen_config
(
void
);
static
int
ftmod_m2ua_gen_config
(
void
);
static
int
ftmod_m2ua_sctsap_config
(
int
id
);
static
int
ftmod_m2ua_sctsap_config
(
int
m2ua_inf_id
,
int
sctp_
id
);
static
int
ftmod_m2ua_peer_config
(
int
id
);
static
int
ftmod_m2ua_peer_config
(
int
id
);
static
int
ftmod_m2ua_peer_config1
(
int
m2ua_inf_id
,
int
peer_id
);
static
int
ftmod_m2ua_cluster_config
(
int
idx
);
static
int
ftmod_m2ua_cluster_config
(
int
idx
);
static
int
ftmod_m2ua_dlsap_config
(
int
idx
);
static
int
ftmod_m2ua_dlsap_config
(
int
idx
);
static
int
ftmod_nif_gen_config
(
void
);
static
int
ftmod_nif_gen_config
(
void
);
...
@@ -283,13 +284,6 @@ ftdm_status_t sng_m2ua_cfg(void)
...
@@ -283,13 +284,6 @@ ftdm_status_t sng_m2ua_cfg(void)
if
((
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
x
].
id
!=
0
)
&&
if
((
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
x
].
id
!=
0
)
&&
(
!
(
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
x
].
flags
&
SNGSS7_CONFIGURED
)))
{
(
!
(
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
x
].
flags
&
SNGSS7_CONFIGURED
)))
{
if
(
ftmod_m2ua_sctsap_config
(
x
))
{
ftdm_log
(
FTDM_LOG_ERROR
,
"M2UA SCTSAP[%d] configuration: NOT OK
\n
"
,
x
);
return
FTDM_FAIL
;
}
else
{
ftdm_log
(
FTDM_LOG_INFO
,
"M2UA SCTSAP[%d] configuration: OK
\n
"
,
x
);
}
/****************************************************************************************************/
/****************************************************************************************************/
/* M2UA PEER configurations */
/* M2UA PEER configurations */
...
@@ -780,13 +774,44 @@ static int ftmod_m2ua_gen_config(void)
...
@@ -780,13 +774,44 @@ static int ftmod_m2ua_gen_config(void)
}
}
/**********************************************************************************************/
/**********************************************************************************************/
static
int
ftmod_m2ua_sctsap_config
(
int
id
)
static
int
ftmod_m2ua_peer_config
(
int
id
)
{
int
x
=
0
;
int
peer_id
=
0
;
sng_m2ua_cfg_t
*
m2ua
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
id
];
sng_m2ua_cluster_cfg_t
*
clust
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_clus
[
m2ua
->
clusterId
];
sng_m2ua_peer_cfg_t
*
peer
=
NULL
;
/* loop through peer list from cluster to configure SCTSAP */
for
(
x
=
0
;
x
<
clust
->
numOfPeers
;
x
++
){
peer_id
=
clust
->
peerIdLst
[
x
];
peer
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_peer
[
peer_id
];
if
(
ftmod_m2ua_sctsap_config
(
id
,
peer
->
sctpId
)){
ftdm_log
(
FTDM_LOG_ERROR
,
" ftmod_m2ua_sctsap_config: M2UA SCTSAP for M2UA Intf Id[%d] config FAILED
\n
"
,
id
);
return
0x01
;
}
else
{
ftdm_log
(
FTDM_LOG_ERROR
,
" ftmod_m2ua_sctsap_config: M2UA SCTSAP for M2UA Intf Id[%d] config SUCCESS
\n
"
,
id
);
}
if
(
ftmod_m2ua_peer_config1
(
id
,
peer_id
)){
ftdm_log
(
FTDM_LOG_ERROR
,
" ftmod_m2ua_peer_config1: M2UA Peer configuration for M2UA Intf Id[%d] config FAILED
\n
"
,
id
);
return
0x01
;
}
else
{
ftdm_log
(
FTDM_LOG_ERROR
,
" ftmod_m2ua_peer_config1: M2UA Peer configuration for M2UA Intf Id[%d] config SUCCESS
\n
"
,
id
);
}
}
return
0x0
;;
}
static
int
ftmod_m2ua_sctsap_config
(
int
m2ua_inf_id
,
int
sctp_id
)
{
{
int
i
;
int
i
;
Pst
pst
;
Pst
pst
;
MwMgmt
cfg
;
MwMgmt
cfg
;
sng_m2ua_cfg_t
*
m2ua
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
id
];
sng_sctp_link_t
*
sctp
=
&
g_ftdm_sngss7_data
.
cfg
.
sctpCfg
.
linkCfg
[
sctp_id
];
sng_sctp_link_t
*
sctp
=
&
g_ftdm_sngss7_data
.
cfg
.
sctpCfg
.
linkCfg
[
m2ua
->
sctpId
];
memset
((
U8
*
)
&
cfg
,
0
,
sizeof
(
MwMgmt
));
memset
((
U8
*
)
&
cfg
,
0
,
sizeof
(
MwMgmt
));
memset
((
U8
*
)
&
pst
,
0
,
sizeof
(
Pst
));
memset
((
U8
*
)
&
pst
,
0
,
sizeof
(
Pst
));
...
@@ -802,7 +827,7 @@ static int ftmod_m2ua_sctsap_config(int id)
...
@@ -802,7 +827,7 @@ static int ftmod_m2ua_sctsap_config(int id)
cfg
.
hdr
.
elmId
.
elmnt
=
STMWSCTSAP
;
/* SCTSAP */
cfg
.
hdr
.
elmId
.
elmnt
=
STMWSCTSAP
;
/* SCTSAP */
cfg
.
hdr
.
transId
=
0
;
/* transaction identifier */
cfg
.
hdr
.
transId
=
0
;
/* transaction identifier */
cfg
.
hdr
.
response
.
selector
=
0
;
cfg
.
hdr
.
response
.
selector
=
0
;
cfg
.
hdr
.
response
.
prior
=
PRIOR0
;
cfg
.
hdr
.
response
.
prior
=
PRIOR0
;
cfg
.
hdr
.
response
.
route
=
RTESPEC
;
cfg
.
hdr
.
response
.
route
=
RTESPEC
;
cfg
.
hdr
.
response
.
mem
.
region
=
S_REG
;
cfg
.
hdr
.
response
.
mem
.
region
=
S_REG
;
...
@@ -811,9 +836,9 @@ static int ftmod_m2ua_sctsap_config(int id)
...
@@ -811,9 +836,9 @@ static int ftmod_m2ua_sctsap_config(int id)
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
reConfig
.
selector
=
0
;
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
reConfig
.
selector
=
0
;
/* service user SAP ID */
/* service user SAP ID */
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
suId
=
m2ua
->
id
;
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
suId
=
m2ua
_inf_
id
;
/* service provider ID */
/* service provider ID */
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
spId
=
m2ua
->
sctpI
d
;
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
spId
=
sctp_i
d
;
/* source port number */
/* source port number */
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
srcPort
=
2904
;
cfg
.
t
.
cfg
.
s
.
sctSapCfg
.
srcPort
=
2904
;
/* interface address */
/* interface address */
...
@@ -858,13 +883,12 @@ static int ftmod_m2ua_sctsap_config(int id)
...
@@ -858,13 +883,12 @@ static int ftmod_m2ua_sctsap_config(int id)
/****************************************************************************************************/
/****************************************************************************************************/
/* M2UA - Peer configuration */
/* M2UA - Peer configuration */
static
int
ftmod_m2ua_peer_config
(
int
id
)
static
int
ftmod_m2ua_peer_config
1
(
int
m2ua_inf_id
,
int
peer_
id
)
{
{
int
i
;
int
i
;
Pst
pst
;
Pst
pst
;
MwMgmt
cfg
;
MwMgmt
cfg
;
sng_m2ua_cfg_t
*
m2ua
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
id
];
sng_m2ua_peer_cfg_t
*
peer
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_peer
[
peer_id
];
sng_m2ua_peer_cfg_t
*
peer
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_peer
[
m2ua
->
peerId
];
sng_sctp_link_t
*
sctp
=
&
g_ftdm_sngss7_data
.
cfg
.
sctpCfg
.
linkCfg
[
peer
->
sctpId
];
sng_sctp_link_t
*
sctp
=
&
g_ftdm_sngss7_data
.
cfg
.
sctpCfg
.
linkCfg
[
peer
->
sctpId
];
memset
((
U8
*
)
&
cfg
,
0
,
sizeof
(
MwMgmt
));
memset
((
U8
*
)
&
cfg
,
0
,
sizeof
(
MwMgmt
));
...
@@ -1615,9 +1639,10 @@ int ftmod_m2ua_ssta_req(int elemt, int id, MwMgmt* cfm)
...
@@ -1615,9 +1639,10 @@ int ftmod_m2ua_ssta_req(int elemt, int id, MwMgmt* cfm)
{
{
MwMgmt
ssta
;
MwMgmt
ssta
;
Pst
pst
;
Pst
pst
;
int
peerId
=
0x01
;
sng_m2ua_cfg_t
*
m2ua
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
id
];
sng_m2ua_cfg_t
*
m2ua
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
id
];
sng_m2ua_cluster_cfg_t
*
clust
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_clus
[
m2ua
->
clusterId
];
sng_m2ua_cluster_cfg_t
*
clust
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_clus
[
m2ua
->
clusterId
];
sng_m2ua_peer_cfg_t
*
peer
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_peer
[
m2ua
->
peerId
];
sng_m2ua_peer_cfg_t
*
peer
=
&
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua_peer
[
peerId
];
/*TODO - KAPIL - need to add proper peerId*/
memset
((
U8
*
)
&
pst
,
0
,
sizeof
(
Pst
));
memset
((
U8
*
)
&
pst
,
0
,
sizeof
(
Pst
));
memset
((
U8
*
)
&
ssta
,
0
,
sizeof
(
MwMgmt
));
memset
((
U8
*
)
&
ssta
,
0
,
sizeof
(
MwMgmt
));
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_m2ua.h
浏览文件 @
69bada70
...
@@ -60,8 +60,6 @@ typedef struct sng_m2ua_cfg{
...
@@ -60,8 +60,6 @@ typedef struct sng_m2ua_cfg{
uint32_t
flags
;
uint32_t
flags
;
uint32_t
id
;
/* ID */
uint32_t
id
;
/* ID */
uint8_t
nodeType
;
/*Node Type SG/ASP */
uint8_t
nodeType
;
/*Node Type SG/ASP */
uint16_t
sctpId
;
/* idx to sctp profile */
uint16_t
peerId
;
/* idx to m2ua_peer profile */
uint16_t
clusterId
;
/* idx to m2ua_cluster profile */
uint16_t
clusterId
;
/* idx to m2ua_cluster profile */
}
sng_m2ua_cfg_t
;
}
sng_m2ua_cfg_t
;
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_m2ua_xml.c
浏览文件 @
69bada70
...
@@ -252,17 +252,6 @@ static int ftmod_ss7_parse_m2ua_interface(ftdm_conf_node_t *m2ua_interface)
...
@@ -252,17 +252,6 @@ static int ftmod_ss7_parse_m2ua_interface(ftdm_conf_node_t *m2ua_interface)
}
}
SS7_DEBUG
(
"Found an nif node_type = %d
\n
"
,
sng_m2ua
.
nodeType
);
SS7_DEBUG
(
"Found an nif node_type = %d
\n
"
,
sng_m2ua
.
nodeType
);
/**********************************************************************/
/**********************************************************************/
}
else
if
(
!
strcasecmp
(
parm
->
var
,
"sctp_id"
))
{
/**********************************************************************/
sng_m2ua
.
sctpId
=
atoi
(
parm
->
val
);
SS7_DEBUG
(
"Found an m2ua sctp_id = %d
\n
"
,
sng_m2ua
.
sctpId
);
/**********************************************************************/
}
else
if
(
!
strcasecmp
(
parm
->
var
,
"peerd_id"
))
{
/**********************************************************************/
sng_m2ua
.
peerId
=
atoi
(
parm
->
val
);
SS7_DEBUG
(
"Found an m2ua peerd_id = %d
\n
"
,
sng_m2ua
.
peerId
);
/**********************************************************************/
/**********************************************************************/
}
else
if
(
!
strcasecmp
(
parm
->
var
,
"cluster_id"
))
{
}
else
if
(
!
strcasecmp
(
parm
->
var
,
"cluster_id"
))
{
/**********************************************************************/
/**********************************************************************/
...
@@ -299,8 +288,6 @@ static int ftmod_ss7_fill_in_m2ua_interface(sng_m2ua_cfg_t *m2ua_iface)
...
@@ -299,8 +288,6 @@ static int ftmod_ss7_fill_in_m2ua_interface(sng_m2ua_cfg_t *m2ua_iface)
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
id
=
m2ua_iface
->
id
;
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
id
=
m2ua_iface
->
id
;
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
nodeType
=
m2ua_iface
->
nodeType
;
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
nodeType
=
m2ua_iface
->
nodeType
;
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
sctpId
=
m2ua_iface
->
sctpId
;
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
peerId
=
m2ua_iface
->
peerId
;
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
clusterId
=
m2ua_iface
->
clusterId
;
g_ftdm_sngss7_data
.
cfg
.
g_m2ua_cfg
.
m2ua
[
i
].
clusterId
=
m2ua_iface
->
clusterId
;
sngss7_set_flag
(
&
g_ftdm_sngss7_data
.
cfg
,
SNGSS7_M2UA_PRESENT
);
sngss7_set_flag
(
&
g_ftdm_sngss7_data
.
cfg
,
SNGSS7_M2UA_PRESENT
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论