Author Topic: yate always chooses alaw codec, although other codecs preferred  (Read 4446 times)

Barney

  • Newbie
  • *
  • Posts: 14
    • View Profile
yate always chooses alaw codec, although other codecs preferred
« on: October 30, 2018, 05:10:15 AM »
I have two IP-phones (both GigaSet C430A GO), which use yate as registrar. Both phones support the following codecs: g729, g726, g722, alaw, µlaw. Both are configured to use g729 with highest and µlaw with lowest priority.

What I expect: yate creates a connection between both phones with g729 codec. But yate 5.5 establishes a connection with alaw codec. Why?

I would like yate to choose the codec with the highest possible priority. How can I achieve this goal?

My yate configuration is essentially standard installation with the exception of regfile.conf, accfile.conf and regexroute.conf.

Barney

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: yate always chooses alaw codec, although other codecs preferred
« Reply #1 on: November 02, 2018, 01:20:30 AM »
There may be changes in choosing the preferred codec.
You may disable alaw/mulaw codecs.
If the phones are in your network you may enabled rtp/sdp forward and let the phones deal with media negotiation.

Barney

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: yate always chooses alaw codec, although other codecs preferred
« Reply #2 on: November 05, 2018, 08:00:53 AM »
According to your proposal I added the following line in ysipchan.conf (section [general]):

Code: [Select]
forward_sdp=yes
But that was not enough to achieve media negotiation between the end devices. According to some other yate docs I added the following line in regexroute.conf (section [default]):

Code: [Select]
${rtp_forward}possible=;rtp_forward=yes
Now I can see in the logs (with sniffer on) that the value of ${rtp_forward} changes from 'possible' to 'yes' and then to 'accepted' from both devices.

Based on these log entries I suppose that all SDP data is directly exchanged between the end devices. So Yate transfers the SDP data just from one party to the other without caring about the content of this data, specially what codecs are used. Is this correct?

If yes, how can I see the result of the media negotiation, specially on which codec both sides agreed.


marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: yate always chooses alaw codec, although other codecs preferred
« Reply #3 on: November 05, 2018, 08:06:03 AM »
Yes, Yate just relay SDP between devices.

You can't see negotiated (used) codec: RTP is not handled by Yate.
You may take a look at SIP signaling and assume the first codec in response (1xx with media and/or 200 OK) will be the used codec.