Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
609b0b32
提交
609b0b32
authored
6月 21, 2013
作者:
Chris Rienzo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mod_rayo: fix crash when DTMF is received after input timeout
上级
eb79128d
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
0 行删除
+11
-0
rayo_input_component.c
src/mod/event_handlers/mod_rayo/rayo_input_component.c
+11
-0
没有找到文件。
src/mod/event_handlers/mod_rayo/rayo_input_component.c
浏览文件 @
609b0b32
...
...
@@ -208,7 +208,14 @@ static switch_status_t input_component_on_dtmf(switch_core_session_t *session, c
enum
srgs_match_type
match
;
switch_mutex_lock
(
handler
->
mutex
);
component
=
handler
->
component
;
/* additional paranoia check */
if
(
!
component
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_INFO
,
"Received DTMF without active input component
\n
"
);
switch_mutex_unlock
(
handler
->
mutex
);
return
SWITCH_STATUS_SUCCESS
;
}
is_term_digit
=
digit_mask_test
(
component
->
term_digit_mask
,
dtmf
->
digit
);
...
...
@@ -280,6 +287,7 @@ static switch_bool_t input_component_bug_callback(switch_media_bug_t *bug, void
switch
(
type
)
{
case
SWITCH_ABC_TYPE_INIT
:
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"Adding DTMF callback
\n
"
);
switch_core_event_hook_add_recv_dtmf
(
session
,
input_component_on_dtmf
);
break
;
}
...
...
@@ -291,6 +299,7 @@ static switch_bool_t input_component_bug_callback(switch_media_bug_t *bug, void
if
(
component
->
num_digits
&&
component
->
inter_digit_timeout
>
0
&&
elapsed_ms
>
component
->
inter_digit_timeout
)
{
enum
srgs_match_type
match
;
handler
->
component
=
NULL
;
switch_core_media_bug_set_flag
(
bug
,
SMBF_PRUNE
);
/* we got some input, check for match */
match
=
srgs_grammar_match
(
component
->
grammar
,
component
->
digits
);
...
...
@@ -306,6 +315,7 @@ static switch_bool_t input_component_bug_callback(switch_media_bug_t *bug, void
}
}
else
if
(
!
component
->
num_digits
&&
component
->
initial_timeout
>
0
&&
elapsed_ms
>
component
->
initial_timeout
)
{
handler
->
component
=
NULL
;
switch_core_media_bug_set_flag
(
bug
,
SMBF_PRUNE
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"initial-timeout
\n
"
);
rayo_component_send_complete
(
RAYO_COMPONENT
(
component
),
INPUT_NOINPUT
);
}
...
...
@@ -324,6 +334,7 @@ static switch_bool_t input_component_bug_callback(switch_media_bug_t *bug, void
rayo_component_send_complete
(
RAYO_COMPONENT
(
component
),
COMPONENT_COMPLETE_HANGUP
);
}
}
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"Removing DTMF callback
\n
"
);
switch_core_event_hook_remove_recv_dtmf
(
session
,
input_component_on_dtmf
);
break
;
default:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论