VoIP glossary · Session Description Protocol
What is Codec negotiation (SDP)?
Codec negotiation is the exchange, carried in SDP (Session Description Protocol) inside SIP messages, where two endpoints agree which codec, IP address and port to use for a call’s audio.
Codec negotiation (SDP) explained
The caller includes an SDP "offer" in its INVITE, listing the codecs it supports in order of preference plus the address where it wants to receive audio. The answering side replies with an SDP "answer" choosing from that list. This offer/answer model is why codec order matters: most systems pick the first codec they both support.
The SDP also carries the media IP address, so it is often where NAT problems show up. If the c= line contains a private address like 192.168.1.20, the far end will send audio somewhere it cannot reach, and you will hear one-way or no audio.
Example