The source (first) leg includes the following Allowed Coders: G.711 and G.729.
The device selects the common coders, i.e., G.711 and G.729 (with changed preferred
coder priority - highest for G.711). In other words, it removes the coders that are not in the
Allowed Coders list and the order of priority is first according to the Allowed Coders list.
30.4.6 Coder Transcoding
The device can add coders, referred to as Extension coders to the SDP offer in the
outgoing leg.
For example, assume the following:
The incoming leg includes the following Allowed coders: G.711 and G.729.
1. The device selects the common coders, i.e., G.711 and G.729 (with changed
preferred coder priority - highest for G.711). In other words, it removes the coders that
are not in the Allowed coders list and the order of priority is first according to the
Allowed coders list.
2. Assuming that the outgoing leg also includes Allowed coders and/or Extension coders:
The device performs the Allowed coders procedure (common coders) between the
updated coder list and the outgoing leg's Allowed coders. The Extension coders
procedure is performed before Allowed coders.
3. Adding to the example, assume the following:
• For the outgoing leg, the device selects the common coders G.711 and G.729
(explained in the example above).
• Outgoing leg includes the Extended coder G.726.
• Outgoing leg includes the following Allowed coders: G.723, G.726, and G.729.
As a result, the device selects the common coders, i.e., G.729 and G.726 (coder
priority did not change Extension coder order).
If the Allowed coders policy on the SDP incoming leg returns an empty coders list, the
device rejects the call (SIP 488 or ACK and BYE). If both Extension coders and Allowed
coders policies on SDP (in this order) returns an empty coders list, the outgoing leg rejects
the call (SIP 488, or ACK and BYE).
Below is an example, assuming that Allowed Coders list (ordered) includes G711A-law
(PCMA), G729, and G711U-law (PCMU), and Extension Coder is G729.
1. SDP offer - original offer:
m=audio 6050 RTP/AVP 0 8 4 96
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=ptime:20
a=sendrecv
2. SDP offer - after manipulation:
m=audio 6010 RTP/AVP 8 0 96 18
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15