Hold Music Garbled

Hi everyone.

I’ve been working with Asterisk for over ten years. I have hundreds of installations all running beautifully but today something has stumped me. I’m testing the PJSIP library with the hope of writing my own SIP client. When I test the hold function exposed by the PJSUA2 library I could odd results. In some scenarios when the call is put on hold the remote party gets garbled music. When I investigate the Asterisk server it appears to be doing something very weird. It is looping the audio from the remote party back to the client whilst at the same time sending the hold music. The remote party then gets double the RTP packets and so it just sounds weird.

I’ve tested this on Asterisk builds from 13.18 through to 13.23 all do the same.

I’ve inspected the SIP packets from the client I can’t see anything unusual.

I tried turning the tracing all the way up and the only give away sign is that the RTP bridge engine drops a line saying it has been activated after the hold music starts. That should not happen.

Anyone got any ideas. Not sure if I should report this as a bug. Any help appreciated.

Are you using directmedia. This can happen if a directmedia source goes sendonly and continues to send media.

No directmedia was not in use.

After trying to fix this for about a week I moved to the PJSIP stack from the native SIP implementation. This resolved the problem. Not exactly a fix but considering the native SIP implementation is deprecated there is little point trying to investigate a fault further.

1 Like