choppy audio when using play_media

8 views
Skip to first unread message

AC

unread,
Oct 23, 2025, 2:45:39 PM (10 days ago) Oct 23
to Sipwise rtpengine
Hello,

I'm just trying to determine when injecting media during an active call, why the playback of the audio is choppy. Before and after the playback, audio is fine.

What's being used:
Kamailio v-5.8.6
rtpengine v-13.4.1.8

Call flow:
Softphone (a/b) <--> Kamailio/rtpengine <--> Freeswitch
* Softphone A sends call to kamailio, kamailio forwards it to fs, and fs sends call back to kamailio, kamailio forwards request to softphone B.

When placing a call, audio quality is fine throughout. When injecting audio into the active call via 'play_media("file://path/to/wav/file")', the playback is choppy ( at the moment I'm only injecting the audio between the softphone A and Kamailio, so the A-leg side of the call). The Wav file is encoded with pcmu, 8000hz mono/ using audacity. I've also used ffmpeg as well, with the same results. Tested a 8000hz sample sound file from freeswitch's sound/ as well as forcing PCMU/PCMA as the codec during calls, with the same results. During the test call, CPU usage is barely anything.

What would be a good next step to determining on what's causing the playback of the injected audio? Anything that I should be looking out for, in my rtpengine logs?

Thank you.

Richard Fuchs

unread,
Oct 31, 2025, 8:36:53 AM (2 days ago) Oct 31
to rtpe...@googlegroups.com
On 23/10/2025 14.45, AC wrote:
> What would be a good next step to determining on what's causing the
> playback of the injected audio? Anything that I should be looking out
> for, in my rtpengine logs?

Typically I would capture the RTP with Wireshark and use its RTP
analyser to see if there are any obvious problems.

A common mistake is usage of "play media" that results in an additional
outgoing RTP stream towards the destination when another RTP stream (the
one relayed from the other call leg) already exists. RTP clients
typically don't handle this well. If this is your issue, then you need
to think about what you want to do with the media that's being played by
rtpengine with respect to the media that already exists towards the
destination.

Cheers

Reply all
Reply to author
Forward
0 new messages