Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
8f703c7a
提交
8f703c7a
authored
3月 14, 2014
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-6353 regression from
7ba257ec
上级
4216e3e0
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
10 行增加
和
8 行删除
+10
-8
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-1
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+9
-7
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
8f703c7a
...
@@ -953,7 +953,7 @@ void sofia_glue_do_xfer_invite(switch_core_session_t *session);
...
@@ -953,7 +953,7 @@ void sofia_glue_do_xfer_invite(switch_core_session_t *session);
uint8_t
sofia_reg_handle_register_token
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sip_t
const
*
sip
,
uint8_t
sofia_reg_handle_register_token
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
sofia_dispatch_event_t
*
de
,
sofia_regtype_t
regtype
,
char
*
key
,
sofia_regtype_t
regtype
,
char
*
key
,
uint32_t
keylen
,
switch_event_t
**
v_event
,
const
char
*
is_nat
,
sofia_private_t
**
sofia_private_p
,
switch_xml_t
*
user_xml
,
char
*
sw_acl_token
);
uint32_t
keylen
,
switch_event_t
**
v_event
,
const
char
*
is_nat
,
sofia_private_t
**
sofia_private_p
,
switch_xml_t
*
user_xml
,
c
onst
c
har
*
sw_acl_token
);
#define sofia_reg_handle_register(_nua_, _profile_, _nh_, _sip_, _de_, _regtype_, _key_, _keylen_, _v_event_, _is_nat_, _sofia_private_p_, _user_xml_) sofia_reg_handle_register_token(_nua_, _profile_, _nh_, _sip_, _de_, _regtype_, _key_, _keylen_, _v_event_, _is_nat_, _sofia_private_p_, _user_xml_, NULL)
#define sofia_reg_handle_register(_nua_, _profile_, _nh_, _sip_, _de_, _regtype_, _key_, _keylen_, _v_event_, _is_nat_, _sofia_private_p_, _user_xml_) sofia_reg_handle_register_token(_nua_, _profile_, _nh_, _sip_, _de_, _regtype_, _key_, _keylen_, _v_event_, _is_nat_, _sofia_private_p_, _user_xml_, NULL)
extern
switch_endpoint_interface_t
*
sofia_endpoint_interface
;
extern
switch_endpoint_interface_t
*
sofia_endpoint_interface
;
void
sofia_presence_set_chat_hash
(
private_object_t
*
tech_pvt
,
sip_t
const
*
sip
);
void
sofia_presence_set_chat_hash
(
private_object_t
*
tech_pvt
,
sip_t
const
*
sip
);
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
8f703c7a
...
@@ -1128,7 +1128,7 @@ void sofia_reg_close_handles(sofia_profile_t *profile)
...
@@ -1128,7 +1128,7 @@ void sofia_reg_close_handles(sofia_profile_t *profile)
uint8_t
sofia_reg_handle_register_token
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sip_t
const
*
sip
,
uint8_t
sofia_reg_handle_register_token
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
sofia_regtype_t
regtype
,
char
*
key
,
sofia_dispatch_event_t
*
de
,
sofia_regtype_t
regtype
,
char
*
key
,
uint32_t
keylen
,
switch_event_t
**
v_event
,
const
char
*
is_nat
,
sofia_private_t
**
sofia_private_p
,
switch_xml_t
*
user_xml
,
char
*
sw_acl_token
)
uint32_t
keylen
,
switch_event_t
**
v_event
,
const
char
*
is_nat
,
sofia_private_t
**
sofia_private_p
,
switch_xml_t
*
user_xml
,
c
onst
c
har
*
sw_acl_token
)
{
{
sip_to_t
const
*
to
=
NULL
;
sip_to_t
const
*
to
=
NULL
;
sip_from_t
const
*
from
=
NULL
;
sip_from_t
const
*
from
=
NULL
;
...
@@ -1184,6 +1184,7 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
...
@@ -1184,6 +1184,7 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
sofia_private_t
*
sofia_private
=
NULL
;
sofia_private_t
*
sofia_private
=
NULL
;
char
*
sw_to_user
;
char
*
sw_to_user
;
char
*
sw_reg_host
;
char
*
sw_reg_host
;
char
*
token_val
=
NULL
;
if
(
sofia_private_p
)
{
if
(
sofia_private_p
)
{
sofia_private
=
*
sofia_private_p
;
sofia_private
=
*
sofia_private_p
;
...
@@ -1410,8 +1411,10 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
...
@@ -1410,8 +1411,10 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
if
(
regtype
==
REG_AUTO_REGISTER
||
(
regtype
==
REG_REGISTER
&&
sofia_test_pflag
(
profile
,
PFLAG_BLIND_REG
)))
{
if
(
regtype
==
REG_AUTO_REGISTER
||
(
regtype
==
REG_REGISTER
&&
sofia_test_pflag
(
profile
,
PFLAG_BLIND_REG
)))
{
regtype
=
REG_REGISTER
;
regtype
=
REG_REGISTER
;
if
(
sw_acl_token
)
{
if
(
!
zstr
(
sw_acl_token
))
{
switch_split_user_domain
(
sw_acl_token
,
&
sw_to_user
,
&
sw_reg_host
);
token_val
=
strdup
(
sw_acl_token
);
switch_split_user_domain
(
token_val
,
&
sw_to_user
,
&
sw_reg_host
);
to_user
=
sw_to_user
;
to_user
=
sw_to_user
;
reg_host
=
sw_reg_host
;
reg_host
=
sw_reg_host
;
}
}
...
@@ -2064,6 +2067,7 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
...
@@ -2064,6 +2067,7 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
switch_safe_free
(
dup_mwi_account
);
switch_safe_free
(
dup_mwi_account
);
switch_safe_free
(
utmp
);
switch_safe_free
(
utmp
);
switch_safe_free
(
path_val
);
switch_safe_free
(
path_val
);
switch_safe_free
(
token_val
);
if
(
auth_params
)
{
if
(
auth_params
)
{
switch_event_destroy
(
&
auth_params
);
switch_event_destroy
(
&
auth_params
);
...
@@ -2084,7 +2088,7 @@ void sofia_reg_handle_sip_i_register(nua_t *nua, sofia_profile_t *profile, nua_h
...
@@ -2084,7 +2088,7 @@ void sofia_reg_handle_sip_i_register(nua_t *nua, sofia_profile_t *profile, nua_h
sofia_regtype_t
type
=
REG_REGISTER
;
sofia_regtype_t
type
=
REG_REGISTER
;
int
network_port
=
0
;
int
network_port
=
0
;
char
*
is_nat
=
NULL
;
char
*
is_nat
=
NULL
;
c
har
acl_token
[
512
]
=
""
;
c
onst
char
*
acl_token
=
NULL
;
#if 0 /* This seems to cause undesirable effects so nevermind */
#if 0 /* This seems to cause undesirable effects so nevermind */
...
@@ -2173,9 +2177,7 @@ void sofia_reg_handle_sip_i_register(nua_t *nua, sofia_profile_t *profile, nua_h
...
@@ -2173,9 +2177,7 @@ void sofia_reg_handle_sip_i_register(nua_t *nua, sofia_profile_t *profile, nua_h
if
(
ok
&&
!
sofia_test_pflag
(
profile
,
PFLAG_BLIND_REG
))
{
if
(
ok
&&
!
sofia_test_pflag
(
profile
,
PFLAG_BLIND_REG
))
{
type
=
REG_AUTO_REGISTER
;
type
=
REG_AUTO_REGISTER
;
if
(
token_sw
)
{
acl_token
=
token_sw
;
switch_set_string
(
acl_token
,
token_sw
);
}
}
else
if
(
!
ok
)
{
}
else
if
(
!
ok
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"IP %s Rejected by register acl
\"
%s
\"\n
"
,
network_ip
,
profile
->
reg_acl
[
x
]);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"IP %s Rejected by register acl
\"
%s
\"\n
"
,
network_ip
,
profile
->
reg_acl
[
x
]);
nua_respond
(
nh
,
SIP_403_FORBIDDEN
,
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
TAG_END
());
nua_respond
(
nh
,
SIP_403_FORBIDDEN
,
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
),
TAG_END
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论