I have found the following in asterisk doc.: “The 4 control points and their parameters are all configured on PJSIP endpoints. The control point parameters are named…
codec_prefs_incoming_offer
codec_prefs_outgoing_offer
codec_prefs_incoming_answer
codec_prefs_outgoing_answer …”
It seems that above 4 control points do not work in asterisk 18.1.0 and 19-rc1. I try these and result is the same - I compare SDPs under wireshark. Are there implemented in asterisk?
ok, tx, but my problem is to get direct media when two sip phones has the same codecs in the same order but, asterisk has reverse order and in such case I got the following results instead of direct media:
devive 1 has the following codecs: G.722; ulaw; alaw.
device 2 has the following codecs: G.722; ulaw; alaw.
asterisk endpoints has the following codes:
The provided screenshots show that Asterisk negotiated alaw (the preferred codec), ulaw, and g722 with 192.168.0.103. For the device at 192.168.0.100 only g722 (the preferred codec by it) was negotiated. Therefore one channel was using alaw and the other was using g722.
Yep, but for both devices (192.168.0.100 & 192.168.0.103) the preferred codec was g.722 as it was first on both devices codecs lists. The asterisk endpoints was preferred codec alaw.
And Asterisk will prefer its order by default, unless you play with some of the options - some of them will work, I don’t recall specifically for this. So as it is it is working as it should.
Why do not both sip phone devices use one codec: g.722 or alaw as each of these support these codecs, but now is used two codecs and asterisk is doing unnecessary transcoding?
(I have attached wireshark logs (pcapng) to JIRA, as here I can’t.)
What is a suggested option that should be used to achieve direct media in such case?
We offered multiple codecs to the phone on the outgoing leg, and it chose only g722. On the incoming leg you configured a preference of alaw, so that was used. Be more explicit in your codec ordering or try out the various ACN options that do exist (some do work and may help in this case). Functionality to forward back the answer codec on the outgoing leg to the incoming leg, however, is not present. Otherwise, things are working as expected.
I’m not going to look at the packet captures if they’re the same as the images and with same configuration. Based on those, what is happening is expected.