Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e15d52bd
提交
e15d52bd
authored
9月 01, 2010
作者:
Konrad Hammel
提交者:
David Yat Sin
9月 01, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
freetdm: ss7 - updated to allow TMR/bearer cap pass-through
上级
e3b9db88
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
119 行增加
和
93 行删除
+119
-93
ftmod_sangoma_ss7_handle.c
...dm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
+53
-29
ftmod_sangoma_ss7_out.c
...eetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c
+66
-64
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
浏览文件 @
e15d52bd
...
...
@@ -41,7 +41,6 @@
/* GLOBALS ********************************************************************/
/******************************************************************************/
/* PROTOTYPES *****************************************************************/
/* PROTOTYPES *****************************************************************/
ftdm_status_t
handle_con_ind
(
uint32_t
suInstId
,
uint32_t
spInstId
,
uint32_t
circuit
,
SiConEvnt
*
siConEvnt
);
ftdm_status_t
handle_con_sta
(
uint32_t
suInstId
,
uint32_t
spInstId
,
uint32_t
circuit
,
SiCnStEvnt
*
siCnStEvnt
,
uint8_t
evntType
);
...
...
@@ -140,42 +139,67 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
}
else
{
/* fill in cid/ani number */
if
(
siConEvnt
->
cgPtyNum
.
addrSig
.
pres
)
{
copy_tknStr_from_sngss7
(
siConEvnt
->
cgPtyNum
.
addrSig
,
ftdmchan
->
caller_data
.
cid_num
.
digits
,
siConEvnt
->
cgPtyNum
.
oddEven
);
/* fill in cid Name */
ftdm_set_string
(
ftdmchan
->
caller_data
.
cid_name
,
ftdmchan
->
caller_data
.
cid_num
.
digits
);
ftdm_set_string
(
ftdmchan
->
caller_data
.
ani
.
digits
,
ftdmchan
->
caller_data
.
cid_num
.
digits
);
/* fill in calling party information */
if
(
siConEvnt
->
cgPtyNum
.
eh
.
pres
)
{
if
(
siConEvnt
->
cgPtyNum
.
addrSig
.
pres
)
{
/* fill in cid_num */
copy_tknStr_from_sngss7
(
siConEvnt
->
cgPtyNum
.
addrSig
,
ftdmchan
->
caller_data
.
cid_num
.
digits
,
siConEvnt
->
cgPtyNum
.
oddEven
);
/* fill in cid Name */
ftdm_set_string
(
ftdmchan
->
caller_data
.
cid_name
,
ftdmchan
->
caller_data
.
cid_num
.
digits
);
/* fill in ANI */
ftdm_set_string
(
ftdmchan
->
caller_data
.
ani
.
digits
,
ftdmchan
->
caller_data
.
cid_num
.
digits
);
}
if
(
siConEvnt
->
cgPtyNum
.
scrnInd
.
pres
)
{
/* fill in the screening indication value */
ftdmchan
->
caller_data
.
screen
=
siConEvnt
->
cgPtyNum
.
scrnInd
.
val
;
}
if
(
siConEvnt
->
cgPtyNum
.
presRest
.
pres
)
{
/* fill in the presentation value */
ftdmchan
->
caller_data
.
pres
=
siConEvnt
->
cgPtyNum
.
presRest
.
val
;
}
}
else
{
SS7_INFO
(
"No Calling party (ANI) information in IAM!
\n
"
);
SS7_INFO
_CHAN
(
ftdmchan
,
"No Calling party (ANI) information in IAM!%s
\n
"
,
"
"
);
}
/* fill in dnis */
if
(
siConEvnt
->
cdPtyNum
.
addrSig
.
pres
)
{
copy_tknStr_from_sngss7
(
siConEvnt
->
cdPtyNum
.
addrSig
,
ftdmchan
->
caller_data
.
dnis
.
digits
,
siConEvnt
->
cdPtyNum
.
oddEven
);
}
else
{
SS7_INFO
(
"No Called party (DNIS) information in IAM!
\n
"
);
/* fill in called party infomation */
if
(
siConEvnt
->
cdPtyNum
.
eh
.
pres
)
{
if
(
siConEvnt
->
cdPtyNum
.
addrSig
.
pres
)
{
/* fill in the called number/dnis */
copy_tknStr_from_sngss7
(
siConEvnt
->
cdPtyNum
.
addrSig
,
ftdmchan
->
caller_data
.
dnis
.
digits
,
siConEvnt
->
cdPtyNum
.
oddEven
);
}
}
else
{
SS7_INFO_CHAN
(
ftdmchan
,
"No Called party (DNIS) information in IAM!%s
\n
"
,
" "
);
}
/* fill in rdnis */
if
(
siConEvnt
->
redirgNum
.
addrSig
.
pres
)
{
copy_tknStr_from_sngss7
(
siConEvnt
->
redirgNum
.
addrSig
,
ftdmchan
->
caller_data
.
rdnis
.
digits
,
siConEvnt
->
cgPtyNum
.
oddEven
);
/* fill in rdnis information*/
if
(
siConEvnt
->
redirgNum
.
eh
.
pres
)
{
if
(
siConEvnt
->
redirgNum
.
addrSig
.
pres
)
{
/* fill in the rdnis digits */
copy_tknStr_from_sngss7
(
siConEvnt
->
redirgNum
.
addrSig
,
ftdmchan
->
caller_data
.
rdnis
.
digits
,
siConEvnt
->
cgPtyNum
.
oddEven
);
}
}
else
{
SS7_
INFO
(
"No RDNIS party information in IAM!
\n
"
);
SS7_
DEBUG_CHAN
(
ftdmchan
,
"No RDNIS party information in IAM!%s
\n
"
,
"
"
);
}
/* fill in screening/presentation */
ftdmchan
->
caller_data
.
screen
=
siConEvnt
->
cgPtyNum
.
scrnInd
.
val
;
ftdmchan
->
caller_data
.
pres
=
siConEvnt
->
cgPtyNum
.
presRest
.
val
;
/* fill in the TMR/bearer capability */
if
(
siConEvnt
->
txMedReq
.
eh
.
pres
)
{
if
(
siConEvnt
->
txMedReq
.
trMedReq
.
pres
)
{
/* fill in the bearer type */
ftdmchan
->
caller_data
.
bearer_capability
=
siConEvnt
->
txMedReq
.
trMedReq
.
val
;
}
}
else
{
SS7_DEBUG_CHAN
(
ftdmchan
,
"No TMR/Bearer Cap information in IAM!%s
\n
"
,
" "
);
}
/* set the state of the channel to collecting...the rest is done by the chan monitor */
ftdm_set_state_locked
(
ftdmchan
,
FTDM_CHANNEL_STATE_COLLECT
);
...
...
libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_out.c
浏览文件 @
e15d52bd
...
...
@@ -64,70 +64,72 @@ void ft_to_sngss7_grs (ftdm_channel_t * ftdmchan);
void
ft_to_sngss7_iam
(
ftdm_channel_t
*
ftdmchan
)
{
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
sngss7_chan_data_t
*
sngss7_info
=
ftdmchan
->
call_data
;;
SiConEvnt
iam
;
sngss7_info
->
suInstId
=
get_unique_id
();
sngss7_info
->
spInstId
=
0
;
sngss7_info
->
spId
=
1
;
memset
(
&
iam
,
0x0
,
sizeof
(
iam
));
/* copy down the nature of connection indicators */
iam
.
natConInd
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
satInd
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
satInd
.
val
=
0
;
iam
.
natConInd
.
contChkInd
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
contChkInd
.
val
=
0x00
;
iam
.
natConInd
.
echoCntrlDevInd
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
echoCntrlDevInd
.
val
=
0x01
;
/* copy down the forward call indicators */
iam
.
fwdCallInd
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
natIntCallInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
natIntCallInd
.
val
=
0x00
;
iam
.
fwdCallInd
.
end2EndMethInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
end2EndMethInd
.
val
=
0x00
;
iam
.
fwdCallInd
.
intInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
intInd
.
val
=
0x01
;
iam
.
fwdCallInd
.
end2EndInfoInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
end2EndInfoInd
.
val
=
0x00
;
iam
.
fwdCallInd
.
isdnUsrPrtInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
isdnUsrPrtInd
.
val
=
0x01
;
iam
.
fwdCallInd
.
isdnUsrPrtPrfInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
isdnUsrPrtPrfInd
.
val
=
0x02
;
iam
.
fwdCallInd
.
isdnAccInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
isdnAccInd
.
val
=
0x01
;
iam
.
fwdCallInd
.
sccpMethInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
sccpMethInd
.
val
=
0x00
;
/* copy down the calling number information */
iam
.
cgPtyCat
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
cgPtyCat
.
cgPtyCat
.
pres
=
PRSNT_NODEF
;
iam
.
cgPtyCat
.
cgPtyCat
.
val
=
0x0a
;
/* copy down the transmission medium requirements */
iam
.
txMedReq
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
txMedReq
.
trMedReq
.
pres
=
PRSNT_NODEF
;
iam
.
txMedReq
.
trMedReq
.
val
=
0
;
/* SPEECH = 0, 3.1Khz = 3, 64k unres = 2 */
/* copy down the called number information */
copy_cdPtyNum_to_sngss7
(
&
ftdmchan
->
caller_data
,
&
iam
.
cdPtyNum
);
/* copy down the calling number information */
copy_cgPtyNum_to_sngss7
(
&
ftdmchan
->
caller_data
,
&
iam
.
cgPtyNum
);
sng_cc_con_request
(
sngss7_info
->
spId
,
sngss7_info
->
suInstId
,
sngss7_info
->
spInstId
,
sngss7_info
->
circuit
->
id
,
&
iam
,
0
);
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx IAM
\n
"
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
SS7_FUNC_TRACE_ENTER
(
__FUNCTION__
);
sngss7_chan_data_t
*
sngss7_info
=
ftdmchan
->
call_data
;;
SiConEvnt
iam
;
sngss7_info
->
suInstId
=
get_unique_id
();
sngss7_info
->
spInstId
=
0
;
sngss7_info
->
spId
=
1
;
memset
(
&
iam
,
0x0
,
sizeof
(
iam
));
/* copy down the nature of connection indicators */
iam
.
natConInd
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
satInd
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
satInd
.
val
=
0
;
/* no satellite circuit */
iam
.
natConInd
.
contChkInd
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
contChkInd
.
val
=
CONTCHK_NOTREQ
;
iam
.
natConInd
.
echoCntrlDevInd
.
pres
=
PRSNT_NODEF
;
iam
.
natConInd
.
echoCntrlDevInd
.
val
=
ECHOCDEV_INCL
;
/* copy down the forward call indicators */
iam
.
fwdCallInd
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
natIntCallInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
natIntCallInd
.
val
=
0x00
;
iam
.
fwdCallInd
.
end2EndMethInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
end2EndMethInd
.
val
=
E2EMTH_NOMETH
;
iam
.
fwdCallInd
.
intInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
intInd
.
val
=
INTIND_NOINTW
;
iam
.
fwdCallInd
.
end2EndInfoInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
end2EndInfoInd
.
val
=
E2EINF_NOINFO
;
iam
.
fwdCallInd
.
isdnUsrPrtInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
isdnUsrPrtInd
.
val
=
ISUP_USED
;
iam
.
fwdCallInd
.
isdnUsrPrtPrfInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
isdnUsrPrtPrfInd
.
val
=
PREF_REQAW
;
iam
.
fwdCallInd
.
isdnAccInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
isdnAccInd
.
val
=
ISDNACC_ISDN
;
iam
.
fwdCallInd
.
sccpMethInd
.
pres
=
PRSNT_NODEF
;
iam
.
fwdCallInd
.
sccpMethInd
.
val
=
SCCPMTH_NOIND
;
/* copy down the calling number information */
iam
.
cgPtyCat
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
cgPtyCat
.
cgPtyCat
.
pres
=
PRSNT_NODEF
;
iam
.
cgPtyCat
.
cgPtyCat
.
val
=
CAT_ORD
;
/* ordinary suscriber */
/* copy down the transmission medium requirements */
iam
.
txMedReq
.
eh
.
pres
=
PRSNT_NODEF
;
iam
.
txMedReq
.
trMedReq
.
pres
=
PRSNT_NODEF
;
iam
.
txMedReq
.
trMedReq
.
val
=
ftdmchan
->
caller_data
.
bearer_capability
;
/* copy down the called number information */
copy_cdPtyNum_to_sngss7
(
&
ftdmchan
->
caller_data
,
&
iam
.
cdPtyNum
);
/* copy down the calling number information */
copy_cgPtyNum_to_sngss7
(
&
ftdmchan
->
caller_data
,
&
iam
.
cgPtyNum
);
sng_cc_con_request
(
sngss7_info
->
spId
,
sngss7_info
->
suInstId
,
sngss7_info
->
spInstId
,
sngss7_info
->
circuit
->
id
,
&
iam
,
0
);
SS7_MSG_TRACE
(
ftdmchan
,
sngss7_info
,
"Tx IAM
\n
"
);
SS7_FUNC_TRACE_EXIT
(
__FUNCTION__
);
return
;
}
/******************************************************************************/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论