PJSIP sdp missing CN

Hi all,

Our current setup is running 18.16.0 and pjsip with alaw+ulaw codecs.

Not too long ago we added to the endpoints an rtp_keepalive of 4 which helped resolve some issues of silence and it worked very well to add CN.

However we are getting issues still where calls do drop when silent and sending out to the PSTN. We contacted this particular provider who said the reason is whilst CN packets are generated they are effectively ignored because we have not negotiated CN.

Checking the sdp we can see that whilst others add the following line it is not added from the PBX a=rtpmap:13 CN/8000 which is comfort noise for ulaw+alaw at 8000hz.

From the rfc spec 5.1 it does appear to be mandatory for use of CN with 8000hz:

Having looked through various posts and the documentation I cannot see anything related to getting this line added in the sdp. Other options we are thinking about include, though none are preferable:

  • Use our proxy to manually add this line
  • Pick a different codec
  • Upgrade (but can’t see any notes about this issue)
  • Find a way to add the line in Asterisk dialplan or similar (however not editing the codebase)

From what I gather this is more pjsip than Asterisk. Is there anything we are missing here, or is it something that pjsip offers but has not been exposed to Asterisk?

Many thanks!

It’s not really PJSIP. Asterisk is responsible for constructing the SDP and placing it in. To the best of my knowledge chan_sip never added it, and chan_pjsip therefore didn’t have support added to do so.

Adding it would require code modifications to the SDP generation.

Thanks for confirming this; will have a think then how to best deal with it for now.
Is it worth us adding to the git feature requests since it is required in the spec?

If you like, as always there is no guarantee anyone will do anything with it though.

1 Like

I can’t see anything in that RFC that mandates the use of comfort noise, or even mandates the inclusion of an rtpmap line for payload type 13. (I also cannot find anything that mandates the use of type 13, for 8kHz comfort noise. The only thing that would be mandated would be not using type 13 for anything else.)

Hi David, thanks, yeh re-reading this you’re right there is no mandate only “implies”, which is likely why we have only observed the issue on this particular carrier (Gamma); and perhaps only recently so maybe they changed something.

We will relay this to them, unfortunately though we require CN and they are going to put their foot down. We have decided in the short term to inject the sdp in our proxy.