Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
1212c95e
提交
1212c95e
authored
6月 09, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tweak ivr
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@1589
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
d607494a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
18 行增加
和
11 行删除
+18
-11
mod_rss.c
src/mod/applications/mod_rss/mod_rss.c
+16
-11
switch_ivr.c
src/switch_ivr.c
+2
-0
没有找到文件。
src/mod/applications/mod_rss/mod_rss.c
浏览文件 @
1212c95e
...
@@ -131,7 +131,6 @@ static void rss_function(switch_core_session_t *session, char *data)
...
@@ -131,7 +131,6 @@ static void rss_function(switch_core_session_t *session, char *data)
{
{
switch_channel_t
*
channel
;
switch_channel_t
*
channel
;
switch_status_t
status
;
switch_status_t
status
;
switch_frame_t
*
read_frame
;
const
char
*
err
=
NULL
;
const
char
*
err
=
NULL
;
struct
dtmf_buffer
dtb
=
{
0
};
struct
dtmf_buffer
dtb
=
{
0
};
switch_xml_t
xml
=
NULL
,
item
,
xchannel
=
NULL
;
switch_xml_t
xml
=
NULL
,
item
,
xchannel
=
NULL
;
...
@@ -186,13 +185,6 @@ static void rss_function(switch_core_session_t *session, char *data)
...
@@ -186,13 +185,6 @@ static void rss_function(switch_core_session_t *session, char *data)
switch_channel_answer
(
channel
);
switch_channel_answer
(
channel
);
for
(
dtb
.
index
=
0
;
dtb
.
index
<
10
;
dtb
.
index
++
)
{
if
((
status
=
switch_core_session_read_frame
(
session
,
&
read_frame
,
-
1
,
0
))
!=
SWITCH_STATUS_SUCCESS
)
{
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
goto
done
;
}
}
if
(
!
switch_strlen_zero
(
data
))
{
if
(
!
switch_strlen_zero
(
data
))
{
if
((
mydata
=
switch_core_session_strdup
(
session
,
data
)))
{
if
((
mydata
=
switch_core_session_strdup
(
session
,
data
)))
{
...
@@ -312,9 +304,21 @@ static void rss_function(switch_core_session_t *session, char *data)
...
@@ -312,9 +304,21 @@ static void rss_function(switch_core_session_t *session, char *data)
}
}
i
=
atoi
(
cmd
)
-
1
;
i
=
atoi
(
cmd
)
-
1
;
if
(
i
>
=
0
&&
i
<=
feed_index
)
{
if
(
i
>
-
1
&&
i
<
feed_index
)
{
filename
=
feed_list
[
i
];
filename
=
feed_list
[
i
];
}
else
{
status
=
switch_ivr_speak_text_handle
(
session
,
&
sh
,
&
speech_codec
,
timerp
,
NULL
,
"I'm sorry. That is an Invalid Selection. "
,
NULL
,
0
);
if
(
status
!=
SWITCH_STATUS_SUCCESS
&&
status
!=
SWITCH_STATUS_BREAK
)
{
goto
finished
;
}
}
}
}
}
...
@@ -323,6 +327,7 @@ static void rss_function(switch_core_session_t *session, char *data)
...
@@ -323,6 +327,7 @@ static void rss_function(switch_core_session_t *session, char *data)
}
}
if
(
!
(
xml
=
switch_xml_parse_file
(
filename
)))
{
if
(
!
(
xml
=
switch_xml_parse_file
(
filename
)))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"open of %s failed
\n
"
,
filename
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"open of %s failed
\n
"
,
filename
);
goto
finished
;
goto
finished
;
...
@@ -571,7 +576,7 @@ static void rss_function(switch_core_session_t *session, char *data)
...
@@ -571,7 +576,7 @@ static void rss_function(switch_core_session_t *session, char *data)
switch_core_timer_destroy
(
&
timer
);
switch_core_timer_destroy
(
&
timer
);
}
}
done:
switch_xml_free
(
xml
);
switch_xml_free
(
xml
);
switch_core_session_reset
(
session
);
switch_core_session_reset
(
session
);
...
...
src/switch_ivr.c
浏览文件 @
1212c95e
...
@@ -534,7 +534,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
...
@@ -534,7 +534,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
len
=
samples
*
2
;
len
=
samples
*
2
;
flags
=
0
;
flags
=
0
;
switch_sleep
(
200000
);
switch_core_speech_feed_tts
(
sh
,
text
,
&
flags
);
switch_core_speech_feed_tts
(
sh
,
text
,
&
flags
);
write_frame
.
rate
=
sh
->
rate
;
write_frame
.
rate
=
sh
->
rate
;
memset
(
write_frame
.
data
,
0
,
len
);
memset
(
write_frame
.
data
,
0
,
len
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论