Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
f795acbf
提交
f795acbf
authored
1月 26, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7193 #resolve
上级
8d599a82
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
6 行删除
+11
-6
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+11
-6
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
f795acbf
...
@@ -4247,11 +4247,12 @@ static switch_status_t sofia_manage(char *relative_oid, switch_management_action
...
@@ -4247,11 +4247,12 @@ static switch_status_t sofia_manage(char *relative_oid, switch_management_action
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
static
void
protect_dest_uri
(
switch_caller_profile_t
*
cp
)
static
int
protect_dest_uri
(
switch_caller_profile_t
*
cp
)
{
{
char
*
p
=
cp
->
destination_number
,
*
o
=
p
;
char
*
p
=
cp
->
destination_number
,
*
o
=
p
;
char
*
q
=
NULL
,
*
e
=
NULL
,
*
qenc
=
NULL
;
char
*
q
=
NULL
,
*
e
=
NULL
,
*
qenc
=
NULL
;
switch_size_t
enclen
=
0
;
switch_size_t
enclen
=
0
;
int
mod
=
0
;
while
((
p
=
strchr
(
p
,
'/'
)))
{
while
((
p
=
strchr
(
p
,
'/'
)))
{
q
=
p
++
;
q
=
p
++
;
...
@@ -4267,11 +4268,11 @@ static void protect_dest_uri(switch_caller_profile_t *cp)
...
@@ -4267,11 +4268,11 @@ static void protect_dest_uri(switch_caller_profile_t *cp)
}
}
}
}
if
(
!
go
)
return
;
if
(
!
go
)
return
0
;
*
q
++
=
'\0'
;
*
q
++
=
'\0'
;
}
else
{
}
else
{
return
;
return
0
;
}
}
if
(
!
strncasecmp
(
q
,
"sips:"
,
5
))
{
if
(
!
strncasecmp
(
q
,
"sips:"
,
5
))
{
...
@@ -4281,7 +4282,7 @@ static void protect_dest_uri(switch_caller_profile_t *cp)
...
@@ -4281,7 +4282,7 @@ static void protect_dest_uri(switch_caller_profile_t *cp)
}
}
if
(
!
(
e
=
strchr
(
q
,
'@'
)))
{
if
(
!
(
e
=
strchr
(
q
,
'@'
)))
{
return
;
return
0
;
}
}
*
e
++
=
'\0'
;
*
e
++
=
'\0'
;
...
@@ -4290,9 +4291,12 @@ static void protect_dest_uri(switch_caller_profile_t *cp)
...
@@ -4290,9 +4291,12 @@ static void protect_dest_uri(switch_caller_profile_t *cp)
enclen
=
(
strlen
(
q
)
*
2
)
+
2
;
enclen
=
(
strlen
(
q
)
*
2
)
+
2
;
qenc
=
switch_core_alloc
(
cp
->
pool
,
enclen
);
qenc
=
switch_core_alloc
(
cp
->
pool
,
enclen
);
switch_url_encode
(
q
,
qenc
,
enclen
);
switch_url_encode
(
q
,
qenc
,
enclen
);
mod
=
1
;
}
}
cp
->
destination_number
=
switch_core_sprintf
(
cp
->
pool
,
"%s/%s@%s"
,
o
,
qenc
?
qenc
:
q
,
e
);
cp
->
destination_number
=
switch_core_sprintf
(
cp
->
pool
,
"%s/%s@%s"
,
o
,
qenc
?
qenc
:
q
,
e
);
return
mod
;
}
}
static
switch_call_cause_t
sofia_outgoing_channel
(
switch_core_session_t
*
session
,
switch_event_t
*
var_event
,
static
switch_call_cause_t
sofia_outgoing_channel
(
switch_core_session_t
*
session
,
switch_event_t
*
var_event
,
...
@@ -4312,6 +4316,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
...
@@ -4312,6 +4316,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
int
cid_locked
=
0
;
int
cid_locked
=
0
;
switch_channel_t
*
o_channel
=
NULL
;
switch_channel_t
*
o_channel
=
NULL
;
sofia_gateway_t
*
gateway_ptr
=
NULL
;
sofia_gateway_t
*
gateway_ptr
=
NULL
;
int
mod
=
0
;
*
new_session
=
NULL
;
*
new_session
=
NULL
;
...
@@ -4321,7 +4326,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
...
@@ -4321,7 +4326,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
}
}
if
(
!
switch_true
(
switch_event_get_header
(
var_event
,
"sofia_suppress_url_encoding"
)))
{
if
(
!
switch_true
(
switch_event_get_header
(
var_event
,
"sofia_suppress_url_encoding"
)))
{
protect_dest_uri
(
outbound_profile
);
mod
=
protect_dest_uri
(
outbound_profile
);
}
}
if
(
!
(
nsession
=
switch_core_session_request_uuid
(
sofia_endpoint_interface
,
SWITCH_CALL_DIRECTION_OUTBOUND
,
if
(
!
(
nsession
=
switch_core_session_request_uuid
(
sofia_endpoint_interface
,
SWITCH_CALL_DIRECTION_OUTBOUND
,
...
@@ -4509,7 +4514,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
...
@@ -4509,7 +4514,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
c
++
;
c
++
;
tech_pvt
->
e_dest
=
switch_core_session_strdup
(
nsession
,
c
);
tech_pvt
->
e_dest
=
switch_core_session_strdup
(
nsession
,
c
);
}
}
}
else
if
((
host
=
strchr
(
dest
,
'%'
)))
{
}
else
if
(
!
mod
&&
(
host
=
strchr
(
dest
,
'%'
)))
{
char
buf
[
1024
];
char
buf
[
1024
];
*
host
=
'@'
;
*
host
=
'@'
;
tech_pvt
->
e_dest
=
switch_core_session_strdup
(
nsession
,
dest
);
tech_pvt
->
e_dest
=
switch_core_session_strdup
(
nsession
,
dest
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论