Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6b77b4ec
提交
6b77b4ec
authored
9月 20, 2010
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of git@homer:smg_freeswitch
上级
95cf2209
108ae5c4
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
291 行增加
和
392 行删除
+291
-392
ftmod_sangoma_ss7_cli.c
...eetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c
+24
-0
ftmod_sangoma_ss7_handle.c
...dm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
+140
-319
ftmod_sangoma_ss7_logger.c
...dm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c
+8
-0
ftmod_sangoma_ss7_main.c
...etdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
+46
-9
ftmod_sangoma_ss7_out.c
...eetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c
+27
-18
ftmod_sangoma_ss7_support.c
...m/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c
+46
-46
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cli.c
浏览文件 @
6b77b4ec
...
...
@@ -1506,6 +1506,10 @@ static ftdm_status_t handle_tx_cgb(ftdm_stream_handle_t *stream, int span, int c
sngss7_span_data_t
*
sngss7_span
;
int
byte
=
0
;
int
bit
=
0
;
ftdm_sigmsg_t
sigev
;
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
if
(
range
>
31
)
{
stream
->
write_function
(
stream
,
"Invalid range value %d"
,
range
);
...
...
@@ -1531,6 +1535,14 @@ static ftdm_status_t handle_tx_cgb(ftdm_stream_handle_t *stream, int span, int c
/* throw the grp maint. block flag */
sngss7_set_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_TX
);
/* bring the sig status down */
sigev
.
chan_id
=
ftdmchan
->
chan_id
;
sigev
.
span_id
=
ftdmchan
->
span_id
;
sigev
.
channel
=
ftdmchan
;
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_DOWN
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* if this is the first channel in the range */
if
(
ftdmchan
->
physical_chan_id
==
chan
)
{
/* attach the cgb information */
...
...
@@ -1575,6 +1587,10 @@ static ftdm_status_t handle_tx_cgu(ftdm_stream_handle_t *stream, int span, int c
sngss7_span_data_t
*
sngss7_span
;
int
byte
=
0
;
int
bit
=
0
;
ftdm_sigmsg_t
sigev
;
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
if
(
range
>
31
)
{
stream
->
write_function
(
stream
,
"Invalid range value %d"
,
range
);
...
...
@@ -1600,6 +1616,14 @@ static ftdm_status_t handle_tx_cgu(ftdm_stream_handle_t *stream, int span, int c
/* throw the grp maint. block flag */
sngss7_clear_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_TX
);
/* bring the sig status up */
sigev
.
chan_id
=
ftdmchan
->
chan_id
;
sigev
.
span_id
=
ftdmchan
->
span_id
;
sigev
.
channel
=
ftdmchan
;
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_UP
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* if this is the first channel in the range */
if
(
ftdmchan
->
physical_chan_id
==
chan
)
{
/* attach the cgb information */
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
浏览文件 @
6b77b4ec
...
...
@@ -93,21 +93,13 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
if
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GLARE
))
{
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx IAM (glare detected on circuit)
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx IAM (glare)
\n
"
,
sngss7_info
->
circuit
->
cic
);
}
else
{
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx IAM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx IAM
\n
"
,
sngss7_info
->
circuit
->
cic
);
}
/* check if the circuit has a remote block */
...
...
@@ -287,21 +279,13 @@ ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
}
switch
(
evntType
)
{
/**************************************************************************/
case
(
ADDRCMPLT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx ACM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx ACM
\n
"
,
sngss7_info
->
circuit
->
cic
);
switch
(
ftdmchan
->
state
)
{
/**********************************************************************/
case
FTDM_CHANNEL_STATE_DIALING
:
...
...
@@ -322,115 +306,115 @@ ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circ
}
/* switch (ftdmchan->state) */
/**************************************************************************/
case
(
MODIFY
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx MODIFY
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx MODIFY
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
MODCMPLT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx MODIFY-COMPLETE
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx MODIFY-COMPLETE
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
MODREJ
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx MODIFY-REJECT
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx MODIFY-REJECT
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
PROGRESS
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CPG
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CPG
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
FRWDTRSFR
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx FOT
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx FOT
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
INFORMATION
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx INF
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx INF
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
INFORMATREQ
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx INR
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx INR
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
SUBSADDR
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx SAM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx SAM
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
EXIT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx EXIT
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx EXIT
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
NETRESMGT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx NRM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx NRM
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
IDENTREQ
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx IDR
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx IDR
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
IDENTRSP
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx IRS
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx IRS
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
MALCLLPRNT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx MALICIOUS CALL
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx MALICIOUS CALL
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
CHARGE
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CRG
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CRG
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
TRFFCHGE
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CRG-TARIFF
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CRG-TARIFF
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
CHARGEACK
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CRG-ACK
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CRG-ACK
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
CALLOFFMSG
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CALL-OFFER
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CALL-OFFER
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
LOOPPRVNT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx LOP
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx LOP
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
TECT_TIMEOUT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx ECT-Timeout
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx ECT-Timeout
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
RINGSEND
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx RINGING-SEND
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RINGING-SEND
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
CALLCLEAR
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CALL-LINE Clear
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CALL-LINE Clear
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
PRERELEASE
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx PRI
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx PRI
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
APPTRANSPORT
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx APM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx APM
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
OPERATOR
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx OPERATOR
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx OPERATOR
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
METPULSE
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx METERING-PULSE
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx METERING-PULSE
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
CLGPTCLR
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CALLING_PARTY_CLEAR
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CALLING_PARTY_CLEAR
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
case
(
SUBDIRNUM
):
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx SUB-DIR
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx SUB-DIR
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
default:
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Unknown Msg
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Unknown Msg
\n
"
,
sngss7_info
->
circuit
->
cic
);
break
;
/**************************************************************************/
}
...
...
@@ -457,25 +441,16 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* check whether the ftdm channel is in a state to accept a call */
switch
(
ftdmchan
->
state
)
{
/**************************************************************************/
case
FTDM_CHANNEL_STATE_PROGRESS
:
case
FTDM_CHANNEL_STATE_PROGRESS_MEDIA
:
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx ANM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx ANM
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* go to UP */
ftdm_set_state_locked
(
ftdmchan
,
FTDM_CHANNEL_STATE_UP
);
...
...
@@ -484,7 +459,7 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/**************************************************************************/
case
FTDM_CHANNEL_STATE_DIALING
:
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CON
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CON
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* go to UP */
ftdm_set_state_locked
(
ftdmchan
,
FTDM_CHANNEL_STATE_UP
);
...
...
@@ -493,7 +468,7 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/**************************************************************************/
default:
/* incorrect state...reset the CIC */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx ANM/CON
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx ANM/CON
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* throw the TX reset flag */
sngss7_set_flag
(
sngss7_info
,
FLAG_GRP_RESET_TX
);
...
...
@@ -527,18 +502,12 @@ ftdm_status_t handle_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx REL
\n
"
);
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx REL cause=%d
\n
"
,
sngss7_info
->
circuit
->
cic
,
siRelEvnt
->
causeDgn
.
causeVal
.
val
);
/* check whether the ftdm channel is in a state to release a call */
switch
(
ftdmchan
->
state
)
{
...
...
@@ -616,18 +585,10 @@ ftdm_status_t handle_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx RLC
\n
"
);
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RLC
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* check whether the ftdm channel is in a state to accept a call */
switch
(
ftdmchan
->
state
)
{
...
...
@@ -675,18 +636,10 @@ ftdm_status_t handle_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx DATA IND
\n
"
);
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx DATA IND
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* unlock the channel */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
...
...
@@ -710,18 +663,10 @@ ftdm_status_t handle_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx FAC
\n
"
);
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx FAC
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* unlock the channel */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
...
...
@@ -745,18 +690,10 @@ ftdm_status_t handle_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx FAC-CON
\n
"
);
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx FAC-CON
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* unlock the channel */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
...
...
@@ -780,18 +717,10 @@ ftdm_status_t handle_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx USER-USER msg
\n
"
);
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx USER-USER msg
\n
"
,
sngss7_info
->
circuit
->
cic
);
/* unlock the channel */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
...
...
@@ -818,217 +747,217 @@ ftdm_status_t handle_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
switch
(
evntType
)
{
/**************************************************************************/
case
SIT_STA_REATTEMPT
:
/* reattempt indication */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Reattempt indication
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Reattempt indication
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_reattempt
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_ERRORIND
:
/* error indication */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Error indication
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Error indication
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CONTCHK
:
/* continuity check */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx COT start
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx COT start
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cot_start
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CONTREP
:
/* continuity report */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx COT report
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx COT report
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cot
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_STPCONTIN
:
/* stop continuity */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx COT stop
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx COT stop
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cot_stop
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CGQRYRSP
:
/* circuit grp query response from far end forwarded to upper layer by ISUP */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CQM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CQM
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CONFUSION
:
/* confusion */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CFN
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CFN
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_LOOPBACKACK
:
/* loop-back acknowledge */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx LPA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx LPA
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CIRRSRVREQ
:
/* circuit reservation request */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Ckt Resveration req
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Ckt Resveration req
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CIRRSRVACK
:
/* circuit reservation acknowledgement */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Ckt Res ack
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Ckt Res ack
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CIRBLOREQ
:
/* circuit blocking request */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx BLO
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx BLO
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_blo_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRBLORSP
:
/* circuit blocking response */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx BLA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx BLA
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_blo_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRUBLREQ
:
/* circuit unblocking request */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx UBL
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx UBL
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_ubl_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRUBLRSP
:
/* circuit unblocking response */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx UBA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx UBA
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_ubl_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRRESREQ
:
/* circuit reset request - RSC */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx RSC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RSC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_rsc_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRLOCRES
:
/* reset initiated locally by the software */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Local RSC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Local RSC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_local_rsc_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRRESRSP
:
/* circuit reset response */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx RSC-RLC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RSC-RLC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_rsc_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CGBREQ
:
/* CGB request */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CGB
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CGB
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cgb_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CGUREQ
:
/* CGU request */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CGU
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CGU
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cgu_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CGQRYREQ
:
/* circuit group query request */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx CQM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CQM
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CGBRSP
:
/* mntc. oriented CGB response */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx mntc CGB
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx mntc CGB
\n
"
,
sngss7_info
->
circuit
->
cic
);
/*handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);*/
break
;
/**************************************************************************/
case
SIT_STA_CGURSP
:
/* mntc. oriented CGU response */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx mntc CGU
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx mntc CGU
\n
"
,
sngss7_info
->
circuit
->
cic
);
/*SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));*/
break
;
/**************************************************************************/
case
SIT_STA_GRSREQ
:
/* circuit group reset request */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx GRS
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx GRS
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_grs_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRUNEQPD
:
/* circuit unequipped indication */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx UCIC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx UCIC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_ucic
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_GRSRSP
:
/* circuit group reset response */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx GRA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx GRA
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_grs_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_PAUSEIND
:
/* pause indication */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx SUS
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx SUS
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_pause
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_RESUMEIND
:
/* resume indication */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx RES
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RES
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_resume
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_USRPARTA
:
/* user part available */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx UPA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx UPA
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_RMTUSRUNAV
:
/* remote user not available */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Remote User not Available
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Remote User not Available
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_MTPCONG0
:
/* congestion indication level 0 */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Congestion L0
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Congestion L0
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_MTPCONG1
:
/* congestion indication level 1 */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Congestion L1
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Congestion L1
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_MTPCONG2
:
/* congestion indication level 2 */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Congestion L2
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Congestion L2
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_MTPCONG3
:
/* congestion indication level 3 */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Congestion L3
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Congestion L3
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_MTPSTPCONG
:
/* stop congestion indication level 0 */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Stop Congestion
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Stop Congestion
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CIRLOCALBLOIND
:
/* Mngmt local blocking */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Local BLO
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Local BLO
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_local_blk
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_CIRLOCALUBLIND
:
/* Mngmt local unblocking */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Local UBL
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Local UBL
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_local_ubl
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
/**************************************************************************/
case
SIT_STA_OVERLOAD
:
/* Overload */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Overload
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Overload
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_LMCGBREQ
:
/* when LM requests ckt grp blocking */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx LM CGB
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx LM CGB
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_LMCGUREQ
:
/* when LM requests ckt grp unblocking */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx LM CGU
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx LM CGU
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_LMGRSREQ
:
/* when LM requests ckt grp reset */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx LM RSC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx LM RSC
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
case
SIT_STA_CGBINFOIND
:
/* circuit grp blking ind , no resp req */
/*SS7_
MSG_TRACE(ftdmchan, sngss7_info, "Rx CGB no resp req\n"
);*/
/*SS7_
INFO_CHAN(ftdmchan,"[CIC:%d]Rx CGB no resp req\n", sngss7_info->circuit->cic
);*/
/* handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);*/
break
;
/**************************************************************************/
case
SIT_STA_LMCQMINFOREQ
:
/* when LM requests ckt grp query */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx LM CQM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx LM CQM
\n
"
,
sngss7_info
->
circuit
->
cic
);
// SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break
;
/**************************************************************************/
case
SIT_STA_CIRLOCGRS
:
/* group reset initiated locally by the software */
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Rx Local GRS
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Local GRS
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
/**************************************************************************/
...
...
@@ -1057,17 +986,9 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
if
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GLARE
))
{
/* the glare flag is already up so it was caught ... do nothing */
SS7_DEBUG_CHAN
(
ftdmchan
,
"Glare flag is already up...nothing to do!%s
\n
"
,
" "
);
...
...
@@ -1106,7 +1027,7 @@ ftdm_status_t handle_pause(uint32_t suInstId, uint32_t spInstId, uint32_t circui
int
infId
;
int
i
;
/* extract the affect infId from the circuit structure */
/* extract the affect
ed
infId from the circuit structure */
infId
=
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
infId
;
/* go through all the circuits now and find any other circuits on this infId */
...
...
@@ -1216,17 +1137,9 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* open the channel if it is not open */
if
(
!
ftdm_test_flag
(
ftdmchan
,
FTDM_CHANNEL_OPEN
))
{
if
(
ftdm_channel_open_chan
(
ftdmchan
)
!=
FTDM_SUCCESS
)
{
...
...
@@ -1274,17 +1187,9 @@ ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t cir
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* tell the core to stop looping the channel */
ftdm_channel_command
(
ftdmchan
,
FTDM_COMMAND_DISABLE_LOOP
,
NULL
);
...
...
@@ -1335,17 +1240,9 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* check if the circuit is already blocked or not */
if
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_RX
))
{
SS7_WARN
(
"Received BLO on circuit that is already blocked!
\n
"
);
...
...
@@ -1379,17 +1276,9 @@ ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* KONRAD FIX ME */
/* unlock the channel again before we exit */
...
...
@@ -1414,17 +1303,9 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* check if the channel is blocked */
if
(
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_RX
)))
{
SS7_WARN
(
"Received UBL on circuit that is not blocked!
\n
"
);
...
...
@@ -1461,17 +1342,9 @@ ftdm_status_t handle_ubl_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* KONRAD FIX ME */
/* unlock the channel again before we exit */
...
...
@@ -1496,17 +1369,9 @@ ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* throw the reset flag */
sngss7_set_flag
(
sngss7_info
,
FLAG_RESET_RX
);
...
...
@@ -1549,17 +1414,9 @@ ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* throw the reset flag */
sngss7_set_flag
(
sngss7_info
,
FLAG_RESET_RX
);
...
...
@@ -1602,17 +1459,9 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
switch
(
ftdmchan
->
state
)
{
/**********************************************************************/
case
FTDM_CHANNEL_STATE_RESTART
:
...
...
@@ -1704,15 +1553,8 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
break
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_ASSERT
;
};
/* fill in the span structure for this circuit */
sngss7_span
=
ftdmchan
->
span
->
mod_data
;
...
...
@@ -1780,15 +1622,8 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
break
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_ASSERT
;
};
SS7_INFO_CHAN
(
ftdmchan
,
"Rx GRA (%d:%d)
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
...
...
@@ -1862,17 +1697,9 @@ ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t ci
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* check if the circuit is already blocked or not */
if
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_LC_BLOCK_RX
))
{
SS7_WARN
(
"Received local BLO on circuit that is already blocked!
\n
"
);
...
...
@@ -1906,17 +1733,9 @@ ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t ci
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* check if the circuit is already blocked or not */
if
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_LC_UNBLK_RX
))
{
SS7_WARN
(
"Received local UBL on circuit that is already unblocked!
\n
"
);
...
...
@@ -1950,17 +1769,9 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
return
FTDM_FAIL
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_ASSERT
;
};
/* throw the ckt block flag */
sngss7_set_flag
(
sngss7_info
,
FLAG_CKT_UCIC_BLOCK
);
...
...
@@ -1988,7 +1799,9 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
int
byte
=
0
;
int
bit
=
0
;
int
x
;
ftdm_sigmsg_t
sigev
;
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
/* get the ftdmchan and ss7_chan_data from the circuit */
...
...
@@ -2040,22 +1853,17 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* loop over the cics starting from circuit until range+1 */
for
(
x
=
circuit
;
x
<
(
circuit
+
range
+
1
);
x
++
)
{
/* confirm this is a voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
type
!=
VOICE
)
continue
;
/* grab the circuit in question */
if
(
extract_chan_data
(
x
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
x
);
break
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_ASSERT
;
};
#if 0
SS7_ERROR("KONRAD -> circuit=%d, byte=%d, bit=%d, status[byte]=%d, math=%d\n",
...
...
@@ -2085,6 +1893,15 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
}
/* switch (blockType) */
}
sigev
.
chan_id
=
ftdmchan
->
chan_id
;
sigev
.
span_id
=
ftdmchan
->
span_id
;
sigev
.
channel
=
ftdmchan
;
/* bring the sig status down */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_DOWN
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* unlock the channel again before we exit */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
...
...
@@ -2123,7 +1940,9 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
int
byte
=
0
;
int
bit
=
0
;
int
x
;
ftdm_sigmsg_t
sigev
;
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
/* get the ftdmchan and ss7_chan_data from the circuit */
...
...
@@ -2140,7 +1959,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
if
((
siStaEvnt
->
cgsmti
.
eh
.
pres
==
PRSNT_NODEF
)
&&
(
siStaEvnt
->
cgsmti
.
typeInd
.
pres
==
PRSNT_NODEF
))
{
blockType
=
siStaEvnt
->
cgsmti
.
typeInd
.
val
;
}
else
{
SS7_ERROR
(
"Received CG
B
with no circuit group supervision value on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_ERROR
(
"Received CG
U
with no circuit group supervision value on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
...
...
@@ -2149,7 +1968,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
if
((
siStaEvnt
->
rangStat
.
eh
.
pres
==
PRSNT_NODEF
)
&&
(
siStaEvnt
->
rangStat
.
range
.
pres
==
PRSNT_NODEF
))
{
range
=
siStaEvnt
->
rangStat
.
range
.
val
;
}
else
{
SS7_ERROR
(
"Received CG
B
with no range value on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_ERROR
(
"Received CG
U
with no range value on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
...
...
@@ -2160,7 +1979,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
status
[
x
]
=
siStaEvnt
->
rangStat
.
status
.
val
[
x
];
}
}
else
{
SS7_ERROR
(
"Received CG
B
with no status value on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_ERROR
(
"Received CG
U
with no status value on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
...
...
@@ -2182,15 +2001,8 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
break
;
}
/*
now that we have the right channel...put a lock on it so no-one else can use it
*/
/*
lock the channel
*/
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
/* check if there is a pending state change, give it a bit to clear */
if
(
check_for_state_change
(
ftdmchan
))
{
SS7_ERROR
(
"Failed to wait for pending state change on CIC = %d
\n
"
,
sngss7_info
->
circuit
->
cic
);
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
SS7_ASSERT
;
};
if
(
status
[
byte
]
&
(
1
<<
bit
))
{
switch
(
blockType
)
{
...
...
@@ -2210,7 +2022,16 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
break
;
/**********************************************************************/
}
/* switch (blockType) */
}
/* */
}
/* if (status[byte] & (1 << bit)) */
sigev
.
chan_id
=
ftdmchan
->
chan_id
;
sigev
.
span_id
=
ftdmchan
->
span_id
;
sigev
.
channel
=
ftdmchan
;
/* bring the sig status down */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_UP
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* unlock the channel again before we exit */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c
浏览文件 @
6b77b4ec
...
...
@@ -496,6 +496,12 @@ void handle_sng_isup_alarm(Pst *pst, SiMngmt *sta)
/* initalize the msg variable to NULLs */
memset
(
&
msg
[
0
],
'\0'
,
sizeof
(
&
msg
));
/* if the event is REMOTE/LOCAL we don't need to print these */
if
((
sta
->
t
.
usta
.
alarm
.
event
==
LSI_EVENT_REMOTE
)
||
(
sta
->
t
.
usta
.
alarm
.
event
==
LSI_EVENT_LOCAL
))
{
return
;
}
/* point p to the first spot in msg */
p
=
&
msg
[
0
];
...
...
@@ -728,6 +734,8 @@ void handle_sng_isup_alarm(Pst *pst, SiMngmt *sta)
DECODE_LSI_EVENT
(
sta
->
t
.
usta
.
alarm
.
event
),
DECODE_LSI_CAUSE
(
sta
->
t
.
usta
.
alarm
.
cause
));
return
;
}
/* handle_isup_alarm */
/******************************************************************************/
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
浏览文件 @
6b77b4ec
...
...
@@ -454,9 +454,9 @@ static void ftdm_sangoma_ss7_process_stack_event (sngss7_event_data_t *sngss7_ev
/******************************************************************************/
static
void
ftdm_sangoma_ss7_process_state_change
(
ftdm_channel_t
*
ftdmchan
)
{
ftdm_sigmsg_t
sigev
;
sngss7_chan_data_t
*
sngss7_info
=
ftdmchan
->
call_data
;
int
i
=
0
;
ftdm_sigmsg_t
sigev
;
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
...
...
@@ -788,14 +788,24 @@ static void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_RESET_TX
))
&&
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_RESET_RX
)))
{
/* check if the sig status is down, and bring it up if it isn't */
if
(
!
ftdm_test_flag
(
ftdmchan
,
FTDM_CHANNEL_SIG_UP
))
{
SS7_DEBUG_CHAN
(
ftdmchan
,
"All reset flags cleared %s
\n
"
,
""
);
/* all flags are down so we can bring up the sig status */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_UP
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
}
/* now check if there is an active block */
if
(
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_LC_BLOCK_RX
))
&&
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_RX
))
&&
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_TX
))
&&
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_HW_BLOCK_RX
))
&&
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_HW_BLOCK_TX
))
&&
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_RX
))
&&
!
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_TX
)))
{
/* check if the sig status is down, and bring it up if it isn't */
if
(
!
ftdm_test_flag
(
ftdmchan
,
FTDM_CHANNEL_SIG_UP
))
{
SS7_DEBUG_CHAN
(
ftdmchan
,
"All reset flags cleared %s
\n
"
,
""
);
/* all flags are down so we can bring up the sig status */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_UP
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
}
/* if (!ftdm_test_flag (ftdmchan, FTDM_CHANNEL_SIG_UP)) */
}
/* if !blocked */
}
else
{
SS7_DEBUG_CHAN
(
ftdmchan
,
"Reset flags present (0x%X)
\n
"
,
sngss7_info
->
flags
);
...
...
@@ -993,6 +1003,11 @@ static void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
if
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_RX
))
{
SS7_DEBUG_CHAN
(
ftdmchan
,
"Processing CKT_MN_BLOCK_RX flag %s
\n
"
,
""
);
/* bring the sig status down */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_DOWN
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* send a BLA */
ft_to_sngss7_bla
(
ftdmchan
);
...
...
@@ -1006,6 +1021,11 @@ static void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/* clear the unblock flag */
sngss7_clear_flag
(
sngss7_info
,
FLAG_CKT_MN_UNBLK_RX
);
/* bring the sig status up */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_UP
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* send a uba */
ft_to_sngss7_uba
(
ftdmchan
);
...
...
@@ -1017,6 +1037,11 @@ static void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
if
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_TX
))
{
SS7_DEBUG_CHAN
(
ftdmchan
,
"Processing CKT_MN_BLOCK_TX flag %s
\n
"
,
""
);
/* bring the sig status down */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_DOWN
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* send a blo */
ft_to_sngss7_blo
(
ftdmchan
);
...
...
@@ -1030,6 +1055,11 @@ static void ftdm_sangoma_ss7_process_state_change (ftdm_channel_t * ftdmchan)
/* clear the unblock flag */
sngss7_clear_flag
(
sngss7_info
,
FLAG_CKT_MN_UNBLK_TX
);
/* bring the sig status up */
sigev
.
event_id
=
FTDM_SIGEVENT_SIGSTATUS_CHANGED
;
sigev
.
sigstatus
=
FTDM_SIG_STATE_UP
;
ftdm_span_send_signal
(
ftdmchan
->
span
,
&
sigev
);
/* send a ubl */
ft_to_sngss7_ubl
(
ftdmchan
);
...
...
@@ -1403,6 +1433,9 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_ss7_span_config)
static
FIO_SIG_LOAD_FUNCTION
(
ftdm_sangoma_ss7_init
)
{
/*this function is called by the FT-core to load the signaling module */
uint32_t
major
=
0
;
uint32_t
minor
=
0
;
uint32_t
build
=
0
;
ftdm_log
(
FTDM_LOG_INFO
,
"Loading ftmod_sangoma_ss7...
\n
"
);
...
...
@@ -1452,6 +1485,10 @@ static FIO_SIG_LOAD_FUNCTION(ftdm_sangoma_ss7_init)
/* initalize sng_ss7 library */
sng_isup_init
(
&
sng_event
);
/* print the version of the library being used */
sng_isup_version
(
&
major
,
&
minor
,
&
build
);
SS7_INFO
(
"Loaded LibSng-SS7 %d.%d.%d
\n
"
,
major
,
minor
,
build
);
/* crash on assert fail */
ftdm_global_set_crash_policy
(
FTDM_CRASH_ON_ASSERT
);
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c
浏览文件 @
6b77b4ec
...
...
@@ -199,7 +199,8 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
&
iam
,
0
);
SS7_INFO_CHAN
(
ftdmchan
,
"Tx IAM clg =
\"
%s
\"
, cld =
\"
%s
\"\n
"
,
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx IAM clg =
\"
%s
\"
, cld =
\"
%s
\"\n
"
,
sngss7_info
->
circuit
->
cic
,
ftdmchan
->
caller_data
.
cid_num
.
digits
,
ftdmchan
->
caller_data
.
dnis
.
digits
);
...
...
@@ -250,7 +251,7 @@ void ft_to_sngss7_acm (ftdm_channel_t * ftdmchan)
&
acm
,
ADDRCMPLT
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx ACM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx ACM
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -274,7 +275,7 @@ void ft_to_sngss7_anm (ftdm_channel_t * ftdmchan)
&
anm
,
5
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx ANM
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx ANM
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -307,7 +308,9 @@ void ft_to_sngss7_rel (ftdm_channel_t * ftdmchan)
sngss7_info
->
circuit
->
id
,
&
rel
);
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx REL
\n
"
);
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx REL cause=%d
\n
"
,
sngss7_info
->
circuit
->
cic
,
ftdmchan
->
caller_data
.
hangup_cause
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -330,7 +333,7 @@ void ft_to_sngss7_rlc (ftdm_channel_t * ftdmchan)
sngss7_info
->
circuit
->
id
,
&
rlc
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx RLC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx RLC
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -351,7 +354,7 @@ void ft_to_sngss7_rsc (ftdm_channel_t * ftdmchan)
SIT_STA_CIRRESREQ
,
NULL
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx RSC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx RSC
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -372,7 +375,7 @@ void ft_to_sngss7_rsca (ftdm_channel_t * ftdmchan)
SIT_STA_CIRRESRSP
,
NULL
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx RSC-RLC
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx RSC-RLC
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -393,7 +396,7 @@ void ft_to_sngss7_blo (ftdm_channel_t * ftdmchan)
SIT_STA_CIRBLOREQ
,
NULL
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx BLO
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx BLO
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -414,7 +417,7 @@ void ft_to_sngss7_bla (ftdm_channel_t * ftdmchan)
SIT_STA_CIRBLORSP
,
NULL
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx BLA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx BLA
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -436,7 +439,7 @@ ft_to_sngss7_ubl (ftdm_channel_t * ftdmchan)
SIT_STA_CIRUBLREQ
,
NULL
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx UBL
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx UBL
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -457,7 +460,7 @@ void ft_to_sngss7_uba (ftdm_channel_t * ftdmchan)
SIT_STA_CIRUBLRSP
,
NULL
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx UBA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx UBA
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -478,7 +481,7 @@ void ft_to_sngss7_lpa (ftdm_channel_t * ftdmchan)
SIT_STA_LOOPBACKACK
,
NULL
);
SS7_
MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx LPA
\n
"
);
SS7_
INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx LPA
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
...
...
@@ -519,7 +522,8 @@ void ft_to_sngss7_gra (ftdm_channel_t * ftdmchan)
SIT_STA_GRSRSP
,
&
gra
);
SS7_INFO_CHAN
(
ftdmchan
,
"Tx GRA (%d:%d)
\n
"
,
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx GRA (%d:%d)
\n
"
,
sngss7_info
->
circuit
->
cic
,
sngss7_info
->
circuit
->
cic
,
(
sngss7_info
->
circuit
->
cic
+
sngss7_span
->
rx_grs
.
range
));
...
...
@@ -551,7 +555,8 @@ void ft_to_sngss7_grs (ftdm_channel_t * ftdmchan)
SIT_STA_GRSREQ
,
&
grs
);
SS7_INFO_CHAN
(
ftdmchan
,
"Tx GRS (%d:%d)
\n
"
,
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx GRS (%d:%d)
\n
"
,
sngss7_info
->
circuit
->
cic
,
sngss7_info
->
circuit
->
cic
,
(
sngss7_info
->
circuit
->
cic
+
sngss7_span
->
tx_grs
.
range
));
...
...
@@ -596,7 +601,8 @@ void ft_to_sngss7_cgba(ftdm_channel_t * ftdmchan)
SIT_STA_CGBRSP
,
&
cgba
);
SS7_INFO_CHAN
(
ftdmchan
,
"Tx CGBA (%d:%d)
\n
"
,
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx CGBA (%d:%d)
\n
"
,
sngss7_info
->
circuit
->
cic
,
sngss7_info
->
circuit
->
cic
,
(
sngss7_info
->
circuit
->
cic
+
sngss7_span
->
rx_cgb
.
range
));
...
...
@@ -644,7 +650,8 @@ void ft_to_sngss7_cgua(ftdm_channel_t * ftdmchan)
SIT_STA_CGURSP
,
&
cgua
);
SS7_INFO_CHAN
(
ftdmchan
,
"Tx CGUA (%d:%d)
\n
"
,
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx CGUA (%d:%d)
\n
"
,
sngss7_info
->
circuit
->
cic
,
sngss7_info
->
circuit
->
cic
,
(
sngss7_info
->
circuit
->
cic
+
sngss7_span
->
rx_cgu
.
range
));
...
...
@@ -693,7 +700,8 @@ void ft_to_sngss7_cgb(ftdm_channel_t * ftdmchan)
SIT_STA_CGBREQ
,
&
cgb
);
SS7_INFO_CHAN
(
ftdmchan
,
"Tx CGB (%d:%d)
\n
"
,
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx CGB (%d:%d)
\n
"
,
sngss7_info
->
circuit
->
cic
,
sngss7_info
->
circuit
->
cic
,
(
sngss7_info
->
circuit
->
cic
+
sngss7_span
->
tx_cgb
.
range
));
...
...
@@ -742,7 +750,8 @@ void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan)
SIT_STA_CGUREQ
,
&
cgu
);
SS7_INFO_CHAN
(
ftdmchan
,
"Tx CGU (%d:%d)
\n
"
,
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Tx CGU (%d:%d)
\n
"
,
sngss7_info
->
circuit
->
cic
,
sngss7_info
->
circuit
->
cic
,
(
sngss7_info
->
circuit
->
cic
+
sngss7_span
->
tx_cgu
.
range
));
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c
浏览文件 @
6b77b4ec
...
...
@@ -464,7 +464,7 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ASSERT
;
continue
;
}
/* lock the channel */
...
...
@@ -476,61 +476,61 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
if
(
!
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_RESET_RX_DN
))
{
/* this channel is still resetting...do nothing */
goto
GRS_UNLOCK_ALL
;
}
/* if (!sngss7_test_flag(sngss7_info, FLAG_GRP_RESET_RX_DN)) */
}
else
{
/* state change pending */
goto
GRS_UNLOCK_ALL
;
}
}
/* for ( i = circuit; i < (circuit + range + 1); i++) */
}
/* if (!sngss7_test_flag(sngss7_info, FLAG_GRP_RESET_RX_DN)) */
}
else
{
/* state change pending */
goto
GRS_UNLOCK_ALL
;
}
}
/* for ( i = circuit; i < (circuit + range + 1); i++) */
SS7_DEBUG
(
"All circuits out of reset for GRS: circuit=%d, range=%d
\n
"
,
sngss7_span
->
rx_grs
.
circuit
,
sngss7_span
->
rx_grs
.
range
);
SS7_DEBUG
(
"All circuits out of reset for GRS: circuit=%d, range=%d
\n
"
,
sngss7_span
->
rx_grs
.
circuit
,
sngss7_span
->
rx_grs
.
range
);
/* check all the circuits in the range to see if they are done resetting */
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* check all the circuits in the range to see if they are done resetting */
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ASSERT
;
}
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ASSERT
;
}
/* throw the GRP reset flag complete flag */
sngss7_set_flag
(
sngss7_info
,
FLAG_GRP_RESET_RX_CMPLT
);
/* throw the GRP reset flag complete flag */
sngss7_set_flag
(
sngss7_info
,
FLAG_GRP_RESET_RX_CMPLT
);
/* move the channel to the down state */
ftdm_set_state_locked
(
ftdmchan
,
FTDM_CHANNEL_STATE_DOWN
);
/* move the channel to the down state */
ftdm_set_state_locked
(
ftdmchan
,
FTDM_CHANNEL_STATE_DOWN
);
/* update the status map if the ckt is in blocked state */
if
((
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_RX
))
||
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_TX
))
||
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_RX
))
||
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_RX
)))
{
sngss7_span
->
rx_grs
.
status
[
byte
]
=
(
sngss7_span
->
rx_grs
.
status
[
byte
]
|
(
1
<<
bit
));
}
/* if blocked */
/* update the bit and byte counter*/
bit
++
;
if
(
bit
==
8
)
{
byte
++
;
bit
=
0
;
}
}
/* for ( i = circuit; i < (circuit + range + 1); i++) */
/* update the status map if the ckt is in blocked state */
if
((
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_RX
))
||
(
sngss7_test_flag
(
sngss7_info
,
FLAG_CKT_MN_BLOCK_TX
))
||
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_RX
))
||
(
sngss7_test_flag
(
sngss7_info
,
FLAG_GRP_MN_BLOCK_RX
)))
{
sngss7_span
->
rx_grs
.
status
[
byte
]
=
(
sngss7_span
->
rx_grs
.
status
[
byte
]
|
(
1
<<
bit
));
}
/* if blocked */
/* update the bit and byte counter*/
bit
++
;
if
(
bit
==
8
)
{
byte
++
;
bit
=
0
;
}
}
/* for ( i = circuit; i < (circuit + range + 1); i++) */
GRS_UNLOCK_ALL:
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ASSERT
;
}
/* unlock the channel */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
continue
;
}
/* unlock the channel */
ftdm_mutex_unlock
(
ftdmchan
->
mutex
);
}
return
FTDM_SUCCESS
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论