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)
相关推荐
ftpeak1 天前
从零开始使用 axum-server 构建 HTTP/HTTPS 服务
网络·http·https·rust·web·web app
weixin_456904271 天前
使用HTTPS 服务在浏览器端使用摄像头的方式解析
网络协议·http·https
拷贝码农卡卡东2 天前
pre-commit run --all-files 报错:http.client.RemoteDisconnected
网络·网络协议·http
又菜又爱玩呜呜呜~2 天前
go使用反射获取http.Request参数到结构体
开发语言·http·golang
cellurw2 天前
Linux下C语言实现HTTP+SQLite3电子元器件查询系统
linux·c语言·http
希望20172 天前
Golang | http/server & Gin框架简述
http·golang·gin
全栈技术负责人2 天前
前端网络性能优化实践:从 HTTP 请求到 HTTPS 与 HTTP/2 升级
前端·网络·http
Whisper_Yu2 天前
计算机网络(一)基础概念
计算机网络·http·https·信息与通信
emojiwoo2 天前
HTTP 状态码背后的逻辑:从请求到响应的完整流程解析(含完整流程图)
网络·网络协议·http
娅娅梨2 天前
HarmonyOS-ArkUI Web控件基础铺垫7-HTTP SSL认证图解 及 Charles抓包原理 及您为什么配置对了也抓不到数据
http·华为·ssl·harmonyos