Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
45e19b75
提交
45e19b75
authored
2月 26, 2014
作者:
Brian West
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-6270 add client_port to SIP Registration events
上级
5646957c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
9 行删除
+18
-9
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+4
-2
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+7
-4
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+6
-2
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
45e19b75
...
...
@@ -903,7 +903,7 @@ void sofia_reg_auth_challenge(sofia_profile_t *profile, nua_handle_t *nh, sofia_
sofia_regtype_t
regtype
,
const
char
*
realm
,
int
stale
,
long
exptime
);
auth_res_t
sofia_reg_parse_auth
(
sofia_profile_t
*
profile
,
sip_authorization_t
const
*
authorization
,
sip_t
const
*
sip
,
sofia_dispatch_event_t
*
de
,
const
char
*
regstr
,
char
*
np
,
size_t
nplen
,
char
*
ip
,
switch_event_t
**
v_event
,
sofia_dispatch_event_t
*
de
,
const
char
*
regstr
,
char
*
np
,
size_t
nplen
,
char
*
ip
,
int
network_port
,
switch_event_t
**
v_event
,
long
exptime
,
sofia_regtype_t
regtype
,
const
char
*
to_user
,
switch_event_t
**
auth_params
,
long
*
reg_count
,
switch_xml_t
*
user_xml
);
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
45e19b75
...
...
@@ -34,6 +34,7 @@
* Joseph Sullivan <jossulli@amazon.com>
* Emmanuel Schmidbauer <e.schmidbauer@gmail.com>
* William King <william.king@quentustech.com>
* David Knell <david.knell@telng.com>
*
* sofia.c -- SOFIA SIP Endpoint (sofia code)
*
...
...
@@ -1316,9 +1317,10 @@ static void our_sofia_event_callback(nua_event_t event,
if
(
authorization
)
{
char
network_ip
[
80
];
sofia_glue_get_addr
(
de
->
data
->
e_msg
,
network_ip
,
sizeof
(
network_ip
),
NULL
);
int
network_port
;
sofia_glue_get_addr
(
de
->
data
->
e_msg
,
network_ip
,
sizeof
(
network_ip
),
&
network_port
);
auth_res
=
sofia_reg_parse_auth
(
profile
,
authorization
,
sip
,
de
,
(
char
*
)
sip
->
sip_request
->
rq_method_name
,
tech_pvt
->
key
,
strlen
(
tech_pvt
->
key
),
network_ip
,
NULL
,
0
,
(
char
*
)
sip
->
sip_request
->
rq_method_name
,
tech_pvt
->
key
,
strlen
(
tech_pvt
->
key
),
network_ip
,
network_port
,
NULL
,
0
,
REG_INVITE
,
NULL
,
NULL
,
NULL
,
NULL
);
}
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
45e19b75
...
...
@@ -30,6 +30,7 @@
* Raymond Chandler <intralanman@freeswitch.org>
* William King <william.king@quentustech.com>
* Emmanuel Schmidbauer <e.schmidbauer@gmail.com>
* David Knell <david.knell@telng.com>
*
* sofia_presence.c -- SOFIA SIP Endpoint (presence code)
*
...
...
@@ -3714,9 +3715,10 @@ void sofia_presence_handle_sip_i_subscribe(int status,
if
(
authorization
)
{
char
network_ip
[
80
];
sofia_glue_get_addr
(
de
->
data
->
e_msg
,
network_ip
,
sizeof
(
network_ip
),
NULL
);
int
network_port
;
sofia_glue_get_addr
(
de
->
data
->
e_msg
,
network_ip
,
sizeof
(
network_ip
),
&
network_port
);
auth_res
=
sofia_reg_parse_auth
(
profile
,
authorization
,
sip
,
de
,
(
char
*
)
sip
->
sip_request
->
rq_method_name
,
key
,
sizeof
(
key
),
network_ip
,
&
v_event
,
0
,
(
char
*
)
sip
->
sip_request
->
rq_method_name
,
key
,
sizeof
(
key
),
network_ip
,
network_port
,
&
v_event
,
0
,
REG_REGISTER
,
to_user
,
NULL
,
NULL
,
NULL
);
}
else
if
(
sofia_reg_handle_register
(
nua
,
profile
,
nh
,
sip
,
de
,
REG_REGISTER
,
key
,
sizeof
(
key
),
&
v_event
,
NULL
,
NULL
,
NULL
))
{
if
(
v_event
)
{
...
...
@@ -4648,9 +4650,10 @@ void sofia_presence_handle_sip_i_message(int status,
if
(
authorization
)
{
char
network_ip
[
80
];
sofia_glue_get_addr
(
de
->
data
->
e_msg
,
network_ip
,
sizeof
(
network_ip
),
NULL
);
int
network_port
;
sofia_glue_get_addr
(
de
->
data
->
e_msg
,
network_ip
,
sizeof
(
network_ip
),
&
network_port
);
auth_res
=
sofia_reg_parse_auth
(
profile
,
authorization
,
sip
,
de
,
(
char
*
)
sip
->
sip_request
->
rq_method_name
,
key
,
keylen
,
network_ip
,
NULL
,
0
,
(
char
*
)
sip
->
sip_request
->
rq_method_name
,
key
,
keylen
,
network_ip
,
network_port
,
NULL
,
0
,
REG_INVITE
,
NULL
,
NULL
,
NULL
,
NULL
);
}
else
if
(
sofia_reg_handle_register
(
nua
,
profile
,
nh
,
sip
,
de
,
REG_INVITE
,
key
,
(
uint32_t
)
keylen
,
&
v_event
,
NULL
,
NULL
,
NULL
))
{
if
(
v_event
)
{
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
45e19b75
...
...
@@ -28,7 +28,7 @@
* Paul D. Tinsley <pdt at jackhammer.org>
* Bret McDanel <trixter AT 0xdecafbad.com>
* Marcel Barbulescu <marcelbarbulescu@gmail.com>
* David Knell <>
* David Knell <
david.knell@telng.com
>
* Eliot Gable <egable AT.AT broadvox.com>
* Leon de Rooij <leon@scarlet-internet.nl>
* Emmanuel Schmidbauer <e.schmidbauer@gmail.com>
...
...
@@ -1401,7 +1401,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
const
char
*
username
=
"unknown"
;
const
char
*
realm
=
reg_host
;
if
((
auth_res
=
sofia_reg_parse_auth
(
profile
,
authorization
,
sip
,
de
,
sip
->
sip_request
->
rq_method_name
,
key
,
keylen
,
network_ip
,
v_event
,
exptime
,
regtype
,
to_user
,
&
auth_params
,
&
reg_count
,
user_xml
))
==
AUTH_STALE
)
{
key
,
keylen
,
network_ip
,
network_port
,
v_event
,
exptime
,
regtype
,
to_user
,
&
auth_params
,
&
reg_count
,
user_xml
))
==
AUTH_STALE
)
{
stale
=
1
;
}
...
...
@@ -2488,6 +2488,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
char
*
np
,
size_t
nplen
,
char
*
ip
,
int
network_port
,
switch_event_t
**
v_event
,
long
exptime
,
sofia_regtype_t
regtype
,
const
char
*
to_user
,
switch_event_t
**
auth_params
,
long
*
reg_count
,
switch_xml_t
*
user_xml
)
{
...
...
@@ -2516,6 +2517,8 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
const
char
*
user_agent
=
NULL
;
const
char
*
user_agent_filter
=
profile
->
user_agent_filter
;
uint32_t
max_registrations_perext
=
profile
->
max_registrations_perext
;
char
client_port
[
16
];
snprintf
(
client_port
,
15
,
"%d"
,
network_port
);
username
=
realm
=
nonce
=
uri
=
qop
=
cnonce
=
nc
=
response
=
NULL
;
...
...
@@ -2684,6 +2687,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile,
switch_event_add_header_string
(
params
,
SWITCH_STACK_BOTTOM
,
"sip_auth_method"
,
(
sip
&&
sip
->
sip_request
)
?
sip
->
sip_request
->
rq_method_name
:
NULL
);
switch_event_add_header_string
(
params
,
SWITCH_STACK_BOTTOM
,
"client_port"
,
client_port
);
if
(
auth_params
)
{
switch_event_dup
(
auth_params
,
params
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论