Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
bfd0ba97
提交
bfd0ba97
authored
3月 07, 2011
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
do not renegotiate codecs on hold re-invites
上级
0db261ac
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
42 行增加
和
3 行删除
+42
-3
internal.xml
conf/sip_profiles/internal.xml
+7
-0
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+2
-1
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+12
-0
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+21
-2
没有找到文件。
conf/sip_profiles/internal.xml
浏览文件 @
bfd0ba97
...
@@ -342,6 +342,13 @@
...
@@ -342,6 +342,13 @@
<!-- Turn on a jitterbuffer for every call -->
<!-- Turn on a jitterbuffer for every call -->
<!-- <param name="auto-jitterbuffer-msec" value="60"/> -->
<!-- <param name="auto-jitterbuffer-msec" value="60"/> -->
<!-- By default mod_sofia will ignore the codecs in the sdp for hold/unhold operations
Set this to true if you want to actually parse the sdp and re-negotiate the codec during hold/unhold.
It's probably not what you want so stick with the default unless you really need to change this.
-->
<!--<param name="renegotiate-codec-on-hold" value="true"/>-->
</settings>
</settings>
</profile>
</profile>
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
bfd0ba97
...
@@ -230,6 +230,7 @@ typedef enum {
...
@@ -230,6 +230,7 @@ typedef enum {
PFLAG_PRESENCE_ON_REGISTER
,
PFLAG_PRESENCE_ON_REGISTER
,
PFLAG_PRESENCE_ON_FIRST_REGISTER
,
PFLAG_PRESENCE_ON_FIRST_REGISTER
,
PFLAG_NO_CONNECTION_REUSE
,
PFLAG_NO_CONNECTION_REUSE
,
PFLAG_RENEG_ON_HOLD
,
/* No new flags below this line */
/* No new flags below this line */
PFLAG_MAX
PFLAG_MAX
}
PFLAGS
;
}
PFLAGS
;
...
@@ -984,7 +985,7 @@ void sofia_glue_del_every_gateway(sofia_profile_t *profile);
...
@@ -984,7 +985,7 @@ void sofia_glue_del_every_gateway(sofia_profile_t *profile);
void
sofia_reg_send_reboot
(
sofia_profile_t
*
profile
,
const
char
*
user
,
const
char
*
host
,
const
char
*
contact
,
const
char
*
user_agent
,
void
sofia_reg_send_reboot
(
sofia_profile_t
*
profile
,
const
char
*
user
,
const
char
*
host
,
const
char
*
contact
,
const
char
*
user_agent
,
const
char
*
network_ip
);
const
char
*
network_ip
);
void
sofia_glue_restart_all_profiles
(
void
);
void
sofia_glue_restart_all_profiles
(
void
);
void
sofia_glue_toggle_hold
(
private_object_t
*
tech_pvt
,
int
sendonly
);
int
sofia_glue_toggle_hold
(
private_object_t
*
tech_pvt
,
int
sendonly
);
const
char
*
sofia_state_string
(
int
state
);
const
char
*
sofia_state_string
(
int
state
);
switch_status_t
sofia_glue_tech_set_codec
(
private_object_t
*
tech_pvt
,
int
force
);
switch_status_t
sofia_glue_tech_set_codec
(
private_object_t
*
tech_pvt
,
int
force
);
void
sofia_wait_for_reply
(
struct
private_object
*
tech_pvt
,
nua_event_t
event
,
uint32_t
timeout
);
void
sofia_wait_for_reply
(
struct
private_object
*
tech_pvt
,
nua_event_t
event
,
uint32_t
timeout
);
...
...
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
bfd0ba97
...
@@ -2436,6 +2436,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
...
@@ -2436,6 +2436,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
}
else
{
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_IGNORE_183NOSDP
);
sofia_clear_pflag
(
profile
,
PFLAG_IGNORE_183NOSDP
);
}
}
}
else
if
(
!
strcasecmp
(
var
,
"renegotiate-codec-on-hold"
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_RENEG_ON_HOLD
);
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_RENEG_ON_HOLD
);
}
}
else
if
(
!
strcasecmp
(
var
,
"presence-probe-on-register"
))
{
}
else
if
(
!
strcasecmp
(
var
,
"presence-probe-on-register"
))
{
if
(
switch_true
(
val
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_PRESENCE_PROBE_ON_REGISTER
);
sofia_set_pflag
(
profile
,
PFLAG_PRESENCE_PROBE_ON_REGISTER
);
...
@@ -3119,6 +3125,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
...
@@ -3119,6 +3125,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
}
else
{
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_IGNORE_183NOSDP
);
sofia_clear_pflag
(
profile
,
PFLAG_IGNORE_183NOSDP
);
}
}
}
else
if
(
!
strcasecmp
(
var
,
"renegotiate-codec-on-hold"
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_RENEG_ON_HOLD
);
}
else
{
sofia_clear_pflag
(
profile
,
PFLAG_RENEG_ON_HOLD
);
}
}
else
if
(
!
strcasecmp
(
var
,
"presence-probe-on-register"
))
{
}
else
if
(
!
strcasecmp
(
var
,
"presence-probe-on-register"
))
{
if
(
switch_true
(
val
))
{
if
(
switch_true
(
val
))
{
sofia_set_pflag
(
profile
,
PFLAG_PRESENCE_PROBE_ON_REGISTER
);
sofia_set_pflag
(
profile
,
PFLAG_PRESENCE_PROBE_ON_REGISTER
);
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
bfd0ba97
...
@@ -3759,8 +3759,10 @@ switch_status_t sofia_glue_tech_media(private_object_t *tech_pvt, const char *r_
...
@@ -3759,8 +3759,10 @@ switch_status_t sofia_glue_tech_media(private_object_t *tech_pvt, const char *r_
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
void
sofia_glue_toggle_hold
(
private_object_t
*
tech_pvt
,
int
sendonly
)
int
sofia_glue_toggle_hold
(
private_object_t
*
tech_pvt
,
int
sendonly
)
{
{
int
changed
=
0
;
if
(
sendonly
&&
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_ANSWERED
))
{
if
(
sendonly
&&
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_ANSWERED
))
{
if
(
!
sofia_test_flag
(
tech_pvt
,
TFLAG_SIP_HOLD
))
{
if
(
!
sofia_test_flag
(
tech_pvt
,
TFLAG_SIP_HOLD
))
{
const
char
*
stream
;
const
char
*
stream
;
...
@@ -3779,6 +3781,7 @@ void sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
...
@@ -3779,6 +3781,7 @@ void sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
switch_channel_set_flag
(
tech_pvt
->
channel
,
CF_LEG_HOLDING
);
switch_channel_set_flag
(
tech_pvt
->
channel
,
CF_LEG_HOLDING
);
switch_channel_mark_hold
(
tech_pvt
->
channel
,
SWITCH_TRUE
);
switch_channel_mark_hold
(
tech_pvt
->
channel
,
SWITCH_TRUE
);
switch_channel_presence
(
tech_pvt
->
channel
,
"unknown"
,
msg
,
NULL
);
switch_channel_presence
(
tech_pvt
->
channel
,
"unknown"
,
msg
,
NULL
);
changed
=
1
;
if
(
tech_pvt
->
max_missed_hold_packets
)
{
if
(
tech_pvt
->
max_missed_hold_packets
)
{
switch_rtp_set_max_missed_packets
(
tech_pvt
->
rtp_session
,
tech_pvt
->
max_missed_hold_packets
);
switch_rtp_set_max_missed_packets
(
tech_pvt
->
rtp_session
,
tech_pvt
->
max_missed_hold_packets
);
...
@@ -3805,6 +3808,7 @@ void sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
...
@@ -3805,6 +3808,7 @@ void sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
sofia_set_flag
(
tech_pvt
,
TFLAG_SIP_HOLD
);
sofia_set_flag
(
tech_pvt
,
TFLAG_SIP_HOLD
);
switch_channel_set_flag
(
tech_pvt
->
channel
,
CF_LEG_HOLDING
);
switch_channel_set_flag
(
tech_pvt
->
channel
,
CF_LEG_HOLDING
);
switch_channel_mark_hold
(
tech_pvt
->
channel
,
SWITCH_TRUE
);
switch_channel_mark_hold
(
tech_pvt
->
channel
,
SWITCH_TRUE
);
changed
=
1
;
}
}
sofia_clear_flag_locked
(
tech_pvt
,
TFLAG_HOLD_LOCK
);
sofia_clear_flag_locked
(
tech_pvt
,
TFLAG_HOLD_LOCK
);
...
@@ -3838,8 +3842,11 @@ void sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
...
@@ -3838,8 +3842,11 @@ void sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
switch_channel_clear_flag
(
tech_pvt
->
channel
,
CF_LEG_HOLDING
);
switch_channel_clear_flag
(
tech_pvt
->
channel
,
CF_LEG_HOLDING
);
switch_channel_mark_hold
(
tech_pvt
->
channel
,
SWITCH_FALSE
);
switch_channel_mark_hold
(
tech_pvt
->
channel
,
SWITCH_FALSE
);
switch_channel_presence
(
tech_pvt
->
channel
,
"unknown"
,
"unhold"
,
NULL
);
switch_channel_presence
(
tech_pvt
->
channel
,
"unknown"
,
"unhold"
,
NULL
);
changed
=
1
;
}
}
}
}
return
changed
;
}
}
void
sofia_glue_copy_t38_options
(
switch_t38_options_t
*
t38_options
,
switch_core_session_t
*
session
)
void
sofia_glue_copy_t38_options
(
switch_t38_options_t
*
t38_options
,
switch_core_session_t
*
session
)
...
@@ -4264,7 +4271,19 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
...
@@ -4264,7 +4271,19 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
if
(
!
tech_pvt
->
hold_laps
)
{
if
(
!
tech_pvt
->
hold_laps
)
{
tech_pvt
->
hold_laps
++
;
tech_pvt
->
hold_laps
++
;
sofia_glue_toggle_hold
(
tech_pvt
,
sendonly
);
if
(
sofia_glue_toggle_hold
(
tech_pvt
,
sendonly
))
{
int
reneg
=
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_RENEG_ON_HOLD
);
if
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_renegotiate_codec_on_hold"
)))
{
reneg
=
switch_true
(
val
);
}
if
(
!
reneg
)
{
match
=
1
;
goto
done
;
}
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论