Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch-contrib
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch-contrib
Commits
b411a529
提交
b411a529
authored
1月 26, 2012
作者:
Raymond Chandler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor a bit
上级
1b97f2f2
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
506 行增加
和
317 行删除
+506
-317
main_menu.php
intralanman/PHP/phttapi/example/main_menu.php
+44
-41
phttapi.php
intralanman/PHP/phttapi/phttapi.php
+462
-276
没有找到文件。
intralanman/PHP/phttapi/example/main_menu.php
浏览文件 @
b411a529
<?php
if
(
array_key_exists
(
'option'
,
$_REQUEST
)
)
{
$option
=
$_REQUEST
[
'option'
];
$option
=
$_REQUEST
[
'option'
];
}
else
{
$option
=
''
;
$option
=
''
;
}
if
(
$option
)
{
switch
(
$option
)
{
case
'1'
:
$menu_ivr_path
=
'disa'
;
break
;
case
'2'
:
$menu_ivr_path
=
'record'
;
break
;
//
case '':
//
$menu_ivr_path = '';
//
break;
}
switch
(
$option
)
{
case
'1'
:
$menu_ivr_path
=
'disa'
;
break
;
case
'2'
:
$menu_ivr_path
=
'record'
;
break
;
//
case '':
//
$menu_ivr_path = '';
//
break;
}
$api
=
new
phttapi
();
$api
=
new
phttapi
();
$api
->
start_variables
();
$api
->
add_variable
(
'ivr_path'
,
$menu_ivr_path
);
$api
->
end_variables
();
$api
->
start_variables
();
$api
->
add_variable
(
'ivr_path'
,
$menu_ivr_path
);
$api
->
end_variables
();
$api
->
start_work
();
$api
->
start_work
();
$var
=
new
phttapi_getVariable
(
'ivr_path'
);
$var
->
permanent
(
'true'
);
$api
->
add_action
(
$var
);
$var
=
new
phttapi_getVariable
(
'ivr_path'
);
$var
->
permanent
(
'true'
);
$api
->
add_action
(
$var
);
$api
->
end_work
();
print
$api
->
output
();
$api
->
end_work
();
print
$api
->
output
();
}
else
{
$api
=
new
phttapi
();
$api
->
start_work
();
$bind1
=
new
phttapi_action_binding
(
'1'
);
$bind2
=
new
phttapi_action_binding
(
'2'
);
$play
=
new
phttapi_speak
(
"to make an outbound call, press 1,, to record a file, press 2,, "
);
$play
->
engine
(
'flite'
);
$play
->
voice
(
'slt'
);
$play
->
name
(
'option'
);
$play
->
input_timeout
(
'5000'
);
$play
->
add_binding
(
$bind1
);
$play
->
add_binding
(
$bind2
);
$api
->
add_action
(
$play
);
$api
->
end_work
();
print
$api
->
output
();
$api
=
new
phttapi
();
$api
->
start_work
();
$pause
=
new
phttapi_pause
();
$pause
->
milliseconds
(
1500
);
$bind1
=
new
phttapi_action_binding
(
'1'
);
$bind1
->
strip
(
'#'
);
$bind2
=
new
phttapi_action_binding
(
'2'
);
$play
=
new
phttapi_google_tts
();
$play
->
text
(
"to make an outbound call, press 1,, to record a file, press 2"
);
$play
->
name
(
'option'
);
$play
->
input_timeout
(
'5000'
);
$play
->
add_binding
(
$bind1
);
$play
->
add_binding
(
$bind2
);
$api
->
add_action
(
$pause
);
$api
->
add_action
(
$play
);
$api
->
end_work
();
print
$api
->
output
();
}
intralanman/PHP/phttapi/phttapi.php
浏览文件 @
b411a529
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论