Asterisk 录音可以用monitor,mixmonitor 两个app.区别是 monitor录单通道,mixmonitor 录双通道,
过程:调用monitor时指定录音文件名字,格式,挂载到channel中,到双方接续开始时 调用ast_read 读取 rtp 流, 如果协议栈支持 回调,则调用协议栈提供的read函数, 如sip. sip_read函数,sip_read内部 调用 rtp 接口函数,sip_rtp_read,sip_rtp_read又调用rtp 引擎函数 ast_rtp_read ,ast_rtcp_read,接收帧数据,ast_rtp_read 函数 则调用 recvfrom udp sockt 函数读取udp包并解析挂在到channel的rtp 结构中。
最后,__ast_read函数调用 ast_writestream把帧数据写到录音文件中,,,结束。。
本文介绍了Asterisk中两种录音方式:monitor和mixmonitor的区别及录音流程。monitor用于录制单通道,而mixmonitor用于录制双通道。文章详细阐述了从调用录音命令到将音频数据写入文件的整个过程。
1072

被折叠的 条评论
为什么被折叠?



