Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
99559a3c
提交
99559a3c
authored
1月 25, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add NUTAG_WS_URL and NUTAG_WSS_URL tags
上级
e31c74b6
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
101 行增加
和
2 行删除
+101
-2
nta.c
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
+2
-2
nua_params.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c
+10
-0
nua_register.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
+30
-0
nua_tag.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c
+49
-0
nua_tag.h
libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
+10
-0
没有找到文件。
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
浏览文件 @
99559a3c
...
...
@@ -2053,8 +2053,8 @@ const sipdns_tports[SIPDNS_TRANSPORTS] = {
{
"tcp"
,
"5060"
,
"_sip._tcp."
,
"SIP+D2T"
},
{
"sctp"
,
"5060"
,
"_sip._sctp."
,
"SIP+D2S"
},
{
"tls"
,
"5061"
,
"_sips._tcp."
,
"SIPS+D2T"
},
{
"ws"
,
"50
66
"
,
"_sips._ws."
,
"SIP+D2W"
},
{
"wss"
,
"50
67
"
,
"_sips._wss."
,
"SIPS+D2W"
},
{
"ws"
,
"50
80
"
,
"_sips._ws."
,
"SIP+D2W"
},
{
"wss"
,
"50
81
"
,
"_sips._wss."
,
"SIPS+D2W"
},
};
static
char
const
*
const
tports_sip
[]
=
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c
浏览文件 @
99559a3c
...
...
@@ -1248,6 +1248,14 @@ int nua_handle_save_tags(nua_handle_t *nh, tagi_t *tags)
else
if
(
t
->
t_tag
==
nutag_sips_url
)
{
url
=
(
url_string_t
*
)
t
->
t_value
;
}
/* NUTAG_WS_URL_REF(url) */
else
if
(
t
->
t_tag
==
nutag_ws_url
)
{
url
=
(
url_string_t
*
)
t
->
t_value
;
}
/* NUTAG_WSS_URL_REF(url) */
else
if
(
t
->
t_tag
==
nutag_wss_url
)
{
url
=
(
url_string_t
*
)
t
->
t_value
;
}
}
su_home_auto
(
tmphome
,
sizeof
tmphome
);
...
...
@@ -1314,6 +1322,8 @@ static int nua_handle_param_filter(tagi_t const *f, tagi_t const *t)
if
(
t
->
t_tag
==
nutag_url
||
t
->
t_tag
==
nutag_sips_url
||
t
->
t_tag
==
nutag_ws_url
||
t
->
t_tag
==
nutag_wss_url
||
t
->
t_tag
==
nutag_identity
)
return
0
;
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
浏览文件 @
99559a3c
...
...
@@ -1149,12 +1149,16 @@ int
nua_stack_init_transport
(
nua_t
*
nua
,
tagi_t
const
*
tags
)
{
url_string_t
const
*
contact1
=
NULL
,
*
contact2
=
NULL
;
url_string_t
const
*
contact3
=
NULL
,
*
contact4
=
NULL
;
char
const
*
name1
=
"sip"
,
*
name2
=
"sip"
;
char
const
*
name3
=
"sip"
,
*
name4
=
"sip"
;
char
const
*
certificate_dir
=
NULL
;
tl_gets
(
tags
,
NUTAG_URL_REF
(
contact1
),
NUTAG_SIPS_URL_REF
(
contact2
),
NUTAG_WS_URL_REF
(
contact3
),
NUTAG_WSS_URL_REF
(
contact4
),
NUTAG_CERTIFICATE_DIR_REF
(
certificate_dir
),
TAG_END
());
...
...
@@ -1173,6 +1177,18 @@ nua_stack_init_transport(nua_t *nua, tagi_t const *tags)
:
contact2
->
us_url
->
url_type
==
url_sips
))
name2
=
"sips"
;
if
(
contact3
&&
(
url_is_string
(
contact3
)
?
su_casenmatch
(
contact3
->
us_str
,
"sips:"
,
5
)
:
contact3
->
us_url
->
url_type
==
url_sips
))
name3
=
"sips"
;
if
(
contact4
&&
(
url_is_string
(
contact4
)
?
su_casenmatch
(
contact4
->
us_str
,
"sips:"
,
5
)
:
contact4
->
us_url
->
url_type
==
url_sips
))
name4
=
"sips"
;
if
(
!
contact1
/* && !contact2 */
)
{
if
(
nta_agent_add_tport
(
nua
->
nua_nta
,
NULL
,
TPTAG_IDENT
(
"sip"
),
...
...
@@ -1207,6 +1223,20 @@ nua_stack_init_transport(nua_t *nua, tagi_t const *tags)
TPTAG_CERTIFICATE
(
certificate_dir
),
TAG_NEXT
(
nua
->
nua_args
))
<
0
)
return
-
1
;
if
(
contact3
&&
nta_agent_add_tport
(
nua
->
nua_nta
,
contact3
,
TPTAG_IDENT
(
name3
),
TPTAG_CERTIFICATE
(
certificate_dir
),
TAG_NEXT
(
nua
->
nua_args
))
<
0
)
return
-
1
;
if
(
contact4
&&
nta_agent_add_tport
(
nua
->
nua_nta
,
contact4
,
TPTAG_IDENT
(
name4
),
TPTAG_CERTIFICATE
(
certificate_dir
),
TAG_NEXT
(
nua
->
nua_args
))
<
0
)
return
-
1
;
}
...
...
libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c
浏览文件 @
99559a3c
...
...
@@ -1621,6 +1621,55 @@ tag_typedef_t nutag_sips_url = URLTAG_TYPEDEF(sips_url);
* Reference tag for NUTAG_SIPS_URL().
*/
/**@def NUTAG_WS_URL(x)
*
* Local WS url.
*
* The application can specify an alternative local address for
* NUA user agent engine. Usually the alternative address is a
* SIP URI (WS) used with websocket transport.
*
* @par Used with
* nua_create()
*
* @par Parameter type
* char const *
*
* @par Values
*
* Corresponding tag taking reference parameter is NUTAG_WS_URL_REF().
*/
tag_typedef_t
nutag_ws_url
=
URLTAG_TYPEDEF
(
ws_url
);
/**@def NUTAG_WS_URL_REF(x)
* Reference tag for NUTAG_WS_URL().
*/
/**@def NUTAG_WSS_URL(x)
*
* Local WSS url.
*
* The application can specify an alternative local address for
* NUA user agent engine. Usually the alternative address is a
* secure SIP URI (WSS) used with secure websocket transport.
*
* @par Used with
* nua_create()
*
* @par Parameter type
* char const *
*
* @par Values
*
* Corresponding tag taking reference parameter is NUTAG_WSS_URL_REF().
*/
tag_typedef_t
nutag_wss_url
=
URLTAG_TYPEDEF
(
wss_url
);
/**@def NUTAG_WSS_URL_REF(x)
* Reference tag for NUTAG_WSS_URL().
*/
/**@def NUTAG_CERTIFICATE_DIR(x)
*
...
...
libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
浏览文件 @
99559a3c
...
...
@@ -286,6 +286,16 @@ SOFIAPUBVAR tag_typedef_t nutag_sips_url;
#define NUTAG_SIPS_URL_REF(x) nutag_sips_url_ref, urltag_url_vr(&(x))
SOFIAPUBVAR
tag_typedef_t
nutag_sips_url_ref
;
#define NUTAG_WS_URL(x) nutag_ws_url, urltag_url_v(x)
SOFIAPUBVAR
tag_typedef_t
nutag_ws_url
;
#define NUTAG_WS_URL_REF(x) nutag_ws_url_ref, urltag_url_vr(&(x))
SOFIAPUBVAR
tag_typedef_t
nutag_ws_url_ref
;
#define NUTAG_WSS_URL(x) nutag_wss_url, urltag_url_v(x)
SOFIAPUBVAR
tag_typedef_t
nutag_wss_url
;
#define NUTAG_WSS_URL_REF(x) nutag_wss_url_ref, urltag_url_vr(&(x))
SOFIAPUBVAR
tag_typedef_t
nutag_wss_url_ref
;
#define NUTAG_PROXY(x) NTATAG_DEFAULT_PROXY(x)
#define NUTAG_PROXY_REF(x) NTATAG_DEFAULT_PROXY_REF(x)
#define nutag_proxy ntatag_default_proxy
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论