Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c1d41dd9
提交
c1d41dd9
authored
10月 12, 2010
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
only pause recording media bugs in fifo
上级
42f534fa
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
29 行增加
和
13 行删除
+29
-13
switch_types.h
src/include/switch_types.h
+2
-1
mod_spandsp_dsp.c
src/mod/applications/mod_spandsp/mod_spandsp_dsp.c
+1
-1
switch_core_io.c
src/switch_core_io.c
+15
-3
switch_ivr_async.c
src/switch_ivr_async.c
+11
-8
没有找到文件。
src/include/switch_types.h
浏览文件 @
c1d41dd9
...
...
@@ -1266,7 +1266,8 @@ typedef enum {
SMBF_STEREO
=
(
1
<<
5
),
SMBF_ANSWER_REQ
=
(
1
<<
6
),
SMBF_THREAD_LOCK
=
(
1
<<
7
),
SMBF_PRUNE
=
(
1
<<
8
)
SMBF_PRUNE
=
(
1
<<
8
),
SMBF_NO_PAUSE
=
(
1
<<
9
)
}
switch_media_bug_flag_enum_t
;
typedef
uint32_t
switch_media_bug_flag_t
;
...
...
src/mod/applications/mod_spandsp/mod_spandsp_dsp.c
浏览文件 @
c1d41dd9
...
...
@@ -140,7 +140,7 @@ switch_status_t spandsp_inband_dtmf_session(switch_core_session_t *session)
}
if
((
status
=
switch_core_media_bug_add
(
session
,
"spandsp_dtmf_detect"
,
NULL
,
inband_dtmf_callback
,
pvt
,
0
,
SMBF_READ_REPLACE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
inband_dtmf_callback
,
pvt
,
0
,
SMBF_READ_REPLACE
|
SMBF_NO_PAUSE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
return
status
;
}
...
...
src/switch_core_io.c
浏览文件 @
c1d41dd9
...
...
@@ -367,13 +367,17 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
}
}
if
(
session
->
bugs
&&
!
switch_channel_test_flag
(
session
->
channel
,
CF_PAUSE_BUGS
)
)
{
if
(
session
->
bugs
)
{
switch_media_bug_t
*
bp
;
switch_bool_t
ok
=
SWITCH_TRUE
;
int
prune
=
0
;
switch_thread_rwlock_rdlock
(
session
->
bug_rwlock
);
for
(
bp
=
session
->
bugs
;
bp
;
bp
=
bp
->
next
)
{
if
(
switch_channel_test_flag
(
session
->
channel
,
CF_PAUSE_BUGS
)
&&
!
switch_core_media_bug_test_flag
(
bp
,
SMBF_NO_PAUSE
))
{
continue
;
}
if
(
!
switch_channel_test_flag
(
session
->
channel
,
CF_ANSWERED
)
&&
switch_core_media_bug_test_flag
(
bp
,
SMBF_ANSWER_REQ
))
{
continue
;
}
...
...
@@ -528,12 +532,16 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
if
(
flag
&
SFF_CNG
)
{
switch_set_flag
((
*
frame
),
SFF_CNG
);
}
if
(
session
->
bugs
&&
!
switch_channel_test_flag
(
session
->
channel
,
CF_PAUSE_BUGS
)
)
{
if
(
session
->
bugs
)
{
switch_media_bug_t
*
bp
;
switch_bool_t
ok
=
SWITCH_TRUE
;
int
prune
=
0
;
switch_thread_rwlock_rdlock
(
session
->
bug_rwlock
);
for
(
bp
=
session
->
bugs
;
bp
;
bp
=
bp
->
next
)
{
if
(
switch_channel_test_flag
(
session
->
channel
,
CF_PAUSE_BUGS
)
&&
!
switch_core_media_bug_test_flag
(
bp
,
SMBF_NO_PAUSE
))
{
continue
;
}
if
(
!
switch_channel_test_flag
(
session
->
channel
,
CF_ANSWERED
)
&&
switch_core_media_bug_test_flag
(
bp
,
SMBF_ANSWER_REQ
))
{
continue
;
}
...
...
@@ -814,7 +822,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
if
(
session
->
bugs
&&
!
switch_channel_test_flag
(
session
->
channel
,
CF_PAUSE_BUGS
)
)
{
if
(
session
->
bugs
)
{
switch_media_bug_t
*
bp
;
int
prune
=
0
;
...
...
@@ -825,6 +833,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
continue
;
}
if
(
switch_channel_test_flag
(
session
->
channel
,
CF_PAUSE_BUGS
)
&&
!
switch_core_media_bug_test_flag
(
bp
,
SMBF_NO_PAUSE
))
{
continue
;
}
if
(
!
switch_channel_test_flag
(
session
->
channel
,
CF_ANSWERED
)
&&
switch_core_media_bug_test_flag
(
bp
,
SMBF_ANSWER_REQ
))
{
continue
;
}
...
...
src/switch_ivr_async.c
浏览文件 @
c1d41dd9
...
...
@@ -827,10 +827,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_displace_session(switch_core_session_
if
(
flags
&&
strchr
(
flags
,
'r'
))
{
status
=
switch_core_media_bug_add
(
session
,
"displace"
,
file
,
read_displace_callback
,
dh
,
to
,
SMBF_WRITE_REPLACE
|
SMBF_READ_REPLACE
,
&
bug
);
read_displace_callback
,
dh
,
to
,
SMBF_WRITE_REPLACE
|
SMBF_READ_REPLACE
|
SMBF_NO_PAUSE
,
&
bug
);
}
else
{
status
=
switch_core_media_bug_add
(
session
,
"displace"
,
file
,
write_displace_callback
,
dh
,
to
,
SMBF_WRITE_REPLACE
|
SMBF_READ_REPLACE
,
&
bug
);
write_displace_callback
,
dh
,
to
,
SMBF_WRITE_REPLACE
|
SMBF_READ_REPLACE
|
SMBF_NO_PAUSE
,
&
bug
);
}
if
(
status
!=
SWITCH_STATUS_SUCCESS
)
{
...
...
@@ -1166,7 +1166,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
if
(
switch_core_media_bug_add
(
tsession
,
"eavesdrop"
,
uuid
,
eavesdrop_callback
,
ep
,
0
,
SMBF_READ_STREAM
|
SMBF_WRITE_STREAM
|
SMBF_READ_REPLACE
|
SMBF_WRITE_REPLACE
|
SMBF_READ_PING
|
SMBF_THREAD_LOCK
,
SMBF_READ_STREAM
|
SMBF_WRITE_STREAM
|
SMBF_READ_REPLACE
|
SMBF_WRITE_REPLACE
|
SMBF_READ_PING
|
SMBF_THREAD_LOCK
|
SMBF_NO_PAUSE
,
&
bug
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"Cannot attach bug
\n
"
);
goto
end
;
...
...
@@ -1622,7 +1623,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_preprocess_session(switch_core_sessio
switch_media_bug_t
*
bug
;
switch_status_t
status
;
time_t
to
=
0
;
switch_media_bug_flag_t
flags
=
0
;
switch_media_bug_flag_t
flags
=
SMBF_NO_PAUSE
;
switch_codec_implementation_t
read_impl
=
{
0
};
pp_cb_t
*
cb
;
int
update
=
0
;
...
...
@@ -1885,7 +1886,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_audio(switch_core_session_t *
switch_status_t
status
;
switch_session_audio_t
*
pvt
;
switch_codec_implementation_t
read_impl
=
{
0
};
int
existing
=
0
,
c_read
=
0
,
c_write
=
0
,
flags
=
0
;
int
existing
=
0
,
c_read
=
0
,
c_write
=
0
,
flags
=
SMBF_NO_PAUSE
;
if
(
switch_channel_pre_answer
(
channel
)
!=
SWITCH_STATUS_SUCCESS
)
{
return
SWITCH_STATUS_FALSE
;
...
...
@@ -2035,7 +2036,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_inband_dtmf_session(switch_core_sessi
}
if
((
status
=
switch_core_media_bug_add
(
session
,
"inband_dtmf"
,
NULL
,
inband_dtmf_callback
,
pvt
,
0
,
SMBF_READ_REPLACE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
inband_dtmf_callback
,
pvt
,
0
,
SMBF_READ_REPLACE
|
SMBF_NO_PAUSE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
return
status
;
}
...
...
@@ -2236,7 +2237,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_inband_dtmf_generate_session(switch_c
if
((
status
=
switch_core_media_bug_add
(
session
,
"inband_dtmf_generate"
,
NULL
,
inband_dtmf_generate_callback
,
pvt
,
0
,
pvt
->
read
?
SMBF_READ_REPLACE
:
SMBF_WRITE_REPLACE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
SMBF_NO_PAUSE
|
pvt
->
read
?
SMBF_READ_REPLACE
:
SMBF_WRITE_REPLACE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
return
status
;
}
...
...
@@ -2540,6 +2541,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_tone_detect_session(switch_core_sessi
}
}
bflags
|=
SMBF_NO_PAUSE
;
if
(
cont
->
bug_running
)
{
status
=
SWITCH_STATUS_SUCCESS
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"%s bug already running
\n
"
,
switch_channel_get_name
(
channel
));
...
...
@@ -3192,7 +3195,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *
}
if
((
status
=
switch_core_media_bug_add
(
session
,
"detect_speech"
,
key
,
speech_callback
,
sth
,
0
,
SMBF_READ_STREAM
,
&
sth
->
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
speech_callback
,
sth
,
0
,
SMBF_READ_STREAM
|
SMBF_NO_PAUSE
,
&
sth
->
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_core_asr_close
(
ah
,
&
flags
);
return
status
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论