Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
090e8284
提交
090e8284
authored
7月 25, 2019
作者:
Mike Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-11961: [mod_sofia] Handle request vs response in sofia_media_tech_media
上级
dc1e8512
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
8 行增加
和
8 行删除
+8
-8
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+3
-3
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+2
-2
sofia_media.c
src/mod/endpoints/mod_sofia/sofia_media.c
+2
-2
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
090e8284
...
...
@@ -880,7 +880,7 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
switch_core_media_prepare_codecs
(
tech_pvt
->
session
,
SWITCH_TRUE
);
if
(
zstr
(
r_sdp
)
||
sofia_media_tech_media
(
tech_pvt
,
r_sdp
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
zstr
(
r_sdp
)
||
sofia_media_tech_media
(
tech_pvt
,
r_sdp
,
SDP_TYPE_REQUEST
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_channel_set_variable
(
channel
,
SWITCH_ENDPOINT_DISPOSITION_VARIABLE
,
"CODEC NEGOTIATION ERROR"
);
//switch_mutex_lock(tech_pvt->sofia_mutex);
//nua_respond(tech_pvt->nh, SIP_488_NOT_ACCEPTABLE, TAG_END());
...
...
@@ -1772,7 +1772,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
if
(
switch_channel_direction
(
tech_pvt
->
channel
)
==
SWITCH_CALL_DIRECTION_INBOUND
)
{
switch_core_media_prepare_codecs
(
tech_pvt
->
session
,
SWITCH_TRUE
);
if
(
sofia_media_tech_media
(
tech_pvt
,
r_sdp
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
sofia_media_tech_media
(
tech_pvt
,
r_sdp
,
SDP_TYPE_REQUEST
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_channel_set_variable
(
channel
,
SWITCH_ENDPOINT_DISPOSITION_VARIABLE
,
"CODEC NEGOTIATION ERROR"
);
status
=
SWITCH_STATUS_FALSE
;
goto
end_lock
;
...
...
@@ -2575,7 +2575,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
switch_core_media_prepare_codecs
(
tech_pvt
->
session
,
SWITCH_TRUE
);
if
(
zstr
(
r_sdp
)
||
sofia_media_tech_media
(
tech_pvt
,
r_sdp
)
!=
SWITCH_STATUS_SUCCESS
)
{
if
(
zstr
(
r_sdp
)
||
sofia_media_tech_media
(
tech_pvt
,
r_sdp
,
SDP_TYPE_REQUEST
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_WARNING
,
"CODEC NEGOTIATION ERROR. SDP:
\n
%s
\n
"
,
r_sdp
?
r_sdp
:
"NO SDP!"
);
switch_channel_set_variable
(
channel
,
SWITCH_ENDPOINT_DISPOSITION_VARIABLE
,
"CODEC NEGOTIATION ERROR"
);
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
090e8284
...
...
@@ -998,7 +998,7 @@ char *sofia_glue_session_id_header(switch_core_session_t *session, sofia_profile
* \param sdp The parsed SDP content
*/
void
sofia_media_set_r_sdp_codec_string
(
switch_core_session_t
*
session
,
const
char
*
codec_string
,
sdp_session_t
*
sdp
);
switch_status_t
sofia_media_tech_media
(
private_object_t
*
tech_pvt
,
const
char
*
r_sdp
);
switch_status_t
sofia_media_tech_media
(
private_object_t
*
tech_pvt
,
const
char
*
r_sdp
,
switch_sdp_type_t
type
);
char
*
sofia_reg_find_reg_url
(
sofia_profile_t
*
profile
,
const
char
*
user
,
const
char
*
host
,
char
*
val
,
switch_size_t
len
);
void
event_handler
(
switch_event_t
*
event
);
void
sofia_presence_event_handler
(
switch_event_t
*
event
);
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
090e8284
...
...
@@ -7476,7 +7476,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
}
} else {
if
(
sofia_media_tech_media
(
tech_pvt
,
(
char
*
)
r_sdp
)
!=
SWITCH_STATUS_SUCCESS
)
{
if (sofia_media_tech_media(tech_pvt, (char *) r_sdp
, SDP_TYPE_REQUEST
) != SWITCH_STATUS_SUCCESS) {
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "CODEC NEGOTIATION ERROR");
nua_respond(nh, SIP_488_NOT_ACCEPTABLE,
TAG_IF(!zstr(session_id_header), SIPTAG_HEADER_STR(session_id_header)),TAG_END());
...
...
@@ -7981,7 +7981,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
switch_core_media_prepare_codecs(tech_pvt->session, SWITCH_TRUE);
if
(
sofia_media_tech_media
(
tech_pvt
,
r_sdp
)
!=
SWITCH_STATUS_SUCCESS
)
{
if (sofia_media_tech_media(tech_pvt, r_sdp
, SDP_TYPE_REQUEST
) != SWITCH_STATUS_SUCCESS) {
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "CODEC NEGOTIATION ERROR");
switch_core_session_rwunlock(other_session);
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
...
...
src/mod/endpoints/mod_sofia/sofia_media.c
浏览文件 @
090e8284
...
...
@@ -69,7 +69,7 @@ switch_status_t sofia_media_activate_rtp(private_object_t *tech_pvt)
switch_status_t
sofia_media_tech_media
(
private_object_t
*
tech_pvt
,
const
char
*
r_sdp
)
switch_status_t
sofia_media_tech_media
(
private_object_t
*
tech_pvt
,
const
char
*
r_sdp
,
switch_sdp_type_t
type
)
{
uint8_t
match
=
0
;
...
...
@@ -80,7 +80,7 @@ switch_status_t sofia_media_tech_media(private_object_t *tech_pvt, const char *r
return
SWITCH_STATUS_FALSE
;
}
if
((
match
=
sofia_media_negotiate_sdp
(
tech_pvt
->
session
,
r_sdp
,
SDP_TYPE_REQUEST
)))
{
if
((
match
=
sofia_media_negotiate_sdp
(
tech_pvt
->
session
,
r_sdp
,
type
)))
{
if
(
switch_core_media_choose_port
(
tech_pvt
->
session
,
SWITCH_MEDIA_TYPE_AUDIO
,
0
)
!=
SWITCH_STATUS_SUCCESS
)
{
return
SWITCH_STATUS_FALSE
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论