I have a serious codec problem.
This is my setup :
Asterisk 22.214.171.124 (on Ubuntu)
2 users behind different NATs: USER_A and USER_B
USER_A (PAP2T) supports the following codecs : G729, G711
USER_B (X-Lite) supports the following codec : G711
sip.conf config for both users
When USER_B calls USER_A, everything works fine, the codec selected being G711.
When USER_A calls USER_B, Asterisk forces the call with G729 codec => USER_B’s x-lite rings, but call cannot be answered because x-lite doesn’t recognize G729. Asterisk seems to ignore the destination user’s codec and doesn’t negotiate codec.
Calls between users supporting the same codecs are obviously working well.
I cannot set canreinvite=yes nor directrtpsetup=yes since they don’t work with NAT.
I cannot set only G711 codec for USER_B in sip.conf because it may login from another device supporting G729.
There is a patch for codec negotiation problems for the 1.4 version : b2bua.org/wiki/AsteriskCodecNegotiationPatch
But I cannot find a patch for the 1.8 version.
It seems the problem is still present since several years now, and Asterisk’s developers still didn’t solve the issue.
Any thoughts? Anyone with similar setup?