Conditional Codec Lists

Conditional codec policies are constructed using existing ACLI configuration commands — allow-codecs, add-codecs-on-egress, and order-codecs — in conjunction with keywords and operators. Conditions are defined by a continuous character string (no spaces allowed) that starts with the :( character sequence and is terminated by a closing parenthesis. For example,

ORACLE(codec-policy)# allow-codecs PCMU:(!G729)

which can be interpreted as — allow PCMU if the G729 codec is not in the SDP offer after ingress codec policy processing.

An example of using add-codecs-on-egress is:

ORACLE(codec-policy)# add-codecs-on-egress PCMU:(PCMA)

which can be interpreted as — add PCMU if PCMA codec is in the SDP offer after ingress codec policy processing.

If PCMA is in the SDP offer after ingress codec policy processing, the add-codecs-on-egress ACLI command is treated as add-codecs-on-egress PCMU. If PCMA is not in the SDP offer after ingress codec policy processing, add-codecs-on-egress is treated as empty.

Both the conditioned codec and/or the condition itself can contain subnames. For example,

ORACLE(codec-policy)# add-codecs-on-egress AMR::ONE:(AMR::TEST0)

which can be interpreted as — add AMR::ONE if AMR::TEST0 codec is in the SDP offer after ingress codec policy processing.

Codecs contained in the condition can be wildcarded. For example,

ORACLE(codec-policy)# add-codecs-on-egress AMR::ONE:(AMR::*)

which can be interpreted as — add AMR::ONE if any AMR codec is in the offer after ingress codec policy processing.

An example of using order-codecs is:

ORACLE(codec-policy)# order-codecs (PCMU:(PCMU) *)

which can be interpreted as — set the codec order to PCMU followed by the list after ingress codec policy processing if PCMU is not present. When the system adds a codec, the codec goes to the end of the offered list. This conditional format may be used to place an added codec at the front of list.