Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e10bc0a9
提交
e10bc0a9
authored
10月 26, 2010
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
allow {dtmf_type=none} to work in oubound dial strings
上级
08d2ea9d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
12 行删除
+22
-12
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+3
-0
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-0
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+18
-12
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
e10bc0a9
...
...
@@ -80,6 +80,9 @@ static switch_status_t sofia_on_init(switch_core_session_t *session)
tech_pvt
->
read_frame
.
buflen
=
SWITCH_RTP_MAX_BUF_LEN
;
switch_mutex_lock
(
tech_pvt
->
sofia_mutex
);
sofia_glue_check_dtmf_type
(
tech_pvt
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"%s SOFIA INIT
\n
"
,
switch_channel_get_name
(
channel
));
if
(
switch_channel_test_flag
(
channel
,
CF_PROXY_MODE
)
||
switch_channel_test_flag
(
channel
,
CF_PROXY_MEDIA
))
{
sofia_glue_tech_absorb_sdp
(
tech_pvt
);
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
e10bc0a9
...
...
@@ -1029,3 +1029,4 @@ void sofia_glue_global_watchdog(switch_bool_t on);
void
sofia_glue_proxy_codec
(
switch_core_session_t
*
session
,
const
char
*
r_sdp
);
switch_status_t
sofia_glue_sdp_map
(
const
char
*
r_sdp
,
switch_event_t
**
fmtp
,
switch_event_t
**
pt
);
void
sofia_glue_build_vid_refresh_message
(
switch_core_session_t
*
session
,
const
char
*
pl
);
void
sofia_glue_check_dtmf_type
(
private_object_t
*
tech_pvt
);
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
e10bc0a9
...
...
@@ -336,6 +336,23 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
}
void
sofia_glue_check_dtmf_type
(
private_object_t
*
tech_pvt
)
{
const
char
*
val
;
if
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"dtmf_type"
)))
{
if
(
!
strcasecmp
(
val
,
"rfc2833"
))
{
tech_pvt
->
dtmf_type
=
DTMF_2833
;
}
else
if
(
!
strcasecmp
(
val
,
"info"
))
{
tech_pvt
->
dtmf_type
=
DTMF_INFO
;
}
else
if
(
!
strcasecmp
(
val
,
"none"
))
{
tech_pvt
->
dtmf_type
=
DTMF_NONE
;
}
else
{
tech_pvt
->
dtmf_type
=
tech_pvt
->
profile
->
dtmf_type
;
}
}
}
void
sofia_glue_set_local_sdp
(
private_object_t
*
tech_pvt
,
const
char
*
ip
,
uint32_t
port
,
const
char
*
sr
,
int
force
)
{
...
...
@@ -357,6 +374,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
switch_event_t
*
map
=
NULL
,
*
ptmap
=
NULL
;
const
char
*
b_sdp
=
NULL
;
sofia_glue_check_dtmf_type
(
tech_pvt
);
if
(
!
tech_pvt
->
payload_space
)
{
int
i
;
...
...
@@ -797,8 +815,6 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *
tech_pvt
->
recv_te
=
tech_pvt
->
te
=
profile
->
te
;
}
tech_pvt
->
dtmf_type
=
profile
->
dtmf_type
;
if
(
!
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_SUPPRESS_CNG
))
{
if
(
tech_pvt
->
bcng_pt
)
{
tech_pvt
->
cng_pt
=
tech_pvt
->
bcng_pt
;
...
...
@@ -2904,16 +2920,6 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
flags
=
(
switch_rtp_flag_t
)
(
SWITCH_RTP_FLAG_DATAWAIT
);
}
if
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"dtmf_type"
)))
{
if
(
!
strcasecmp
(
val
,
"rfc2833"
))
{
tech_pvt
->
dtmf_type
=
DTMF_2833
;
}
else
if
(
!
strcasecmp
(
val
,
"info"
))
{
tech_pvt
->
dtmf_type
=
DTMF_INFO
;
}
else
{
tech_pvt
->
dtmf_type
=
tech_pvt
->
profile
->
dtmf_type
;
}
}
if
(
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_PASS_RFC2833
)
||
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"pass_rfc2833"
))
&&
switch_true
(
val
)))
{
sofia_set_flag
(
tech_pvt
,
TFLAG_PASS_RFC2833
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论