asterisk / asterisk

The official Asterisk Project repository.
https://www.asterisk.org
Other
2.23k stars 975 forks source link

[new-feature]: Advanced Codec Negotiation #223

Open maximilianfridrich opened 1 year ago

maximilianfridrich commented 1 year ago

Feature Description

This feature has long been talked about and a lot of excellent work to prepare this feature has been done by @gtjoseph (e.g. 8d1064eaafe899044adbd30a40cdaa15c315c463, 647c53c41fa36ab8e5b3e8824952aea01c76e37e, 9bd1d686a120db5233acb2d6f90c31d4f52464a0).

The pjsip configuration options for endpoints exist, what's left is implementing the functionality.

References:

I have a working patch + testsuite test cases. Feel free to assign this issue to me.

maximilianfridrich commented 1 year ago

I might have jumped the gun a bit. It looks like I broke the all_codecs_on_empty_reinvite feature in the late-offer case. I will look into that, I can't submit the patch yet.

maximilianfridrich commented 1 year ago

Update: all_codecs_on_empty_reinvite is fixed and of the ~400 pjsip test cases there are only about 5 left that are not green yet (we have added about 20 additional ones).

Currently I am struggling with things like ptime (aka framing) which is set in ast_format_cap, format_cap_framed and also in ast_rtp_codecs. The framing information gets lost when ast_format_cap_append (or a similar cap appending function) is called and then the value in ast_rtp_codecs might be used anyways. This part of the code is quite hard to comprehend.