SIP Codec Negotiation
Â
When an inbound SIP call is received, the IMG 2020 will negotiate what Codec to use when connecting the call. When negotiating a Codec selection the IMG 2020 must first know whether to use the Codec selections of the remote SIP gateway (Selections are in the SIP INVITE message) or to use the Codec selections from the local IMG 2020. Below is a screen capture of the SIP Profile Object Pane in the Web GUI. Note that either Local or Remote can be selected from a drop down menu in the Codec Priority Field.
Â
Codec Priority
Local: (Default) If Local is selected then the IMG 2020 will look at its own Codec Priority List under the IP Bearer Profile Object Pane and select from that list the highest priority Codec that matches a Codec from the list of Codecs in the SDP Offer message from the remote Gateway. (Overlap Condition) This will be the Codec used. This ensures the IMG 2020 or local end decides which codec to use.
Remote: If Remote is selected then the IMG 2020 will look at the incoming Codec Selections in the SDP Offer message from the remote gateway and match the highest priority Codec from that list with one of the selections from the IP Bearer Profile object pane in the Web GUI. This will ensure the remote end is deciding which Codec to use.
Example 1 |
Consider the following media list offering from a remote Gateway. Highest priority is #1
m=audio 5108 RTP/AVP 0 8 97Â If the SIP SDP Profile Object Pane has Local set in the Codec Priority field and the following Codecs below are configured under the IP Bearer Profiles Pane in ClientView(1 is highest priority) . The negotiated Codec would be G.723. G.711 alaw is the highest priority vocoder offered from the remote gateway, but the highest priority vocoder in the IMG 2020 list that is also offered from the remote side is G.723. The IMG 2020 will give preference to its ordered list of vocoders and will respond offering only G.723.
It is important to note that when the Codec Priority is set to Local the IMG 2020 gives priority to the list of codecs defined in the IP Bearer Profile object and does not respond with all vocoders in the overlap group. The overlap of vocoders includes G.711 alaw and G.723. |
Â
Example 2 |
Consider the following media list offering from the remote Gateway. Highest priority is #1
m=audio 5108 RTP/AVP 0 8 97Â If the SIP SDP Profile Object Pane has Remote set in the Codec Priority field and the following Codecs below are configured under the IP Bearer Profiles Pane in ClientView. (1 is highest priority) The negotiated Codec would be G.711 alaw. G.711 alaw is the highest priority vocoder offered from the remote gateway that overlaps with the Codec Priority List configured in the IMG 2020. The IMG 2020 will give preference to the remote Gateways ordered list of vocoders and will respond offering only G.711 alaw.
It is important to note the IMG 2020 gives priority to the list of codecs defined in the remote Gateways Codec Priority List which is sent in the INVITE message. The overlap of vocoders includes G.711 alaw and AMR. |
Payload Size Priority
Preferred Payload Size, Maximum Payload Size, Minimum Payload Size
The payload size is negotiated with the remote gateway but does not negotiate using an ordered list. Below explains how the payload size is negotiated.
If the remote gateway does not send a preferred payload size or the payload size sent is not valid or not within our Min/Max range the IMG 2020 will use its own preferred payload size for the transmitted RTP stream.
The IMG 2020 will include ptime for SDP Answers and for SDP Offers that include a single codec. When the IMG 2020 includes ptime in its SDP:
For SDP Offers, it will be based on the Preferred Payload Size.
For SDP Answers, it will depend on the setting for Ptime Source for SDP Answer. Refer to the SIP Profile (SGP) in SIP Profile - SGP.