Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c0a2a225
提交
c0a2a225
authored
3月 08, 2011
作者:
Konrad Hammel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: ss7 - bug fix in GRS handling
上级
dcf515ff
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
364 行增加
和
131 行删除
+364
-131
ftmod_sangoma_ss7_cfg.c
...eetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c
+6
-9
ftmod_sangoma_ss7_handle.c
...dm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
+327
-112
ftmod_sangoma_ss7_support.c
...m/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c
+31
-10
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_cfg.c
浏览文件 @
c0a2a225
...
@@ -396,7 +396,6 @@ int ft_to_sngss7_cfg_all(void)
...
@@ -396,7 +396,6 @@ int ft_to_sngss7_cfg_all(void)
x
=
(
g_ftdm_sngss7_data
.
cfg
.
procId
*
1000
)
+
1
;
x
=
(
g_ftdm_sngss7_data
.
cfg
.
procId
*
1000
)
+
1
;
while
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
id
!=
0
)
{
while
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
id
!=
0
)
{
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
type
==
VOICE
)
{
if
(
ftmod_ss7_isup_ckt_config
(
x
))
{
if
(
ftmod_ss7_isup_ckt_config
(
x
))
{
SS7_CRITICAL
(
"ISUP CKT %d configuration FAILED!
\n
"
,
x
);
SS7_CRITICAL
(
"ISUP CKT %d configuration FAILED!
\n
"
,
x
);
...
@@ -405,8 +404,6 @@ int ft_to_sngss7_cfg_all(void)
...
@@ -405,8 +404,6 @@ int ft_to_sngss7_cfg_all(void)
SS7_INFO
(
"ISUP CKT %d configuration DONE!
\n
"
,
x
);
SS7_INFO
(
"ISUP CKT %d configuration DONE!
\n
"
,
x
);
}
}
}
/* if ( g_ftdm_sngss7_data.cfg.isupCkt[x].type == VOICE) */
/* set the SNGSS7_CONFIGURED flag */
/* set the SNGSS7_CONFIGURED flag */
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
flags
|=
SNGSS7_CONFIGURED
;
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
x
].
flags
|=
SNGSS7_CONFIGURED
;
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
浏览文件 @
c0a2a225
...
@@ -881,238 +881,187 @@ ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
...
@@ -881,238 +881,187 @@ ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/******************************************************************************/
/******************************************************************************/
ftdm_status_t
handle_sta_ind
(
uint32_t
suInstId
,
uint32_t
spInstId
,
uint32_t
circuit
,
uint8_t
globalFlg
,
uint8_t
evntType
,
SiStaEvnt
*
siStaEvnt
)
ftdm_status_t
handle_sta_ind
(
uint32_t
suInstId
,
uint32_t
spInstId
,
uint32_t
circuit
,
uint8_t
globalFlg
,
uint8_t
evntType
,
SiStaEvnt
*
siStaEvnt
)
{
{
sngss7_chan_data_t
*
sngss7_info
;
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
ftdm_channel_t
*
ftdmchan
;
/* 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]Circuit is not active yet, skipping!
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
);
SS7_ERROR
(
"[CIC:%d]Rx %s but circuit is not active yet, skipping!
\n
"
,
return
FTDM_FAIL
;
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
}
DECODE_LCC_EVENT
(
evntType
));
/* get the ftdmchan and ss7_chan_data from the circuit */
if
(
extract_chan_data
(
circuit
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
switch
(
evntType
)
{
switch
(
evntType
)
{
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_REATTEMPT
:
/* reattempt indication */
case
SIT_STA_REATTEMPT
:
/* reattempt indication */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Reattempt indication
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_reattempt
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_reattempt
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_ERRORIND
:
/* error indication */
case
SIT_STA_ERRORIND
:
/* error indication */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CONTCHK
:
/* continuity check */
case
SIT_STA_CONTCHK
:
/* continuity check */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CCR start
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cot_start
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_cot_start
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CONTREP
:
/* continuity report */
case
SIT_STA_CONTREP
:
/* continuity report */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx COT report
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cot
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_cot
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_STPCONTIN
:
/* stop continuity */
case
SIT_STA_STPCONTIN
:
/* stop continuity */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CCR stop
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cot_stop
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_cot_stop
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CGQRYRSP
:
/* circuit grp query response from far end forwarded to upper layer by ISUP */
case
SIT_STA_CGQRYRSP
:
/* circuit grp query response from far end forwarded to upper layer by ISUP */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CONFUSION
:
/* confusion */
case
SIT_STA_CONFUSION
:
/* confusion */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_LOOPBACKACK
:
/* loop-back acknowledge */
case
SIT_STA_LOOPBACKACK
:
/* loop-back acknowledge */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRRSRVREQ
:
/* circuit reservation request */
case
SIT_STA_CIRRSRVREQ
:
/* circuit reservation request */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRRSRVACK
:
/* circuit reservation acknowledgement */
case
SIT_STA_CIRRSRVACK
:
/* circuit reservation acknowledgement */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRBLOREQ
:
/* circuit blocking request */
case
SIT_STA_CIRBLOREQ
:
/* circuit blocking request */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx BLO
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_blo_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_blo_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRBLORSP
:
/* circuit blocking response */
case
SIT_STA_CIRBLORSP
:
/* circuit blocking response */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx BLA
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_blo_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_blo_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRUBLREQ
:
/* circuit unblocking request */
case
SIT_STA_CIRUBLREQ
:
/* circuit unblocking request */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx UBL
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_ubl_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_ubl_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRUBLRSP
:
/* circuit unblocking response */
case
SIT_STA_CIRUBLRSP
:
/* circuit unblocking response */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx UBA
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_ubl_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_ubl_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRRESREQ
:
/* circuit reset request - RSC */
case
SIT_STA_CIRRESREQ
:
/* circuit reset request - RSC */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RSC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_rsc_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_rsc_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRLOCRES
:
/* reset initiated locally by the software */
case
SIT_STA_CIRLOCRES
:
/* reset initiated locally by the software */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Local RSC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_local_rsc_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_local_rsc_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRRESRSP
:
/* circuit reset response */
case
SIT_STA_CIRRESRSP
:
/* circuit reset response */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RSC-RLC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_rsc_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_rsc_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CGBREQ
:
/* CGB request */
case
SIT_STA_CGBREQ
:
/* CGB request */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CGB
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cgb_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_cgb_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CGUREQ
:
/* CGU request */
case
SIT_STA_CGUREQ
:
/* CGU request */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx CGU
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_cgu_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_cgu_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CGQRYREQ
:
/* circuit group query request */
case
SIT_STA_CGQRYREQ
:
/* circuit group query request */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CGBRSP
:
/* mntc. oriented CGB response */
case
SIT_STA_CGBRSP
:
/* mntc. oriented CGB response */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx mntc CGB
\n
"
,
sngss7_info
->
circuit
->
cic
);
/*handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);*/
/*handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);*/
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CGURSP
:
/* mntc. oriented CGU response */
case
SIT_STA_CGURSP
:
/* mntc. oriented CGU response */
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));*/
/*SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));*/
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_GRSREQ
:
/* circuit group reset request */
case
SIT_STA_GRSREQ
:
/* circuit group reset request */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx GRS
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_grs_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_grs_req
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRUNEQPD
:
/* circuit unequipped indication */
case
SIT_STA_CIRUNEQPD
:
/* circuit unequipped indication */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx UCIC
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_ucic
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_ucic
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_GRSRSP
:
/* circuit group reset response */
case
SIT_STA_GRSRSP
:
/* circuit group reset response */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx GRA
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_grs_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_grs_rsp
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_PAUSEIND
:
/* pause indication */
case
SIT_STA_PAUSEIND
:
/* pause indication */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx SUS
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_pause
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_pause
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_RESUMEIND
:
/* resume indication */
case
SIT_STA_RESUMEIND
:
/* resume indication */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx RES
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_resume
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_resume
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_USRPARTA
:
/* user part available */
case
SIT_STA_USRPARTA
:
/* user part available */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_RMTUSRUNAV
:
/* remote user not available */
case
SIT_STA_RMTUSRUNAV
:
/* remote user not available */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_MTPCONG0
:
/* congestion indication level 0 */
case
SIT_STA_MTPCONG0
:
/* congestion indication level 0 */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_MTPCONG1
:
/* congestion indication level 1 */
case
SIT_STA_MTPCONG1
:
/* congestion indication level 1 */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_MTPCONG2
:
/* congestion indication level 2 */
case
SIT_STA_MTPCONG2
:
/* congestion indication level 2 */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_MTPCONG3
:
/* congestion indication level 3 */
case
SIT_STA_MTPCONG3
:
/* congestion indication level 3 */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_MTPSTPCONG
:
/* stop congestion indication level 0 */
case
SIT_STA_MTPSTPCONG
:
/* stop congestion indication level 0 */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRLOCALBLOIND
:
/* Mngmt local blocking */
case
SIT_STA_CIRLOCALBLOIND
:
/* Mngmt local blocking */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Local BLO
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_local_blk
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_local_blk
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRLOCALUBLIND
:
/* Mngmt local unblocking */
case
SIT_STA_CIRLOCALUBLIND
:
/* Mngmt local unblocking */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Local UBL
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_local_ubl
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_local_ubl
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_OVERLOAD
:
/* Overload */
case
SIT_STA_OVERLOAD
:
/* Overload */
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Overload
\n
"
,
sngss7_info
->
circuit
->
cic
);
handle_olm_msg
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
handle_olm_msg
(
suInstId
,
spInstId
,
circuit
,
globalFlg
,
evntType
,
siStaEvnt
);
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_LMCGBREQ
:
/* when LM requests ckt grp blocking */
case
SIT_STA_LMCGBREQ
:
/* when LM requests ckt grp blocking */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_LMCGUREQ
:
/* when LM requests ckt grp unblocking */
case
SIT_STA_LMCGUREQ
:
/* when LM requests ckt grp unblocking */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_LMGRSREQ
:
/* when LM requests ckt grp reset */
case
SIT_STA_LMGRSREQ
:
/* when LM requests ckt grp reset */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CGBINFOIND
:
/* circuit grp blking ind , no resp req */
case
SIT_STA_CGBINFOIND
:
/* circuit grp blking ind , no resp req */
/*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);*/
/* handle_cgb_req(suInstId, spInstId, circuit, globalFlg, evntType, siStaEvnt);*/
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_LMCQMINFOREQ
:
/* when LM requests ckt grp query */
case
SIT_STA_LMCQMINFOREQ
:
/* when LM requests ckt grp query */
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));
// SS7_WARN(" %s indication not currently supported\n", DECODE_LCC_EVENT(evntType));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
case
SIT_STA_CIRLOCGRS
:
/* group reset initiated locally by the software */
case
SIT_STA_CIRLOCGRS
:
/* group reset initiated locally by the software */
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
));
SS7_WARN
(
" %s indication not currently supported
\n
"
,
DECODE_LCC_EVENT
(
evntType
));
break
;
break
;
/**************************************************************************/
/**************************************************************************/
...
@@ -1134,6 +1083,15 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -1134,6 +1083,15 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP circuit = %d!
\n
"
,
circuit
);
SS7_ERROR
(
"Failed to extract channel data for ISUP circuit = %d!
\n
"
,
circuit
);
...
@@ -1141,6 +1099,11 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -1141,6 +1099,11 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1311,13 +1274,27 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -1311,13 +1274,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1352,13 +1329,27 @@ ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t cir
...
@@ -1352,13 +1329,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1383,13 +1374,27 @@ ftdm_status_t handle_cot(uint32_t suInstId, uint32_t spInstId, uint32_t circuit,
...
@@ -1383,13 +1374,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1437,13 +1442,27 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1437,13 +1442,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1473,13 +1492,27 @@ ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1473,13 +1492,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1500,13 +1533,27 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1500,13 +1533,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1539,13 +1586,27 @@ ftdm_status_t handle_ubl_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1539,13 +1586,27 @@ ftdm_status_t handle_ubl_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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1566,13 +1627,27 @@ ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1566,13 +1627,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1611,13 +1686,26 @@ ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_
...
@@ -1611,13 +1686,26 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1656,13 +1744,27 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1656,13 +1744,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1733,12 +1835,27 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1733,12 +1835,27 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
int
range
;
int
range
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* extract the range value from the event structure */
/* extract the range value from the event structure */
if
((
siStaEvnt
->
rangStat
.
eh
.
pres
==
PRSNT_NODEF
)
&&
(
siStaEvnt
->
rangStat
.
range
.
pres
==
PRSNT_NODEF
))
{
if
((
siStaEvnt
->
rangStat
.
eh
.
pres
==
PRSNT_NODEF
)
&&
(
siStaEvnt
->
rangStat
.
range
.
pres
==
PRSNT_NODEF
))
{
range
=
siStaEvnt
->
rangStat
.
range
.
val
;
range
=
siStaEvnt
->
rangStat
.
range
.
val
;
...
@@ -1769,12 +1886,27 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1769,12 +1886,27 @@ 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
;
int
range
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* extract the range value from the event structure */
/* extract the range value from the event structure */
if
((
siStaEvnt
->
rangStat
.
eh
.
pres
==
PRSNT_NODEF
)
&&
(
siStaEvnt
->
rangStat
.
range
.
pres
==
PRSNT_NODEF
))
{
if
((
siStaEvnt
->
rangStat
.
eh
.
pres
==
PRSNT_NODEF
)
&&
(
siStaEvnt
->
rangStat
.
range
.
pres
==
PRSNT_NODEF
))
{
range
=
siStaEvnt
->
rangStat
.
range
.
val
;
range
=
siStaEvnt
->
rangStat
.
range
.
val
;
...
@@ -1811,13 +1943,27 @@ ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -1811,13 +1943,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1847,13 +1993,27 @@ ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t ci
...
@@ -1847,13 +1993,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* lock the channel */
/* lock the channel */
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
ftdm_mutex_lock
(
ftdmchan
->
mutex
);
...
@@ -1885,13 +2045,27 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
...
@@ -1885,13 +2045,27 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
ftdm_channel_t
*
ftdmchan
=
NULL
;
ftdm_channel_t
*
ftdmchan
=
NULL
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* check if we just sent a GRS request...*/
/* check if we just sent a GRS request...*/
sngss7_span
=
ftdmchan
->
span
->
signal_data
;
sngss7_span
=
ftdmchan
->
span
->
signal_data
;
if
(
sngss7_span
->
tx_grs
.
circuit
>
0
)
{
if
(
sngss7_span
->
tx_grs
.
circuit
>
0
)
{
...
@@ -1934,13 +2108,26 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -1934,13 +2108,26 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* grab the span info */
/* grab the span info */
sngss7_span
=
ftdmchan
->
span
->
signal_data
;
sngss7_span
=
ftdmchan
->
span
->
signal_data
;
...
@@ -2069,13 +2256,27 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -2069,13 +2256,27 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
memset
(
&
sigev
,
0
,
sizeof
(
sigev
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
memset
(
&
status
[
0
],
'\0'
,
sizeof
(
status
));
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* grab the span info */
/* grab the span info */
sngss7_span
=
ftdmchan
->
span
->
signal_data
;
sngss7_span
=
ftdmchan
->
span
->
signal_data
;
...
@@ -2187,13 +2388,27 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
...
@@ -2187,13 +2388,27 @@ 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
;
/* confirm that the circuit is voice channel */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
type
!=
VOICE
)
{
SS7_ERROR
(
"[CIC:%d]Rx %s on non-voice CIC
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
}
else
{
/* 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 ISUP
circuit = %d!
\n
"
,
circuit
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
FTDM_FAIL
;
return
FTDM_FAIL
;
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"[CIC:%d]Rx %s
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
circuit
].
cic
,
DECODE_LCC_EVENT
(
evntType
));
}
/* handle overload */
/* handle overload */
SS7_ERROR_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Overload
\n
"
,
sngss7_info
->
circuit
->
cic
);
SS7_ERROR_CHAN
(
ftdmchan
,
"[CIC:%d]Rx Overload
\n
"
,
sngss7_info
->
circuit
->
cic
);
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c
浏览文件 @
c0a2a225
...
@@ -531,8 +531,18 @@ ftdm_status_t check_if_rx_grs_started(ftdm_span_t *ftdmspan)
...
@@ -531,8 +531,18 @@ ftdm_status_t check_if_rx_grs_started(ftdm_span_t *ftdmspan)
sngss7_span_data_t
*
sngss7_span
=
(
sngss7_span_data_t
*
)
ftdmspan
->
signal_data
;
sngss7_span_data_t
*
sngss7_span
=
(
sngss7_span_data_t
*
)
ftdmspan
->
signal_data
;
int
i
;
int
i
;
SS7_INFO
(
"Rx GRS (%d:%d)
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_grs
.
circuit
].
cic
,
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_grs
.
circuit
].
cic
+
sngss7_span
->
rx_grs
.
range
));
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* confirm this is a voice channel, otherwise we do nothing */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
i
].
type
!=
VOICE
)
{
continue
;
}
/* extract the channel in question */
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
...
@@ -553,10 +563,6 @@ ftdm_status_t check_if_rx_grs_started(ftdm_span_t *ftdmspan)
...
@@ -553,10 +563,6 @@ ftdm_status_t check_if_rx_grs_started(ftdm_span_t *ftdmspan)
ftdm_sangoma_ss7_process_state_change
(
ftdmchan
);
ftdm_sangoma_ss7_process_state_change
(
ftdmchan
);
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"Rx GRS (%d:%d)
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_grs
.
circuit
].
cic
,
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_grs
.
circuit
].
cic
+
sngss7_span
->
rx_grs
.
range
));
/* flag the channel as having received a reset */
/* flag the channel as having received a reset */
sngss7_set_ckt_flag
(
sngss7_info
,
FLAG_GRP_RESET_RX
);
sngss7_set_ckt_flag
(
sngss7_info
,
FLAG_GRP_RESET_RX
);
...
@@ -595,12 +601,14 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
...
@@ -595,12 +601,14 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
int
byte
=
0
;
int
byte
=
0
;
int
bit
=
0
;
int
bit
=
0
;
ftdm_log
(
FTDM_LOG_DEBUG
,
"Found Rx GRS on span %s...checking circuits
\n
"
,
ftdmspan
->
name
);
/* check all the circuits in the range to see if they are done resetting */
/* 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
++
)
{
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* confirm this is a voice channel, otherwise we do nothing */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
i
].
type
!=
VOICE
)
{
continue
;
}
/* extract the channel in question */
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
...
@@ -630,6 +638,11 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
...
@@ -630,6 +638,11 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
/* check all the circuits in the range to see if they are done resetting */
/* 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
++
)
{
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* confirm this is a voice channel, otherwise we do nothing */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
i
].
type
!=
VOICE
)
{
continue
;
}
/* extract the channel in question */
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
...
@@ -664,6 +677,12 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
...
@@ -664,6 +677,12 @@ ftdm_status_t check_if_rx_grs_processed(ftdm_span_t *ftdmspan)
GRS_UNLOCK_ALL:
GRS_UNLOCK_ALL:
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
for
(
i
=
sngss7_span
->
rx_grs
.
circuit
;
i
<
(
sngss7_span
->
rx_grs
.
circuit
+
sngss7_span
->
rx_grs
.
range
+
1
);
i
++
)
{
/* confirm this is a voice channel, otherwise we do nothing */
if
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
i
].
type
!=
VOICE
)
{
continue
;
}
/* extract the channel in question */
/* extract the channel in question */
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
if
(
extract_chan_data
(
i
,
&
sngss7_info
,
&
ftdmchan
))
{
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
SS7_ERROR
(
"Failed to extract channel data for circuit = %d!
\n
"
,
i
);
...
@@ -685,6 +704,10 @@ ftdm_status_t check_if_rx_gra_started(ftdm_span_t *ftdmspan)
...
@@ -685,6 +704,10 @@ ftdm_status_t check_if_rx_gra_started(ftdm_span_t *ftdmspan)
sngss7_span_data_t
*
sngss7_span
=
(
sngss7_span_data_t
*
)
ftdmspan
->
signal_data
;
sngss7_span_data_t
*
sngss7_span
=
(
sngss7_span_data_t
*
)
ftdmspan
->
signal_data
;
int
i
;
int
i
;
SS7_INFO
(
"Rx GRA (%d:%d)
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_gra
.
circuit
].
cic
,
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_gra
.
circuit
].
cic
+
sngss7_span
->
rx_gra
.
range
));
for
(
i
=
sngss7_span
->
rx_gra
.
circuit
;
i
<
(
sngss7_span
->
rx_gra
.
circuit
+
sngss7_span
->
rx_gra
.
range
+
1
);
i
++
)
{
for
(
i
=
sngss7_span
->
rx_gra
.
circuit
;
i
<
(
sngss7_span
->
rx_gra
.
circuit
+
sngss7_span
->
rx_gra
.
range
+
1
);
i
++
)
{
/* extract the channel in question */
/* extract the channel in question */
...
@@ -707,9 +730,7 @@ ftdm_status_t check_if_rx_gra_started(ftdm_span_t *ftdmspan)
...
@@ -707,9 +730,7 @@ ftdm_status_t check_if_rx_gra_started(ftdm_span_t *ftdmspan)
ftdm_sangoma_ss7_process_state_change
(
ftdmchan
);
ftdm_sangoma_ss7_process_state_change
(
ftdmchan
);
}
}
SS7_INFO_CHAN
(
ftdmchan
,
"Rx GRA (%d:%d)
\n
"
,
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_gra
.
circuit
].
cic
,
(
g_ftdm_sngss7_data
.
cfg
.
isupCkt
[
sngss7_span
->
rx_gra
.
circuit
].
cic
+
sngss7_span
->
rx_gra
.
range
));
switch
(
ftdmchan
->
state
)
{
switch
(
ftdmchan
->
state
)
{
/**********************************************************************/
/**********************************************************************/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论