I wanted to check my understanding on this. Under Settings>Asterisk SIP settings, I had only G729 selected and under my trunk, (Automatically configured by the Metered SIP Trunking Module) only ULAW was selected. This configuration seemed to be working well for months, and then my customers stopped being able to make calls. Under Asterisk Log Files, i was getting a log that says:
NOTICE[27305] res_pjsip_sdp_rtp.c: No joint capabilities for ‘audio’ media stream between our configuration((g729)) and incoming SDP((ulaw|alaw))
Incoming calls worked correctly. I enabled ULAW under Settings>Asterisk SIP settings and outbound calls work now. Am I correct my previous config should have worked? Am I misunderstanding something? If there is any other context that would be helpful let me know.
While I don’t know what may have changed, it is very rare that g729 is of any use on a modern system and IMO you should just remove it from your config and call it a day.
g729 has noticeably inferior voice quality and also has issues passing DTMF. If you need a compression codec because the internet connection has very limited bandwidth (such as slow upstream on traditional DSL) or is metered and very expensive, you should be using Opus or another modern codec. In such a case, if the trunking provider doesn’t support a decent codec, consider running the PBX in the cloud, with Opus between extensions and PBX.
The “no joint capabilities” error occurs if Asterisk can’t transcode (because it’s not licensed for g729) and one endpoint requires it while the other doesn’t accept it.
One day Sangoma decided to unlock G729. I don’t know if this is still the case.
This happened when Asterisk 20 was released and there was no library to compile this alternate codec with the FreePBX 16 distrib.
BTW, you can test with Asterisk 18 and check if that works.