User-Profile-Image
hankin
  • 5
  • centos7
  • docker
  • mysql
  • PostgreSQL
  • git/gitlab
  • ELK
  • python
    • python-Tornado
    • python-django
  • redis
  • nginx
  • kvm
  • proxmox
  • mongo
  • kubernetes
  • prometheus
  • GlusterFs
  • nfs
  • freeswitch
  • httpd
  • shell脚本
  • linux
  • fastdfs
  • nextcloud
  • openssl
  • openvpn
  • rabbitmq
  • sqlite
  • svn
  • java
  • ubuntu
  • vue2
  • wordpress
  • php
  • IOT物联网
  • 项目
  • 故障处理
  • 树莓派
  • 博客存档
  • 未分类
  • 杂项
  • #1742(无标题)
  • 新视野
  • 分类
    • 项目
    • 树莓派
    • 杂项
    • 未分类
    • 新视野
    • 故障处理
    • 博客存档
    • 交换机
    • wordpress
    • vue2
    • ubuntu
    • svn
    • sqlite
    • shell脚本
    • redis
    • rabbitmq
    • python-django
    • python
    • proxmox
    • prometheus
    • PostgreSQL
    • php
    • openvpn
    • openssl
    • nginx
    • nfs
    • nextcloud
    • mysql
    • mongo
    • linux
    • kvm
    • kubernetes
    • java
    • IOT物联网
    • httpd
    • GlusterFs
    • git/gitlab
    • freeswitch
    • fastdfs
    • ELK
    • docker
    • centos7
  • 页面
    • #1742(无标题)
  • 友链
      请到[后台->主题设置->友情链接]中设置。
Help?

Please contact us on our email for need any support

Support
    首页   ›   freeswitch   ›   正文
freeswitch

freeswitch保存录音自定义文件名称

2022-10-28 23:33:26
876  0 0

freeswitch保存录音自定义文件名称
通过拨号计划,自定义录音名称,并将录音保存到指定位置

环境

版本:freeswitch1.10.5
位置:/opt/freeswitch

1修改拨号计划


<!--call_out-->
<extension name="call_out">
    <condition field="destination_number" expression="^\d{8}|\d{10}|\d{11}|\d{12}|10009$"/>
    <condition field="caller_id_number" expression="^1\d{10}$">


        <action application="record_session" data="/data/recordings/${call_uuid}_${caller_id_number}_${destination_number}_${strftime(%Y%m%d%H%M%S)}.wav"/>
                          <!--record_session:录音保存位置,${}为获取的变量,分别为uuid、主叫、被叫、时间-->

        <action application="bridge" data="{absolute_codec_string='PCMA'}sofia/mobil/${destination_number}@127.0.0.1:62019"/>

        <action application="hangup"/>
    </condition>
</extension>


2优化

为避免磁盘io占用过高,将录音暂时放置在内存中,内存需要足够大

创建软连接
  ln -s /dev/shm/recordings/ /data/recordings

3重启freeswitch


4测试

呼叫一次,然后在/data/recordings下查看是否有新的录音文件
  #录音文件名称将会按照${call_uuid}_${caller_id_number}_${destination_number}_${strftime(%Y%m%d%H%M%S)}.wav格式命名
评论 (0)

点击这里取消回复。

欢迎您 游客  

Copyright © 2025 网站备案号 : 蜀ICP备2022017747号
smarty_hankin 主题. Designed by hankin
主页
页面
  • #1742(无标题)
博主
tang.show
tang.show 管理员
linux、centos、docker 、k8s、mysql等技术相关的总结文档
213 文章 2 评论 202089 浏览
测试
测试