Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
84f8868b
提交
84f8868b
authored
6月 30, 2011
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-3385 --resolve
上级
e1bdb65e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
14 行增加
和
6 行删除
+14
-6
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+1
-1
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-1
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+12
-4
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
84f8868b
...
@@ -2180,7 +2180,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
...
@@ -2180,7 +2180,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
to_host
=
switch_channel_get_variable
(
channel
,
"sip_to_host"
);
to_host
=
switch_channel_get_variable
(
channel
,
"sip_to_host"
);
}
}
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"Challenging call %s
\n
"
,
to_uri
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"Challenging call %s
\n
"
,
to_uri
);
sofia_reg_auth_challenge
(
NULL
,
tech_pvt
->
profile
,
tech_pvt
->
nh
,
NULL
,
REG_INVITE
,
to_host
,
0
);
sofia_reg_auth_challenge
(
tech_pvt
->
profile
,
tech_pvt
->
nh
,
NULL
,
REG_INVITE
,
to_host
,
0
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_USER_CHALLENGE
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_USER_CHALLENGE
);
}
else
if
(
code
==
484
&&
msg
->
numeric_arg
)
{
}
else
if
(
code
==
484
&&
msg
->
numeric_arg
)
{
const
char
*
to
=
switch_channel_get_variable
(
channel
,
"sip_to_uri"
);
const
char
*
to
=
switch_channel_get_variable
(
channel
,
"sip_to_uri"
);
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
84f8868b
...
@@ -880,7 +880,7 @@ void sofia_presence_mwi_event_handler(switch_event_t *event);
...
@@ -880,7 +880,7 @@ void sofia_presence_mwi_event_handler(switch_event_t *event);
void
sofia_glue_track_event_handler
(
switch_event_t
*
event
);
void
sofia_glue_track_event_handler
(
switch_event_t
*
event
);
void
sofia_presence_cancel
(
void
);
void
sofia_presence_cancel
(
void
);
switch_status_t
config_sofia
(
int
reload
,
char
*
profile_name
);
switch_status_t
config_sofia
(
int
reload
,
char
*
profile_name
);
void
sofia_reg_auth_challenge
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sofia_dispatch_event_t
*
de
,
void
sofia_reg_auth_challenge
(
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sofia_dispatch_event_t
*
de
,
sofia_regtype_t
regtype
,
const
char
*
realm
,
int
stale
);
sofia_regtype_t
regtype
,
const
char
*
realm
,
int
stale
);
auth_res_t
sofia_reg_parse_auth
(
sofia_profile_t
*
profile
,
sip_authorization_t
const
*
authorization
,
auth_res_t
sofia_reg_parse_auth
(
sofia_profile_t
*
profile
,
sip_authorization_t
const
*
authorization
,
sip_t
const
*
sip
,
sip_t
const
*
sip
,
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
84f8868b
...
@@ -875,12 +875,18 @@ switch_console_callback_match_t *sofia_reg_find_reg_url_multi(sofia_profile_t *p
...
@@ -875,12 +875,18 @@ switch_console_callback_match_t *sofia_reg_find_reg_url_multi(sofia_profile_t *p
}
}
void
sofia_reg_auth_challenge
(
nua_t
*
nua
,
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sofia_dispatch_event_t
*
de
,
void
sofia_reg_auth_challenge
(
sofia_profile_t
*
profile
,
nua_handle_t
*
nh
,
sofia_dispatch_event_t
*
de
,
sofia_regtype_t
regtype
,
const
char
*
realm
,
int
stale
)
sofia_regtype_t
regtype
,
const
char
*
realm
,
int
stale
)
{
{
switch_uuid_t
uuid
;
switch_uuid_t
uuid
;
char
uuid_str
[
SWITCH_UUID_FORMATTED_LENGTH
+
1
];
char
uuid_str
[
SWITCH_UUID_FORMATTED_LENGTH
+
1
];
char
*
sql
,
*
auth_str
;
char
*
sql
,
*
auth_str
;
msg_t
*
msg
=
NULL
;
if
(
de
&&
de
->
data
)
{
msg
=
de
->
data
->
e_msg
;
}
switch_uuid_get
(
&
uuid
);
switch_uuid_get
(
&
uuid
);
switch_uuid_format
(
uuid_str
,
&
uuid
);
switch_uuid_format
(
uuid_str
,
&
uuid
);
...
@@ -896,9 +902,11 @@ void sofia_reg_auth_challenge(nua_t *nua, sofia_profile_t *profile, nua_handle_t
...
@@ -896,9 +902,11 @@ void sofia_reg_auth_challenge(nua_t *nua, sofia_profile_t *profile, nua_handle_t
auth_str
=
switch_mprintf
(
"Digest realm=
\"
%q
\"
, nonce=
\"
%q
\"
,%s algorithm=MD5, qop=
\"
auth
\"
"
,
realm
,
uuid_str
,
stale
?
" stale=true,"
:
""
);
auth_str
=
switch_mprintf
(
"Digest realm=
\"
%q
\"
, nonce=
\"
%q
\"
,%s algorithm=MD5, qop=
\"
auth
\"
"
,
realm
,
uuid_str
,
stale
?
" stale=true,"
:
""
);
if
(
regtype
==
REG_REGISTER
)
{
if
(
regtype
==
REG_REGISTER
)
{
nua_respond
(
nh
,
SIP_401_UNAUTHORIZED
,
TAG_IF
(
(
nua
&&
de
),
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_
msg
)),
SIPTAG_WWW_AUTHENTICATE_STR
(
auth_str
),
TAG_END
());
nua_respond
(
nh
,
SIP_401_UNAUTHORIZED
,
TAG_IF
(
msg
,
NUTAG_WITH_THIS_MSG
(
msg
)),
SIPTAG_WWW_AUTHENTICATE_STR
(
auth_str
),
TAG_END
());
}
else
if
(
regtype
==
REG_INVITE
)
{
}
else
if
(
regtype
==
REG_INVITE
)
{
nua_respond
(
nh
,
SIP_407_PROXY_AUTH_REQUIRED
,
TAG_IF
((
nua
&&
de
),
NUTAG_WITH_THIS_MSG
(
de
->
data
->
e_msg
)),
SIPTAG_PROXY_AUTHENTICATE_STR
(
auth_str
),
TAG_END
());
nua_respond
(
nh
,
SIP_407_PROXY_AUTH_REQUIRED
,
TAG_IF
(
msg
,
NUTAG_WITH_THIS_MSG
(
msg
)),
SIPTAG_PROXY_AUTHENTICATE_STR
(
auth_str
),
TAG_END
());
}
}
switch_safe_free
(
auth_str
);
switch_safe_free
(
auth_str
);
...
@@ -1319,7 +1327,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
...
@@ -1319,7 +1327,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
realm
=
from_host
;
realm
=
from_host
;
}
}
sofia_reg_auth_challenge
(
nua
,
profile
,
nh
,
de
,
regtype
,
realm
,
stale
);
sofia_reg_auth_challenge
(
profile
,
nh
,
de
,
regtype
,
realm
,
stale
);
if
(
profile
->
debug
)
{
if
(
profile
->
debug
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Send challenge for [%s@%s]
\n
"
,
to_user
,
to_host
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Send challenge for [%s@%s]
\n
"
,
to_user
,
to_host
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论