当前位置: 首页 > news >正文

FreeSWITCH fifo模块排队并动态播放排队位置

1. fs dialplan增加extension,将通话放置在队列中

<extension name="fifoQueue4CallTest"><condition field="destination_number" expression="^fifoQueue4CallTest$"><action application="set" data="fifo_music=local_stream://moh"/><!--<action application="set" data="fifo_chime_list=say:您拨打的客户正在通话中,请耐心等候"/>--><action application="set" data="fifo_chime_list=phrase:test_fifo_position:${uuid}"/><action application="set" data="fifo_chime_freq=15"/><action application="fifo" data="queuetest in"/></condition>
</extension>

上述配置,先设置排队等待音(fifo_music),在设置提示语(fifo_chime_list),这里的提示语用的是Parase短语+Macro的形式,可以在运行时再去解析获取具体播报内容,然后每隔15秒重复播报提示语,这些都设置好之后,进入队列

2. conf/lang/en/ivr/sounds.xml中加test_fifo_position Macro

<macro name="test_fifo_position"><input pattern="^(.*)$"><match><action function="speak-text" data="您拨打的电话正在通话中,您当前排在第${fifo_position}位"/></match></input>
</macro>

3. 修改conf/lang/en/en.xml配置文件,配置tts-engine和tts-voice

<include><language name="en" say-module="en" sound-prefix="$${sound_prefix}" tts_engine="unimrcp:hs-tts" tts_voice="xiaoruan" ><phrases><macros><X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml --><!-- voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. --><X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/> <!-- vm/tts.xml if you want to use tts and have cepstral --><X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral --><X-PRE-PROCESS cmd="include" data="ivr/*.xml"/>  <!-- IVR and custom phrases go here --></macros><X-PRE-PROCESS cmd="include" data="vm/voicemail_ivr.xml"/></phrases></language></include>

然后fs_cli中reloadxml,进线即可听到对应的提示语

http://www.lryc.cn/news/588010.html

相关文章:

  • 12.如何判断字符串是否为空?
  • AI驱动的软件工程(下):AI辅助的质检与交付
  • SpringBoot 整合 MyBatis-Plus
  • 智源全面开源RoboBrain 2.0与RoboOS 2.0:刷新10项评测基准,多机协作加速群体智能
  • LangChain面试内容整理-知识点16:OpenAI API接口集成
  • docker-compose 安装Alist
  • rk3588ubuntu 系统移植AIC8800D Wi-Fi6/BT5.0芯片
  • FRP Ubuntu 服务端 + MacOS 客户端配置
  • mac安装nvm执行命令报错-解决方案
  • Ubuntu服务器安装Miniconda
  • 131. Java 泛型 - 目标类型与泛型推断
  • 一般的非线性规划求解(非凸函数)
  • 深度解析:htmlspecialchars 与 nl2br 结合使用的前后端协作之道,大学毕业论文——仙盟创梦IDE
  • 50天50个小项目 (Vue3 + Tailwindcss V4) ✨ | GithubProfies(GitHub 个人资料)
  • 持续优化小程序排名,稳定获取搜索流量
  • 动态规划题解——最长递增子序列【LeetCode】记忆化搜索方法
  • 掉线监测-tezos rpc不能用,改为残疾网页监测
  • urlencode、html实体编码、unicode
  • 认识下计算机视觉中的人脸识别
  • React强大且灵活hooks库——ahooks入门实践之DOM类hook(dom)详解
  • C++-linux 5.gdb调试工具
  • LSY_C语言编程题
  • AI数据分析仪设计原理图:RapidIO信号接入 平板AI数据分析仪
  • Markdown表格列格式(加粗 / 高亮 / 复选 / 进度条 / 数值 / 货币 /…)~优雅好用的 Typora 主题与增强插件 VLOOK™
  • MFC中BOOL类型,在某些操作系统中,-1不能被识别,一般是哪些原因?
  • NAT原理与实验指南:网络地址转换技术解析与实践
  • com2tcp工具
  • 使用axios向服务器请求信息并渲染页面
  • DVWA靶场通关笔记-存储型XSS(Stored Medium级别)
  • TCP心跳机制详解