I’m seeing a weird behaviour on my Asterisk 15.3.0 with codec negotiation. Asterisk seems to prefer transcoding over selecting another codec.
My provider doesn’t allow transcoding ever. So either I use a codec they support or my call will be rejected. Depending on the destination they allow G722 for HD Calling or they don’t (depending on what the destination supports), I will only know that after the first INVITE.
In my pjsip config I have set for my phones and my providers endpoint:
disallow = all allow = g722,alaw,ulaw
My phones all support g722, so internally I am always using g722. When calling an external number the phone still always uses G722, even if the other end just supports ulaw. Asterisk does the transcoding in this case (which has a very negative effect on the performance), I would expect it to tell the phone to switch to ulaw (just like my provider seems to do it) if the other end doesn’t support G722 and only do transcoding if there is no common codec between the 2 parties.
Is this a configuration issue or is this maybe even the intended behaviour?