Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
1d3d1658
提交
1d3d1658
authored
10月 25, 2011
作者:
Nenad Corbic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: ftdm_running checks on handle, implemented no wait block
上级
fc997aae
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
75 行增加
和
32 行删除
+75
-32
ftmod_sangoma_ss7_cntrl.c
...tdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cntrl.c
+6
-30
ftmod_sangoma_ss7_handle.c
...dm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
+65
-0
ftmod_sangoma_ss7_main.h
...etdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
+3
-1
ftmod_sangoma_ss7_relay.c
...tdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c
+1
-1
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cntrl.c
浏览文件 @
1d3d1658
...
@@ -48,35 +48,7 @@ static int ftmod_ss7_enable_isap(int suId);
...
@@ -48,35 +48,7 @@ static int ftmod_ss7_enable_isap(int suId);
static
int
ftmod_ss7_enable_nsap
(
int
suId
);
static
int
ftmod_ss7_enable_nsap
(
int
suId
);
static
int
ftmod_ss7_enable_mtpLinkSet
(
int
lnkSetId
);
static
int
ftmod_ss7_enable_mtpLinkSet
(
int
lnkSetId
);
int
ftmod_ss7_inhibit_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_uninhibit_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_bind_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_unbind_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_activate_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_deactivate_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_deactivate2_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_activate_mtplinkSet
(
uint32_t
id
);
int
ftmod_ss7_deactivate_mtplinkSet
(
uint32_t
id
);
int
ftmod_ss7_deactivate2_mtplinkSet
(
uint32_t
id
);
int
ftmod_ss7_lpo_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_lpr_mtp3link
(
uint32_t
id
);
int
ftmod_ss7_shutdown_isup
(
void
);
int
ftmod_ss7_shutdown_mtp3
(
void
);
int
ftmod_ss7_shutdown_mtp2
(
void
);
int
ftmod_ss7_shutdown_relay
(
void
);
int
ftmod_ss7_disable_relay_channel
(
uint32_t
chanId
);
int
ftmod_ss7_disable_grp_mtp3Link
(
uint32_t
procId
);
int
ftmod_ss7_enable_grp_mtp3Link
(
uint32_t
procId
);
int
ftmod_ss7_disable_grp_mtp2Link
(
uint32_t
procId
);
int
ftmod_ss7_block_isup_ckt
(
uint32_t
cktId
);
int
ftmod_ss7_unblock_isup_ckt
(
uint32_t
cktId
);
/******************************************************************************/
/******************************************************************************/
/* FUNCTIONS ******************************************************************/
/* FUNCTIONS ******************************************************************/
...
@@ -848,7 +820,7 @@ int ftmod_ss7_disable_grp_mtp2Link(uint32_t procId)
...
@@ -848,7 +820,7 @@ int ftmod_ss7_disable_grp_mtp2Link(uint32_t procId)
}
}
/******************************************************************************/
/******************************************************************************/
int
ftmod_ss7_block_isup_ckt
(
uint32_t
cktId
)
int
__ftmod_ss7_block_isup_ckt
(
uint32_t
cktId
,
ftdm_bool_t
wait
)
{
{
SiMngmt
cntrl
;
SiMngmt
cntrl
;
Pst
pst
;
Pst
pst
;
...
@@ -876,7 +848,11 @@ int ftmod_ss7_block_isup_ckt(uint32_t cktId)
...
@@ -876,7 +848,11 @@ int ftmod_ss7_block_isup_ckt(uint32_t cktId)
cntrl
.
t
.
cntrl
.
action
=
ADISIMM
;
/* block via BLO */
cntrl
.
t
.
cntrl
.
action
=
ADISIMM
;
/* block via BLO */
cntrl
.
t
.
cntrl
.
subAction
=
SAELMNT
;
/* specificed element */
cntrl
.
t
.
cntrl
.
subAction
=
SAELMNT
;
/* specificed element */
if
(
wait
==
FTDM_TRUE
)
{
return
(
sng_cntrl_isup
(
&
pst
,
&
cntrl
));
return
(
sng_cntrl_isup
(
&
pst
,
&
cntrl
));
}
else
{
return
(
sng_cntrl_isup_nowait
(
&
pst
,
&
cntrl
));
}
}
}
/******************************************************************************/
/******************************************************************************/
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
浏览文件 @
1d3d1658
...
@@ -87,6 +87,8 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -87,6 +87,8 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* FUNCTIONS ******************************************************************/
/* FUNCTIONS ******************************************************************/
#define ftdm_running_return(var) if (!ftdm_running()) { SS7_ERROR("Error: ftdm_running is not set! Ignoring\n"); return var; }
ftdm_status_t
handle_con_ind
(
uint32_t
suInstId
,
uint32_t
spInstId
,
uint32_t
circuit
,
SiConEvnt
*
siConEvnt
)
ftdm_status_t
handle_con_ind
(
uint32_t
suInstId
,
uint32_t
spInstId
,
uint32_t
circuit
,
SiConEvnt
*
siConEvnt
)
{
{
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
...
@@ -97,6 +99,8 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -97,6 +99,8 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
memset
(
var
,
'\0'
,
sizeof
(
var
));
memset
(
var
,
'\0'
,
sizeof
(
var
));
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -342,6 +346,8 @@ ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -342,6 +346,8 @@ ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -597,6 +603,8 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -597,6 +603,8 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -672,6 +680,8 @@ ftdm_status_t handle_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -672,6 +680,8 @@ ftdm_status_t handle_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -794,6 +804,8 @@ ftdm_status_t handle_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -794,6 +804,8 @@ ftdm_status_t handle_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -845,6 +857,8 @@ ftdm_status_t handle_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -845,6 +857,8 @@ ftdm_status_t handle_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -872,6 +886,8 @@ ftdm_status_t handle_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -872,6 +886,8 @@ ftdm_status_t handle_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -899,6 +915,8 @@ ftdm_status_t handle_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -899,6 +915,8 @@ ftdm_status_t handle_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -926,6 +944,8 @@ ftdm_status_t handle_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
...
@@ -926,6 +944,8 @@ ftdm_status_t handle_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -953,6 +973,8 @@ ftdm_status_t handle_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
...
@@ -953,6 +973,8 @@ ftdm_status_t handle_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -980,6 +1002,8 @@ ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
...
@@ -980,6 +1002,8 @@ ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
sngss7_chan_data_t
*
sngss7_info
;
sngss7_chan_data_t
*
sngss7_info
;
ftdm_channel_t
*
ftdmchan
;
ftdm_channel_t
*
ftdmchan
;
ftdm_running_return
(
FTDM_FAIL
);
/* get the ftdmchan and ss7_chan_data from the circuit */
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
...
@@ -1004,6 +1028,8 @@ ftdm_status_t handle_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1004,6 +1028,8 @@ ftdm_status_t handle_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
{
{
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is active on our side otherwise move to the next circuit */
/* confirm that the circuit is active on our side otherwise move to the next circuit */
if
(
!
sngss7_test_flag
(
&
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
],
SNGSS7_ACTIVE
))
{
if
(
!
sngss7_test_flag
(
&
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
],
SNGSS7_ACTIVE
))
{
SS7_ERROR
(
"[CIC:%d]Rx %s but circuit is not active yet, skipping!
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s but circuit is not active yet, skipping!
\n
"
,
...
@@ -1204,6 +1230,8 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -1204,6 +1230,8 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1266,6 +1294,8 @@ ftdm_status_t handle_pause(uint32_t suInstId, uint32_t spInstId, uint32_t circui
...
@@ -1266,6 +1294,8 @@ ftdm_status_t handle_pause(uint32_t suInstId, uint32_t spInstId, uint32_t circui
int
infId
;
int
infId
;
int
i
;
int
i
;
ftdm_running_return
(
FTDM_FAIL
);
/* extract the affected infId from the circuit structure */
/* extract the affected infId from the circuit structure */
infId
=
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
infId
;
infId
=
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
infId
;
...
@@ -1331,6 +1361,8 @@ ftdm_status_t handle_resume(uint32_t suInstId, uint32_t spInstId, uint32_t circu
...
@@ -1331,6 +1361,8 @@ ftdm_status_t handle_resume(uint32_t suInstId, uint32_t spInstId, uint32_t circu
int
infId
;
int
infId
;
int
i
;
int
i
;
ftdm_running_return
(
FTDM_FAIL
);
/* extract the affect infId from the circuit structure */
/* extract the affect infId from the circuit structure */
infId
=
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
infId
;
infId
=
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
infId
;
...
@@ -1395,6 +1427,8 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -1395,6 +1427,8 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1450,6 +1484,8 @@ ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t cir
...
@@ -1450,6 +1484,8 @@ ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t cir
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1495,6 +1531,8 @@ ftdm_status_t handle_cot(uint32_t suInstId, uint32_t spInstId, uint32_t circuit,
...
@@ -1495,6 +1531,8 @@ ftdm_status_t handle_cot(uint32_t suInstId, uint32_t spInstId, uint32_t circuit,
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1563,6 +1601,8 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1563,6 +1601,8 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1613,6 +1653,8 @@ ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1613,6 +1653,8 @@ ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1654,6 +1696,8 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1654,6 +1696,8 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1742,6 +1786,8 @@ ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1742,6 +1786,8 @@ ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1801,6 +1847,8 @@ ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_
...
@@ -1801,6 +1847,8 @@ ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1859,6 +1907,8 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1859,6 +1907,8 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -1949,6 +1999,8 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1949,6 +1999,8 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_span_data_t
*
sngss7_span
=
NULL
;
sngss7_span_data_t
*
sngss7_span
=
NULL
;
int
range
=
0
;
int
range
=
0
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -2006,6 +2058,8 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -2006,6 +2058,8 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_span_data_t
*
sngss7_span
=
NULL
;
sngss7_span_data_t
*
sngss7_span
=
NULL
;
int
range
=
0
;
int
range
=
0
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -2070,6 +2124,8 @@ ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -2070,6 +2124,8 @@ ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -2120,6 +2176,8 @@ ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -2120,6 +2176,8 @@ ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t ci
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
@@ -2174,6 +2232,7 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
...
@@ -2174,6 +2232,7 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
sngss7_span_data_t
*
sngss7_span
=
NULL
;
sngss7_span_data_t
*
sngss7_span
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
...
@@ -2255,6 +2314,8 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -2255,6 +2314,8 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
int
bit
=
0
;
int
bit
=
0
;
int
x
;
int
x
;
ftdm_running_return
(
FTDM_FAIL
);
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
...
@@ -2402,6 +2463,8 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -2402,6 +2463,8 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
int
x
;
int
x
;
ftdm_sigmsg_t
sigev
;
ftdm_sigmsg_t
sigev
;
ftdm_running_return
(
FTDM_FAIL
);
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
...
@@ -2539,6 +2602,8 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -2539,6 +2602,8 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
sngss7_chan_data_t
*
sngss7_info
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_running_return
(
FTDM_FAIL
);
/* confirm that the circuit is voice channel */
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
SNG_CKT_VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
浏览文件 @
1d3d1658
...
@@ -732,7 +732,9 @@ int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId);
...
@@ -732,7 +732,9 @@ int ftmod_ss7_enable_grp_mtp3Link(uint32_t procId);
int
ftmod_ss7_disable_grp_mtp2Link
(
uint32_t
procId
);
int
ftmod_ss7_disable_grp_mtp2Link
(
uint32_t
procId
);
int
ftmod_ss7_block_isup_ckt
(
uint32_t
cktId
);
#define ftmod_ss7_block_isup_ckt(x) __ftmod_ss7_block_isup_ckt(x,FTDM_TRUE)
#define ftmod_ss7_block_isup_ckt_nowait(x) __ftmod_ss7_block_isup_ckt(x,FTDM_FALSE)
int
__ftmod_ss7_block_isup_ckt
(
uint32_t
cktId
,
ftdm_bool_t
wait
);
int
ftmod_ss7_unblock_isup_ckt
(
uint32_t
cktId
);
int
ftmod_ss7_unblock_isup_ckt
(
uint32_t
cktId
);
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c
浏览文件 @
1d3d1658
...
@@ -248,7 +248,7 @@ ftdm_status_t block_all_ckts_for_relay(uint32_t procId)
...
@@ -248,7 +248,7 @@ ftdm_status_t block_all_ckts_for_relay(uint32_t procId)
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
type
==
SNG_CKT_VOICE
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
type
==
SNG_CKT_VOICE
)
{
/* send a block request via stack manager */
/* send a block request via stack manager */
ret
=
ftmod_ss7_block_isup_ckt
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
id
);
ret
=
ftmod_ss7_block_isup_ckt
_nowait
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
id
);
if
(
ret
)
{
if
(
ret
)
{
SS7_INFO
(
"Successfully BLOcked CIC:%d(ckt:%d) due to Relay failure
\n
"
,
SS7_INFO
(
"Successfully BLOcked CIC:%d(ckt:%d) due to Relay failure
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
cic
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
cic
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论