[asterisk-users] PJSIP Codec Negotiation Issue

Joshua C. Colp jcolp at sangoma.com
Fri May 20 09:43:38 CDT 2022


On Fri, May 20, 2022 at 11:30 AM BenoƮt Panizzon <benoit.panizzon at imp.ch>
wrote:

> Hi Joshua
>
> > What is the specific issue that is happening? If it's that one call
> > leg negotiated at opus and the other at alaw, that is currently the
> > way things still work. Each call leg is still ultimately negotiated
> > independently so the A leg can be opus, and the B leg can be alaw. I
> > hope that we're able to eventually return to codec negotiation work
> > to improve that with the foundation put into place previously, but I
> > don't know when that will happen.
>
> It looks like I had some other misconfiguration also causing some weird
> effects.
>
> Well wheat I wonder is how codec negotiation should work in this
> situation.
>
> I am aware, the SDP defines what the device can send, not what it is
> able to receive. But can't we assume this is the same?
>
> Device A <=> Asterisk <=> TSP Trunk <=> [WORLD] <=> Device B
>
> Let's assume Device B is alaw only, but we don't know, it could also be
> possible of better quality codecs.
>
> Device A support opus,g711,alaw
>
> So towards Device A I would define !all,opus,g722,alaw
> And towards the TSP Trunk the same.
>
> But when Device B replies with an SDP containing 'only' alaw, shouldn't
> this SDP be passed to Device A which then hopefully use the same codec?
>

Asterisk isn't a SIP proxy, so there is no passing of SDP. Each call leg is
currently independent on the answer. So between Device A and Asterisk is
negotiated separately from Asterisk and Device B. Each side can end up
using different codecs, and Asterisk would transcode if possible.


>
> Of course Device A can receive alaw and send opus. But device B might
> not understand opus.
>
> And I just realized, this advanced codec negotiation is only available
> on Asterisk 18. I'm still on 16 :-)
>


-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20220520/00a6804e/attachment.html>


More information about the asterisk-users mailing list