Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
fc131660
提交
fc131660
authored
2月 27, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-5118 take 2
上级
a3786d52
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
24 行增加
和
12 行删除
+24
-12
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+1
-4
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+1
-1
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+21
-6
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
fc131660
...
...
@@ -4687,10 +4687,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
*
*/
if
((
params
=
strchr
(
dest
,
'+'
)))
{
*
params
=
';'
;
params
=
NULL
;
}
else
if
((
params
=
strchr
(
dest
,
';'
)))
{
if
((
params
=
strchr
(
dest
,
';'
)))
{
char
*
tp_param
;
*
params
++
=
'\0'
;
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
fc131660
...
...
@@ -1046,7 +1046,7 @@ void sofia_presence_set_hash_key(char *hash_key, int32_t len, sip_t const *sip);
void
sofia_glue_sql_close
(
sofia_profile_t
*
profile
,
time_t
prune
);
int
sofia_glue_init_sql
(
sofia_profile_t
*
profile
);
char
*
sofia_overcome_sip_uri_weakness
(
switch_core_session_t
*
session
,
const
char
*
uri
,
const
sofia_transport_t
transport
,
switch_bool_t
uri_only
,
const
char
*
params
);
const
char
*
params
,
const
char
*
invite_tel_params
);
switch_bool_t
sofia_glue_execute_sql_callback
(
sofia_profile_t
*
profile
,
switch_mutex_t
*
mutex
,
char
*
sql
,
switch_core_db_callback_func_t
callback
,
void
*
pdata
);
char
*
sofia_glue_execute_sql2str
(
sofia_profile_t
*
profile
,
switch_mutex_t
*
mutex
,
char
*
sql
,
char
*
resbuf
,
size_t
len
);
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
fc131660
...
...
@@ -8060,7 +8060,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
switch_channel_hangup
(
tech_pvt
->
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
}
tmp
=
sofia_overcome_sip_uri_weakness
(
session
,
url
,
transport
,
SWITCH_TRUE
,
NULL
);
tmp
=
sofia_overcome_sip_uri_weakness
(
session
,
url
,
transport
,
SWITCH_TRUE
,
NULL
,
NULL
);
if
((
at
=
strchr
(
tmp
,
'@'
)))
{
url
=
switch_core_session_sprintf
(
session
,
"sip:%s%s"
,
user
,
at
);
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
fc131660
...
...
@@ -1447,12 +1447,13 @@ void sofia_glue_get_addr(msg_t *msg, char *buf, size_t buflen, int *port)
}
char
*
sofia_overcome_sip_uri_weakness
(
switch_core_session_t
*
session
,
const
char
*
uri
,
const
sofia_transport_t
transport
,
switch_bool_t
uri_only
,
const
char
*
params
)
const
char
*
params
,
const
char
*
invite_tel_params
)
{
char
*
stripped
=
switch_core_session_strdup
(
session
,
uri
);
char
*
new_uri
=
NULL
;
char
*
p
;
stripped
=
sofia_glue_get_url_from_contact
(
stripped
,
0
);
/* remove our params so we don't make any whiny moronic device piss it's pants and forget who it is for a half-hour */
...
...
@@ -1496,6 +1497,18 @@ char *sofia_overcome_sip_uri_weakness(switch_core_session_t *session, const char
}
}
if
(
!
zstr
(
invite_tel_params
))
{
char
*
lhs
,
*
rhs
=
strchr
(
new_uri
,
'@'
);
if
(
!
zstr
(
rhs
))
{
*
rhs
++
=
'\0'
;
lhs
=
new_uri
;
new_uri
=
switch_core_session_sprintf
(
session
,
"%s;%s@%s"
,
lhs
,
invite_tel_params
,
rhs
);
}
}
return
new_uri
;
}
...
...
@@ -2191,6 +2204,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
const
char
*
screen
=
"no"
;
const
char
*
invite_params
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_invite_params"
);
const
char
*
invite_to_params
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_invite_to_params"
);
const
char
*
invite_tel_params
=
switch_channel_get_variable
(
switch_core_session_get_channel
(
session
),
"sip_invite_tel_params"
);
const
char
*
invite_to_uri
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_invite_to_uri"
);
const
char
*
invite_from_uri
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_invite_from_uri"
);
const
char
*
invite_contact_params
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_invite_contact_params"
);
...
...
@@ -2199,6 +2213,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
const
char
*
from_display
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_from_display"
);
const
char
*
invite_req_uri
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_invite_req_uri"
);
const
char
*
invite_domain
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_invite_domain"
);
const
char
*
use_name
,
*
use_number
;
if
(
zstr
(
tech_pvt
->
dest
))
{
...
...
@@ -2335,10 +2350,10 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
}
}
url_str
=
sofia_overcome_sip_uri_weakness
(
session
,
url
,
tech_pvt
->
transport
,
SWITCH_TRUE
,
invite_params
);
invite_contact
=
sofia_overcome_sip_uri_weakness
(
session
,
tech_pvt
->
invite_contact
,
tech_pvt
->
transport
,
SWITCH_FALSE
,
invite_contact_params
);
from_str
=
sofia_overcome_sip_uri_weakness
(
session
,
invite_from_uri
?
invite_from_uri
:
use_from_str
,
0
,
SWITCH_TRUE
,
invite_from_params
);
to_str
=
sofia_overcome_sip_uri_weakness
(
session
,
invite_to_uri
?
invite_to_uri
:
tech_pvt
->
dest_to
,
0
,
SWITCH_FALSE
,
invite_to_params
);
url_str
=
sofia_overcome_sip_uri_weakness
(
session
,
url
,
tech_pvt
->
transport
,
SWITCH_TRUE
,
invite_params
,
invite_tel_params
);
invite_contact
=
sofia_overcome_sip_uri_weakness
(
session
,
tech_pvt
->
invite_contact
,
tech_pvt
->
transport
,
SWITCH_FALSE
,
invite_contact_params
,
NULL
);
from_str
=
sofia_overcome_sip_uri_weakness
(
session
,
invite_from_uri
?
invite_from_uri
:
use_from_str
,
0
,
SWITCH_TRUE
,
invite_from_params
,
NULL
);
to_str
=
sofia_overcome_sip_uri_weakness
(
session
,
invite_to_uri
?
invite_to_uri
:
tech_pvt
->
dest_to
,
0
,
SWITCH_FALSE
,
invite_to_params
,
NULL
);
switch_channel_set_variable
(
channel
,
"sip_outgoing_contact_uri"
,
invite_contact
);
...
...
@@ -2603,7 +2618,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
dst
=
sofia_glue_get_destination
(
tech_pvt
->
dest
);
if
(
dst
->
route_uri
)
{
route_uri
=
sofia_overcome_sip_uri_weakness
(
tech_pvt
->
session
,
dst
->
route_uri
,
tech_pvt
->
transport
,
SWITCH_TRUE
,
NULL
);
route_uri
=
sofia_overcome_sip_uri_weakness
(
tech_pvt
->
session
,
dst
->
route_uri
,
tech_pvt
->
transport
,
SWITCH_TRUE
,
NULL
,
NULL
);
}
if
(
dst
->
route
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论