Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


At each position Asterisk creates a joint list of codecs for use. A joint list being the intersection of a given "remote", and "local" set of codecs ordered by a preference defined using a configuration option. A "local" set is a list of codecs intrinsic at, not given to, a particular point. "local" lists are instantiated either from configuration definitions (i.e. allow=), or from the in-memory joint list created during one of the earlier stages. Here is a basic diagram of Alice calling Bob that illustrates where those control points exist in the call process:


In order to allow user control of codec order at those positions Asterisk defines the following PJSIP endpoint options:


  1. PJSIP_INCOMING_CALL_OFFER - Dialplan function to set, and override the incoming negotiated codecs
  2. PJSIP_OUTGOING_CALL_OFFER  - Dialplan function to set, and override the outgoing negotiated codecs
  3. PJSIP_OUTGOING_CALL_ANSWER  - Dialplan function to set, and override the received negotiated codecs
  4. PJSIP_INCOMING_CALL_ANSWER  - Dialplan function to set, and override the codecs sent in an answer

While technically these functions could be set prior to dialing, it would be ideal to implement interception routines to facilitate setting these values at the appropriate points. As well a read only variable will be added that someone can use to get the list of codecs given by the remote device/phone: