sipwise / rtpengine

The Sipwise media proxy for Kamailio
GNU General Public License v3.0
786 stars 369 forks source link

rtpengine recording and rtp huge delta from IVR and comfort noise decoding possible option #1370

Open ivlovric opened 3 years ago

ivlovric commented 3 years ago

Hi,

We are using rtpengine recording service intensively and stumbled to one case recently when there is IVR on one end with couple of messages separated by fair amount of time. RTP packets delta between those IVR messages is visible in RTP stream but when rtpengine recording service records it, outcome is concatenated recorded file from IVR side, without huge rtp delay being counted in. Example of rtp analysis IVR-rtpdelta .

We tried to overcome this by generating CN(comfort noise) and hoping for rtpengine to somehow generate empty packets when CN is being sent in RTP and then further on to rtpengine recording daemon, but we can not get recorded file to be saved correctly, eg. file/recording from IVR side is concatenated instead Question is also, does rtpengine recording daemon part understand CN, because we got an warning from that deamon?

Oct 4 10:31:20 v4-io-rec-c-1 rtpengine-recording[7061]: WARNING: [C 3e6db629d64d7d6979dd36ccad61d6ad%4010.116.118.220-5ef1d1f4f853dcce.meta] [S tag-1-media-1-component-1-RTP-id-0] [0x7f8122be] [core] Cannot decode RTP payload type 13 (CN/8000)

CN is fully supported in rtpengine and version we use is mr9.5.2.1 from 13 days ago:

Screenshot 2021-10-04 at 19 10 35

Any advice is appreciated, Thanks and regards

rfuchs commented 3 years ago

Decoding of supplemental payload types (e.g. DTMF and CN) is explicitly disabled in the recording daemon, primarily because supporting them would require extra bookkeeping in the code, which hasn't been implemented yet. You can try removing the if (def->supplemental ... clause in decoder_new() and see what happens. Maybe it just works.

RTP gaps are taking into account only by the "mixed" output format, which fills in these gaps with silence audio. All other output formats ignore gaps or timestamp discontinuities and simply decode the media that has been received.