至于怎么安装就不说了,网上一搜一大堆,一般建议源码安装,源码安装模块都比较全,加模块也比较方便。下面简单的说一下各个模块
在使用ivr的时候,一般都是lua实现ivr。虽然fs提供了menu的配置,但是感觉不太灵活。要使用lua的ivr首先得 写一个lua的脚本。
--打印日志
session:consoleLog("info","--------------进入欢迎的语音菜单");
--要执行answer才能给对方播放语音菜单
session:answer();
--设置这一行才会在lua执行完毕之后不自动挂断
session:setAutoHangup(false)
--在死循环里面一定要判断当前会话还有没有效
while(session:ready()==true) do
--播放语音,告诉对方,每一个拨号的选项
session:streamFile("/usr/local/freeswitch/sounds/welcome.wav");
--这里获取对端输入的dtmf信息,也就算按下的是多少
local digi