Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
4dbc9d7c
提交
4dbc9d7c
authored
11月 23, 2011
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-3688 I think 100'th time's the charm.....
上级
58c3c3a0
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
17 行删除
+22
-17
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+6
-2
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+16
-15
没有找到文件。
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
4dbc9d7c
...
@@ -5790,8 +5790,12 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
...
@@ -5790,8 +5790,12 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
goto
done
;
goto
done
;
}
}
if
(
switch_channel_test_flag
(
channel
,
CF_PROXY_MODE
))
{
if
(
switch_channel_test_flag
(
channel
,
CF_PROXY_MEDIA
))
{
sofia_glue_tech_proxy_remote_addr
(
tech_pvt
,
r_sdp
);
if
(
sofia_glue_tech_proxy_remote_addr
(
tech_pvt
,
r_sdp
)
==
SWITCH_STATUS_SUCCESS
)
{
nua_respond
(
tech_pvt
->
nh
,
SIP_200_OK
,
TAG_END
());
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"Audio params changed, NOT proxying re-invite.
\n
"
);
goto
done
;
}
}
}
msg
=
switch_core_session_alloc
(
other_session
,
sizeof
(
*
msg
));
msg
=
switch_core_session_alloc
(
other_session
,
sizeof
(
*
msg
));
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
4dbc9d7c
...
@@ -1383,13 +1383,14 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1383,13 +1383,14 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
char
*
p
,
*
ip_ptr
=
NULL
,
*
port_ptr
=
NULL
,
*
vid_port_ptr
=
NULL
,
*
pe
;
char
*
p
,
*
ip_ptr
=
NULL
,
*
port_ptr
=
NULL
,
*
vid_port_ptr
=
NULL
,
*
pe
;
int
x
;
int
x
;
const
char
*
val
;
const
char
*
val
;
switch_status_t
status
=
SWITCH_STATUS_FALSE
;
if
(
zstr
(
sdp_str
))
{
if
(
zstr
(
sdp_str
))
{
sdp_str
=
tech_pvt
->
remote_sdp_str
;
sdp_str
=
tech_pvt
->
remote_sdp_str
;
}
}
if
(
zstr
(
sdp_str
))
{
if
(
zstr
(
sdp_str
))
{
return
SWITCH_STATUS_FALSE
;
goto
end
;
}
}
if
((
p
=
(
char
*
)
switch_stristr
(
"c=IN IP4 "
,
sdp_str
))
||
(
p
=
(
char
*
)
switch_stristr
(
"c=IN IP6 "
,
sdp_str
)))
{
if
((
p
=
(
char
*
)
switch_stristr
(
"c=IN IP4 "
,
sdp_str
))
||
(
p
=
(
char
*
)
switch_stristr
(
"c=IN IP6 "
,
sdp_str
)))
{
...
@@ -1409,7 +1410,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1409,7 +1410,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
}
}
if
(
!
(
ip_ptr
&&
port_ptr
))
{
if
(
!
(
ip_ptr
&&
port_ptr
))
{
return
SWITCH_STATUS_FALSE
;
goto
end
;
}
}
p
=
ip_ptr
;
p
=
ip_ptr
;
...
@@ -1419,7 +1420,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1419,7 +1420,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
rip
[
x
++
]
=
*
p
;
rip
[
x
++
]
=
*
p
;
p
++
;
p
++
;
if
(
p
>=
pe
)
{
if
(
p
>=
pe
)
{
return
SWITCH_STATUS_FALSE
;
goto
end
;
}
}
}
}
...
@@ -1429,7 +1430,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1429,7 +1430,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
rp
[
x
++
]
=
*
p
;
rp
[
x
++
]
=
*
p
;
p
++
;
p
++
;
if
(
p
>=
pe
)
{
if
(
p
>=
pe
)
{
return
SWITCH_STATUS_FALSE
;
goto
end
;
}
}
}
}
...
@@ -1439,13 +1440,13 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1439,13 +1440,13 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
rvp
[
x
++
]
=
*
p
;
rvp
[
x
++
]
=
*
p
;
p
++
;
p
++
;
if
(
p
>=
pe
)
{
if
(
p
>=
pe
)
{
return
SWITCH_STATUS_FALSE
;
goto
end
;
}
}
}
}
if
(
!
(
*
rip
&&
*
rp
))
{
if
(
!
(
*
rip
&&
*
rp
))
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_ERROR
,
"invalid SDP
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_ERROR
,
"invalid SDP
\n
"
);
return
SWITCH_STATUS_FALSE
;
goto
end
;
}
}
tech_pvt
->
remote_sdp_audio_ip
=
switch_core_session_strdup
(
tech_pvt
->
session
,
rip
);
tech_pvt
->
remote_sdp_audio_ip
=
switch_core_session_strdup
(
tech_pvt
->
session
,
rip
);
...
@@ -1500,7 +1501,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1500,7 +1501,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
if
(
remote_host
&&
remote_port
&&
!
strcmp
(
remote_host
,
tech_pvt
->
remote_sdp_audio_ip
)
&&
remote_port
==
tech_pvt
->
remote_sdp_audio_port
)
{
if
(
remote_host
&&
remote_port
&&
!
strcmp
(
remote_host
,
tech_pvt
->
remote_sdp_audio_ip
)
&&
remote_port
==
tech_pvt
->
remote_sdp_audio_port
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_DEBUG
,
"Remote address:port [%s:%d] has not changed.
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_DEBUG
,
"Remote address:port [%s:%d] has not changed.
\n
"
,
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
);
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
);
return
SWITCH_STATUS_SUCCESS
;
switch_goto_status
(
SWITCH_STATUS_BREAK
,
end
)
;
}
}
if
((
rport
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_remote_audio_rtcp_port"
)))
{
if
((
rport
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_remote_audio_rtcp_port"
)))
{
...
@@ -1511,6 +1512,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1511,6 +1512,7 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
rtp_session
,
tech_pvt
->
remote_sdp_audio_ip
,
if
(
switch_rtp_set_remote_address
(
tech_pvt
->
rtp_session
,
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
,
remote_rtcp_port
,
SWITCH_TRUE
,
&
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
tech_pvt
->
remote_sdp_audio_port
,
remote_rtcp_port
,
SWITCH_TRUE
,
&
err
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_ERROR
,
"AUDIO RTP REPORTS ERROR: [%s]
\n
"
,
err
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_ERROR
,
"AUDIO RTP REPORTS ERROR: [%s]
\n
"
,
err
);
status
=
SWITCH_STATUS_GENERR
;
}
else
{
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_DEBUG
,
"AUDIO RTP CHANGING DEST TO: [%s:%d]
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_DEBUG
,
"AUDIO RTP CHANGING DEST TO: [%s:%d]
\n
"
,
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
);
tech_pvt
->
remote_sdp_audio_ip
,
tech_pvt
->
remote_sdp_audio_port
);
...
@@ -1522,10 +1524,13 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
...
@@ -1522,10 +1524,13 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
if
(
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_AUTOFIX_TIMING
))
{
if
(
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_AUTOFIX_TIMING
))
{
tech_pvt
->
check_frames
=
0
;
tech_pvt
->
check_frames
=
0
;
}
}
status
=
SWITCH_STATUS_SUCCESS
;
}
}
}
}
return
SWITCH_STATUS_SUCCESS
;
end:
return
status
;
}
}
...
@@ -3174,9 +3179,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
...
@@ -3174,9 +3179,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
}
}
if
(
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MEDIA
))
{
if
(
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MEDIA
))
{
if
((
status
=
sofia_glue_tech_proxy_remote_addr
(
tech_pvt
,
NULL
))
!=
SWITCH_STATUS_SUCCESS
)
{
sofia_glue_tech_proxy_remote_addr
(
tech_pvt
,
NULL
);
goto
end
;
}
if
(
!
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_DISABLE_RTP_AUTOADJ
)
&&
if
(
!
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_DISABLE_RTP_AUTOADJ
)
&&
!
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"disable_rtp_auto_adjust"
))
&&
switch_true
(
val
)))
{
!
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"disable_rtp_auto_adjust"
))
&&
switch_true
(
val
)))
{
...
@@ -3497,9 +3500,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
...
@@ -3497,9 +3500,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
}
}
if
(
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MEDIA
))
{
if
(
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MEDIA
))
{
if
((
status
=
sofia_glue_tech_proxy_remote_addr
(
tech_pvt
,
NULL
))
!=
SWITCH_STATUS_SUCCESS
)
{
sofia_glue_tech_proxy_remote_addr
(
tech_pvt
,
NULL
);
goto
end
;
}
if
(
!
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_DISABLE_RTP_AUTOADJ
)
&&
if
(
!
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_DISABLE_RTP_AUTOADJ
)
&&
!
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"disable_rtp_auto_adjust"
))
&&
switch_true
(
val
)))
{
!
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"disable_rtp_auto_adjust"
))
&&
switch_true
(
val
)))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论