当前位置:网站首页>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
边栏推荐
- API learning of OpenGL (2006) glclientactivetexture
- RN7302三相电量检测(基于STM32单片机)
- Freeswitch使用originate转dialplan
- Alibaba cloud SMS service (Complete Guide), SMS sending function implementation.
- Configure multiple database connections using the SSM framework
- Openharmony gnawing paper growth plan -- json-rpc
- Linked list (I) - remove linked list elements
- cocoapod中的第三方库怎么引用本地头文件
- Exception handling (I) -- null pointer and array index out of bounds
- Create a gson object that formats the time zone. JSON parsing time formatting zoneddatetime
猜你喜欢

What are the advantages of e-mail marketing? Why do sellers of shopline independent station attach so much importance to it?

Use of JDBC

Apple MDM Bypass 免越狱绕过MDM配置锁 免费
![[staff] arpeggio mark](/img/45/0ee0089b947b467344b247839893d7.jpg)
[staff] arpeggio mark

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance

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

【Paper Reading-3D Detection】Fully Convolutional One-Stage 3D Object Detection on LiDAR Range Images

socke.io長連接實現推送、版本控制、實時活躍用戶量統計

Freeswitch使用originate转dialplan

Uni app wechat applet sharing function
随机推荐
整型提昇和大小端字節序
FPGA - 7 Series FPGA selectio -07- iserdese2 of advanced logic resources
使用SSM框架,配置多个数据库连接
语音增强-频谱映射
[untitled]
Introduction to openscap
Idea automatically adds comments when creating classes
MySQL (II) - basic operation
JSP
FPGA - 7系列 FPGA SelectIO -07- 高级逻辑资源之ISERDESE2
socke.io長連接實現推送、版本控制、實時活躍用戶量統計
Example of MVVM framework based on kotlin+jetpack
Exception handling (I) -- null pointer and array index out of bounds
Some habits of it veterans in the workplace
Iframe switching in Web Automation
Linux Mysql 实现root用户不用密码登录
Deep learning 19 loss functions
MySQL common functions
Linked list (I) - remove linked list elements
How to open UMD, KMD log and dump diagrams in CAMX architecture