No audio one way - Asterisk uses disallowed codec, results in asymmetric codec

I have been using asterisk for about 10 years but just recently am getting calls with no audio one way.

Analysing with Wireshark shows that the problem calls aure using different codecs each way to the phone, g711U from the phone to asterisk and g711A from asterisk to the phone (in all cases the traffic to/from the upstreap VoIP provider is g711A in both directions).

The traffic from the phone to asterisk seems to follow the configuration in sip.conf where if I allow only ulaw then the phone sends g711U and if I allow only alaw then the phone sends g711A. The traffic from Asterisk to the phone is always g711A (what was received from the VoIP provider without transcoding) and does not seem to follow the allowed codecs. For the data in the other direction, when the phone is sending g711U to Asterisk, then Asterisk seems to have no issues transcoding it to g711A to send out to the VoIP provider.

The phone works fine in either g711A or g711U when calling the echo test application, but Wireshark shows the same codec in use in both directions.

So I have two questions…

  1. Is there any way to tell Asterisk to use the same codec in both directions? The phone (Yealink T22P) does not seem to handle different codecs being used, despite working fine with both codecs when used on their own.

  2. How to I disallow Asterisk using g711A and forcing g711U to a phone when the VoIP provider only uses g711A? I was under the impression that Asterisk should transparently transcode between the two.

*CLI> core show version
Asterisk 13.3.2 built by mockbuild @ on a x86_64 running Linux on 2015-06-17 01:30:46 UTC

ext*CLI> sip show peer 203

  • Name : 203
    Symmetric RTP: No
    Codecs : (ulaw)
    Useragent : Yealink SIP-T22P

From sip.conf…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.