Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
2673bb77
提交
2673bb77
authored
12月 02, 2010
作者:
David Yat Sin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: ISDN - Cause value only evaluated on switchtype=5ESS
上级
60ab93e3
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
45 行增加
和
26 行删除
+45
-26
ftmod_sangoma_isdn_stack_hndl.c
.../ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c
+45
-26
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c
浏览文件 @
2673bb77
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
*/
*/
#include "ftmod_sangoma_isdn.h"
#include "ftmod_sangoma_isdn.h"
ftdm_status_t
sngisdn_cause_val_requires_disconnect
(
ftdm_channel_t
*
ftdmchan
,
CauseDgn
*
causeDgn
);
/* Remote side transmit a SETUP */
/* Remote side transmit a SETUP */
void
sngisdn_process_con_ind
(
sngisdn_event_data_t
*
sngisdn_event
)
void
sngisdn_process_con_ind
(
sngisdn_event_data_t
*
sngisdn_event
)
...
@@ -352,33 +353,15 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)
...
@@ -352,33 +353,15 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)
case
MI_ALERTING
:
case
MI_ALERTING
:
get_prog_ind_ie
(
ftdmchan
,
&
cnStEvnt
->
progInd
);
get_prog_ind_ie
(
ftdmchan
,
&
cnStEvnt
->
progInd
);
if
(
signal_data
->
ignore_cause_value
!=
SNGISDN_OPT_TRUE
&&
if
(
sngisdn_cause_val_requires_disconnect
(
ftdmchan
,
&
cnStEvnt
->
causeDgn
[
0
])
==
FTDM_SUCCESS
)
{
cnStEvnt
->
causeDgn
[
0
].
eh
.
pres
&&
cnStEvnt
->
causeDgn
[
0
].
causeVal
.
pres
)
{
ftdm_log_chan
(
ftdmchan
,
FTDM_LOG_DEBUG
,
"Cause requires disconnect (cause:%d)
\n
"
,
cnStEvnt
->
causeDgn
[
0
].
causeVal
.
val
);
ftdmchan
->
caller_data
.
hangup_cause
=
cnStEvnt
->
causeDgn
[
0
].
causeVal
.
val
;
switch
(
cnStEvnt
->
causeDgn
[
0
].
causeVal
.
val
)
{
case
17
:
/* User Busy */
case
18
:
/* No User responding */
case
19
:
/* User alerting, no answer */
case
21
:
/* Call rejected, the called party does not with to accept this call */
case
27
:
/* Destination out of order */
case
31
:
/* Normal, unspecified */
case
34
:
/* Circuit/Channel congestion */
case
41
:
/* Temporary failure */
case
42
:
/* Switching equipment is experiencing a period of high traffic */
case
47
:
/* Resource unavailable */
case
58
:
/* Bearer Capability not available */
case
63
:
/* Service or option not available */
case
65
:
/* Bearer Cap not implemented, not supported */
case
79
:
/* Service or option not implemented, unspecified */
ftdm_log_chan
(
ftdmchan
,
FTDM_LOG_DEBUG
,
"Cause requires disconnect (cause:%d)
\n
"
,
cnStEvnt
->
causeDgn
[
0
].
causeVal
.
val
);
ftdmchan
->
caller_data
.
hangup_cause
=
cnStEvnt
->
causeDgn
[
0
].
causeVal
.
val
;
sngisdn_set_flag
(
sngisdn_info
,
FLAG_SEND_DISC
);
sngisdn_set_flag
(
sngisdn_info
,
FLAG_SEND_DISC
);
ftdm_set_state
(
ftdmchan
,
FTDM_CHANNEL_STATE_TERMINATING
);
ftdm_set_state
(
ftdmchan
,
FTDM_CHANNEL_STATE_TERMINATING
);
goto
sngisdn_process_cnst_ind_end
;
goto
sngisdn_process_cnst_ind_end
;
}
}
}
switch
(
ftdmchan
->
state
)
{
switch
(
ftdmchan
->
state
)
{
case
FTDM_CHANNEL_STATE_DIALING
:
case
FTDM_CHANNEL_STATE_DIALING
:
case
FTDM_CHANNEL_STATE_PROCEED
:
case
FTDM_CHANNEL_STATE_PROCEED
:
...
@@ -1119,8 +1102,44 @@ void sngisdn_process_rst_ind (sngisdn_event_data_t *sngisdn_event)
...
@@ -1119,8 +1102,44 @@ void sngisdn_process_rst_ind (sngisdn_event_data_t *sngisdn_event)
(
evntType
==
IN_LNK_DWN
)
?
"LNK_DOWN"
:
(
evntType
==
IN_LNK_DWN
)
?
"LNK_DOWN"
:
(
evntType
==
IN_LNK_UP
)
?
"LNK_UP"
:
(
evntType
==
IN_LNK_UP
)
?
"LNK_UP"
:
(
evntType
==
IN_INDCHAN
)
?
"b-channel"
:
(
evntType
==
IN_INDCHAN
)
?
"b-channel"
:
(
evntType
==
IN_LNK_DWN_DM_RLS
)
?
"N
fas
service procedures"
:
(
evntType
==
IN_LNK_DWN_DM_RLS
)
?
"N
FAS
service procedures"
:
(
evntType
==
IN_SWCHD_BU_DCHAN
)
?
"NFAS switchover to backup"
:
"Unknown"
);
(
evntType
==
IN_SWCHD_BU_DCHAN
)
?
"NFAS switchover to backup"
:
"Unknown"
);
ISDN_FUNC_TRACE_EXIT
(
__FUNCTION__
);
ISDN_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
return
;
}
}
ftdm_status_t
sngisdn_cause_val_requires_disconnect
(
ftdm_channel_t
*
ftdmchan
,
CauseDgn
*
causeDgn
)
{
sngisdn_span_data_t
*
signal_data
=
(
sngisdn_span_data_t
*
)
ftdmchan
->
span
->
signal_data
;
if
(
signal_data
->
ignore_cause_value
==
SNGISDN_OPT_TRUE
)
{
return
FTDM_FAIL
;
}
/* By default, we only evaluate cause value on 5ESS switches */
if
(
signal_data
->
ignore_cause_value
==
SNGISDN_OPT_DEFAULT
&&
signal_data
->
switchtype
!=
SNGISDN_SWITCH_5ESS
)
{
return
FTDM_FAIL
;
}
/* ignore_cause_value = SNGISDN_OPT_FALSE or switchtype == 5ESS */
switch
(
causeDgn
->
causeVal
.
val
)
{
case
17
:
/* User Busy */
case
18
:
/* No User responding */
case
19
:
/* User alerting, no answer */
case
21
:
/* Call rejected, the called party does not with to accept this call */
case
27
:
/* Destination out of order */
case
31
:
/* Normal, unspecified */
case
34
:
/* Circuit/Channel congestion */
case
41
:
/* Temporary failure */
case
42
:
/* Switching equipment is experiencing a period of high traffic */
case
47
:
/* Resource unavailable */
case
58
:
/* Bearer Capability not available */
case
63
:
/* Service or option not available */
case
65
:
/* Bearer Cap not implemented, not supported */
case
79
:
/* Service or option not implemented, unspecified */
return
FTDM_SUCCESS
;
}
return
FTDM_FAIL
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论