Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
0fe7efe7
提交
0fe7efe7
authored
12月 18, 2007
作者:
Michael Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanups
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@6869
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
50326f4d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
17 行删除
+19
-17
stfu.c
libs/stfu/stfu.c
+3
-1
switch_ivr.c
src/switch_ivr.c
+7
-7
switch_ivr_originate.c
src/switch_ivr_originate.c
+2
-2
switch_ivr_play_say.c
src/switch_ivr_play_say.c
+7
-7
没有找到文件。
libs/stfu/stfu.c
浏览文件 @
0fe7efe7
...
...
@@ -81,7 +81,9 @@ stfu_instance_t *stfu_n_init(uint32_t qlen)
struct
stfu_instance
*
i
;
i
=
malloc
(
sizeof
(
*
i
));
assert
(
i
!=
NULL
);
if
(
!
i
)
{
return
NULL
;
}
memset
(
i
,
0
,
sizeof
(
*
i
));
stfu_n_init_aqueue
(
&
i
->
a_queue
,
qlen
);
stfu_n_init_aqueue
(
&
i
->
b_queue
,
qlen
);
...
...
src/switch_ivr.c
浏览文件 @
0fe7efe7
...
...
@@ -441,7 +441,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
switch_byte_t
decoded
[
SWITCH_RECOMMENDED_BUFFER_SIZE
];
uint32_t
rate
=
read_codec
->
implementation
->
actual_samples_per_second
;
uint32_t
dlen
=
sizeof
(
decoded
);
switch_status_t
status
;
switch_status_t
t
status
;
switch_byte_t
*
sendbuf
=
NULL
;
uint32_t
sendlen
=
0
;
...
...
@@ -452,9 +452,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
status
=
SWITCH_STATUS_SUCCESS
;
}
else
{
if
(
switch_test_flag
(
conninfo
,
SUF_NATIVE
))
{
status
=
SWITCH_STATUS_NOOP
;
t
status
=
SWITCH_STATUS_NOOP
;
}
else
{
status
=
switch_core_codec_decode
(
t
status
=
switch_core_codec_decode
(
read_codec
,
&
conninfo
->
read_codec
,
read_frame
->
data
,
...
...
@@ -462,17 +462,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
read_codec
->
implementation
->
actual_samples_per_second
,
decoded
,
&
dlen
,
&
rate
,
&
flags
);
}
switch
(
status
)
{
switch
(
t
status
)
{
case
SWITCH_STATUS_NOOP
:
case
SWITCH_STATUS_BREAK
:
sendbuf
=
read_frame
->
data
;
sendlen
=
read_frame
->
datalen
;
status
=
SWITCH_STATUS_SUCCESS
;
t
status
=
SWITCH_STATUS_SUCCESS
;
break
;
case
SWITCH_STATUS_SUCCESS
:
sendbuf
=
decoded
;
sendlen
=
dlen
;
status
=
SWITCH_STATUS_SUCCESS
;
t
status
=
SWITCH_STATUS_SUCCESS
;
break
;
default
:
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_NOTICE
,
"Codec Error
\n
"
);
...
...
@@ -481,7 +481,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
}
}
if
(
status
==
SWITCH_STATUS_SUCCESS
)
{
if
(
t
status
==
SWITCH_STATUS_SUCCESS
)
{
len
=
sendlen
;
if
(
switch_socket_sendto
(
conninfo
->
socket
,
conninfo
->
remote_addr
,
0
,
(
void
*
)
sendbuf
,
&
len
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_ivr_deactivate_unicast
(
session
);
...
...
src/switch_ivr_originate.c
浏览文件 @
0fe7efe7
...
...
@@ -785,9 +785,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
/* read from the channel while we wait if the audio is up on it */
if
(
session
&&
(
ringback_data
||
!
switch_channel_test_flag
(
caller_channel
,
CF_BYPASS_MEDIA
))
&&
(
switch_channel_test_flag
(
caller_channel
,
CF_ANSWERED
)
||
switch_channel_test_flag
(
caller_channel
,
CF_EARLY_MEDIA
)))
{
switch_status_t
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
1000
,
0
);
switch_status_t
t
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
1000
,
0
);
if
(
!
SWITCH_READ_ACCEPTABLE
(
status
))
{
if
(
!
SWITCH_READ_ACCEPTABLE
(
t
status
))
{
break
;
}
...
...
src/switch_ivr_play_say.c
浏览文件 @
0fe7efe7
...
...
@@ -1063,13 +1063,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
}
}
else
{
/* time off the channel (if you must) */
switch_frame_t
*
read_frame
;
switch_status_t
status
;
switch_status_t
t
status
;
while
(
switch_channel_ready
(
channel
)
&&
switch_channel_test_flag
(
channel
,
CF_HOLD
))
{
switch_yield
(
10000
);
}
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
-
1
,
0
);
t
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
-
1
,
0
);
if
(
!
SWITCH_READ_ACCEPTABLE
(
status
))
{
if
(
!
SWITCH_READ_ACCEPTABLE
(
t
status
))
{
break
;
}
...
...
@@ -1387,13 +1387,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
}
}
else
{
switch_frame_t
*
read_frame
;
switch_status_t
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
-
1
,
0
);
switch_status_t
t
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
-
1
,
0
);
while
(
switch_channel_ready
(
channel
)
&&
switch_channel_test_flag
(
channel
,
CF_HOLD
))
{
switch_yield
(
10000
);
}
if
(
!
SWITCH_READ_ACCEPTABLE
(
status
))
{
if
(
!
SWITCH_READ_ACCEPTABLE
(
t
status
))
{
break
;
}
...
...
@@ -1450,13 +1450,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
}
}
else
{
/* time off the channel (if you must) */
switch_frame_t
*
read_frame
;
switch_status_t
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
-
1
,
0
);
switch_status_t
t
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
-
1
,
0
);
while
(
switch_channel_ready
(
channel
)
&&
switch_channel_test_flag
(
channel
,
CF_HOLD
))
{
switch_yield
(
10000
);
}
if
(
!
SWITCH_READ_ACCEPTABLE
(
status
))
{
if
(
!
SWITCH_READ_ACCEPTABLE
(
t
status
))
{
break
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论