当前位置:网站首页>Freeswitch uses Mod_ Shot module plays mp3
Freeswitch uses Mod_ Shot module plays mp3
2022-06-28 06:23:00 【Be realistic】

summary
freeswitch In the face of VOIP Voice call , Can pass playback Command play IVR Voice files .
By default ,freeswitch Support wav file , You can also play directly VOIP Common codec in G711 file 、G729 Documents, etc. , But yes. mp3 Is not supported .
By inquiring freeswitch Official documents of , Find out mod_shout The module can support MP3 File playback .
mod_shout Modules are not installed by default , You can decide whether to compile and install according to your needs .
Environmental Science
centos:CentOS release 7.0 (Final) Or above
freeswitch:v1.6.19
GCC:4.8.5
rely on
mod_shout Module installation requires third-party library support ,centos Of yum Please refer to the document for the source setting method “freeswitch Bring their own yum Source configuration mode ”.
sudo yum install libshout-devel lame-devel libmpg123-devel
install
go back to freeswitch Source root , To regenerate the makefile.
./bootstrap.sh -j
./configure
Compilation and installation mod_shout modular
cd src/mod/formats/mod_shout/
make
sudo make install
ll /usr/local/freeswitch/mod/mod_shout*
-rwxr-xr-x. 1 root root 1322 May 19 11:43 /usr/local/freeswitch/mod/mod_shout.la
-rwxr-xr-x. 1 root root 168560 May 19 11:43 /usr/local/freeswitch/mod/mod_shout.so
To configure
mod_shout After the module is installed , modify fs Configuration of .
Upload MP3 Playback file .
ll /usr/local/freeswitch/sounds/101-baidu-mp3.mp3
-rw-r--r--. 1 root root 12096 May 17 17:55 /usr/local/freeswitch/sounds/101-baidu-mp3.mp3
modify /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml file .
<load module="mod_shout"/>
modify /usr/local/freeswitch/conf/dialplan/test.xml file .
<include>
<context name="default">
<extension name="test" continue="false">
<condition field="destination_number" expression="^(\d+)$">
<action application="answer"/>
<action application="playback" data="/usr/local/freeswitch/sounds/101-baidu-mp3.mp3"/>
<action application="hangup" data="CALL_REJECTED"/>
</condition>
</extension>
</context>
</include>
After configuration , start-up freeswitch, And confirm mod_shout The module starts normally .
[email protected]> module_exists mod_shout
true
test
Use eyebeam register 1001 Account to fs, And initiate a call to 1002,1001 You can hear fs Of IVR Playback .
When we don't load mod_shout Module time , The log is as follows .
EXECUTE sofia/internal/[email protected] playback(/usr/local/freeswitch/sounds/101-baidu-mp3.mp3)
2022-05-19 13:49:55.573314 [ERR] switch_core_file.c:272 Invalid file format [mp3] for [/usr/local/freeswitch/sounds/101-baidu-mp3.mp3]!
EXECUTE sofia/internal/[email protected] hangup(CALL_REJECTED)
Reload mod_shout modular , And initiate a call , Check the log below .
EXECUTE sofia/internal/[email protected] playback(/usr/local/freeswitch/sounds/101-baidu-mp3.mp3)
2022-05-19 11:57:20.393239 [DEBUG] switch_ivr_play_say.c:1498 Codec Activated [email protected] 1 channels 20ms
2022-05-19 11:57:20.473273 [DEBUG] switch_rtp.c:7273 Correct audio ip/port confirmed.
2022-05-19 11:57:20.613239 [DEBUG] sofia.c:7084 Channel sofia/internal/[email protected] entering state [ready][200]
2022-05-19 11:57:26.433297 [DEBUG] switch_ivr_play_say.c:1942 done playing file /usr/local/freeswitch/sounds/101-baidu-mp3.mp3
EXECUTE sofia/internal/[email protected] hangup(CALL_REJECTED)
summary
MP3 The file is a compressed format , More than usual wav(pcm) Small 8 About times , It has great advantages in space occupation and transmission bandwidth .
We should have more different tools , Choose the most appropriate solution in different application scenarios .
Empty as usual
Be serious
边栏推荐
- 手把手教你用Ucos
- ROS rviz_ Satellite function package visualizes GNSS track and uses satellite map
- 【Paper Reading-3D Detection】Fully Convolutional One-Stage 3D Object Detection on LiDAR Range Images
- Linked list (III) - reverse linked list
- Introduction to openscap
- What is the e-commerce conversion rate so abstract?
- mysql常用函数
- FPGA - 7 Series FPGA selectio -07- iserdese2 of advanced logic resources
- Scripting and programming languages
- MySQL (II) - basic operation
猜你喜欢

AutoCAD C# 多段线小锐角检测

eyebeam高级设置

Freeswitch使用originate转dialplan

YYGH-BUG-02

链表(二)——设计链表

Boost the rising point | yolov5 combined with alpha IOU

借助nz-pagination中的let-total解析ng-template

Drop down list processing in Web Automation

Oracle fundamentals summary

D3D11_ Chili_ Tutorial (3): design a bindable/drawable system
随机推荐
Some habits of it veterans in the workplace
idea根据数据库表生成实体类
Shell script one click deployment (MySQL)
Teach you how to use UCOS
MySQL(一)——安装
慢内容广告:品牌增长的长线主义
fpm工具安装
JSP
@The reason why the Autowired annotation is empty
不会还有人只会用forEach遍历数组吧?
death_ satan/hyperf-validate
API learning of OpenGL (2006) glclientactivetexture
Configure multiple database connections using the SSM framework
Freeswitch使用originate转dialplan
【Paper Reading-3D Detection】Fully Convolutional One-Stage 3D Object Detection on LiDAR Range Images
Alibaba cloud SMS service (Complete Guide), SMS sending function implementation.
The custom cube UI pop-up dialog supports multiple and multiple types of input boxes
Promotion intégrale et ordre des octets de fin de taille
链表(三)——反转链表
AttributeError: 'callable_iterator' object has no attribute 'next'