codec negotiation: add incoming_call_offer_prefs option

Add a new option, incoming_call_offer_pref, to res_pjsip endpoints that
specifies the preferred order of codecs after receiving an offer.

This patch does the following:

  Adds a new enumeration, ast_sip_call_codec_pref, used by the the new
configuration option that's added to the endpoint media structure.

  Adds a new ast_sip_session_caps structure that's set for each session media
object.

  Creates a new file, res_pjsip_session_caps that "implements" the new
structure and option, and is compiled into the res_pjsip_session library.

ASTERISK-28756 #close

Change-Id: I35e7a2a0c236cfb6bd9cdf89539f57a1ffefc76f
This commit is contained in:
Kevin Harwell
2020-02-24 12:47:46 -06:00
parent 87fda066ea
commit 06dada3f01
11 changed files with 484 additions and 20 deletions

View File

@@ -798,6 +798,16 @@
; "0" or not enabled)
;contact_user= ; On outgoing requests, force the user portion of the Contact
; header to this value (default: "")
;incoming_call_offer_pref= ; Sets the preferred codecs, and order to use between
; those received in the offer, and those set in this
; configuration's allow line. Valid values include:
;
; local - prefer and order by configuration (default).
; local_single - prefer and order by configuration,
; but only choose 'top' most codec
; remote - prefer and order by incoming sdp.
; remote_single - prefer and order by incoming sdp,
; but only choose 'top' most codec
;preferred_codec_only=yes ; Respond to a SIP invite with the single most preferred codec
; rather than advertising all joint codec capabilities. This
; limits the other side's codec choice to exactly what we prefer.