FreeSwitch Lua Welcome IVR
来源:互联网 发布:知行小学和中学怎么样 编辑:程序博客网 时间:2024/05/16 11:46
IVR(Interactive Voice Response),交互式语音应答系统
预备知识:
- mod_lua
- mod_flite ,也可以是 mod_cepstral
步骤一:配置拨号计划
在拨号计划(dialplan)中配置extensions调用LUA脚本——welecome.lua
welcome.xml(freeswitch/conf/dialplan/default/welcome.xml)
<include> <extension name="welcome_ivr"> <condition field="destination_number" expression="^2910$"> <action application="lua" data="welcome.lua"/> </condition> </extension></include>
步骤二:LUA脚本
welcome.lua(freeswitch/scripts/welcome.lua)
session:answer();while (session:ready() == true) do session:setAutoHangup(false); session:set_tts_params("flite", "kal"); session:speak("Welcome. Welcome to the VoIp World!. this is a Blind Users Programing Community. powered by Freeswitch, the free ultimate PBX. thank to toni!"); session:sleep(100); session:speak("please select an Action."); session:sleep(100); session:speak("to call the conference, press 1"); session:sleep(100); session:speak("to call Freeswitch IVR, press 2"); session:sleep(100); session:speak("to call Voice Mail, press 3"); session:sleep(100); session:speak("for Music on hold, press 4"); session:sleep(100); session:speak("to call me, press 0"); session:sleep(3000); digits = session:getDigits(1, "", 3000); if (digits == "1") then session:execute("transfer","9888"); end if (digits == "2") then session:execute("transfer","5000"); end if (digits == "3") then session:execute("transfer","4000"); end if (digits == "4") then session:execute("transfer","9999"); end if (digits == "0") then session:execute("transfer","voipaware@sip.voipuser.org"); endend注意:
1.需要取消激活枚举,即将99999XX.xml改成9999XX.xml.noload或者其他不同于原名字即可
(官网上信息可能有误,仅在源码中找到相关文件,编译后的文件未找到)
2.不要同时加载mod_flite和mod_cepstral
翻译出处:https://freeswitch.org/confluence/display/FREESWITCH/Lua+Welcome+IVR+example
0 0
- FreeSwitch Lua Welcome IVR
- freeswitch lua实现ivr导航
- freeswitch ivr脚本
- freeswitch中设置中文ivr
- 《FreeSWITCH: VoIP实战》:使用 XML 建立 IVR
- freeswitch中IVR的menu设置中使用phrase
- freeswitch lua会议模块
- LUA freeswitch 常用小结
- IVR
- FreeSWITCH中的lua操作小结
- FreeSWITCH中的lua操作小结
- freeswitch会议模块lua脚本
- FreeSWITCH中的lua操作小结
- 《FreeSWITCH: VoIP实战》: 使用Erlang建立IVR实现复杂业务逻辑
- FreeSWITCH向lua脚本传递参数
- FreeSwitch LUA API ——API Events
- FreeSwitch LUA API ——API Sessions
- Welcome!
- 在Java中动态的加载一个布局
- centos 下安装mysql5.5.30 + 配置主从同步
- 数据库事务的隔离级别
- 嵌入式GUI方案选择
- xml解析(SAX)
- FreeSwitch Lua Welcome IVR
- greenplum 批量导入mysql 数据库数据
- CCCC/GPLT L2-006 树的遍历
- Linux 下获取目录a下文件b的操作
- Spring MVC 学习总结
- Js bind\live\delegate\on 事件绑定方式
- Linux进程间通信(IPC)
- ERROR:a label can only be part of a statement and a declaration is not a statement
- react项目实战【1】react基本知识