freeswitch 播放远程文件的流程

freeswitch中既可以播放本地文件,也可以播放远程文件,如

loop_playback(+1 https://xxxxxx/filename.wav)

即文件名以https:// 或者 http:// 开头。

流程图如下:

如何根据文件找对应的open回调函数呢:

用命令:show interfaces

file,wav,mod_sndfile wav的接口在mod_sndfile中。

file,http,mod_httapi http在mod_httapi 中

file,https,mod_httapi https在mod_httapi 中

file,mp3,mod_shout mp3在mod_shout中

总结:播放远程文件时,是先用curl下载到本地一个缓存文件中,再来播放。

如果缓存文件已经存在,就不需要再次下载了。

容易出的问题:

如果这个要下载的文件很大,或者网络不好,那么下载这个文件要很久,就会导致播放失败。

重要的日志:(出错的时候)

cpp 复制代码
loop_playback(+2 https://file/xxxx.wav)
[WARNING] mod_sndfile.c:281 Error Opening File [xxx/storage/http_file_cache/fcache1.wav] [System error : No such file or directory.]
[ERR] mod_httapi.c:3022 Invalid cache file xxx/storage/http_file_cache/fcache1.wav opening url wav Discarding file.

隔了26秒后才打印这个:
[DEBUG] mod_httapi.c:2666 caching: url:https://file/xxxx.wav to xxx/storage/http_file_cache/fcache1.wav (xxx bytes)
相关推荐
2501_9151063213 小时前
iOS性能调优实战:借助克魔(KeyMob)与常用工具深度洞察App瓶颈
websocket·网络协议·tcp/ip·http·网络安全·https·udp
还是鼠鼠17 小时前
HTTP 请求协议简单介绍
java·开发语言·网络·网络协议·http
糯米导航17 小时前
ava多线程实现HTTP断点续传:原理、设计与代码实现
windows·http·iphone
chxii21 小时前
1.6 http模块nodejs 对比 go
http·node.js
阿蒙Amon1 天前
C#封装HttpClient:HTTP请求处理最佳实践
开发语言·http·c#
不像程序员的程序媛1 天前
http接口莫名奇妙返回body空白
网络·网络协议·http
belldeep1 天前
C++:用 libcurl 发送一封带有附件的邮件
c++·curl·send·email·smpt
栗子叶2 天前
两种Https正向代理的实现原理
网络协议·http·https·正向代理
玩转4G物联网3 天前
零基础玩转物联网-串口转以太网模块如何快速实现与TCP服务器通信
服务器·网络·物联网·网络协议·tcp/ip·http·fs100p
hie988943 天前
HTTP常见的请求方法、响应状态码、接口规范介绍
http