14.3. Offer/answer processing

There are certain restrictions to when an offer or answer can be generated:

  • the client that received an offer cannot generate a new offer until it has responded with an answer to the offer or until it has rejected that offer;

  • the client that generated an offer cannot generate a new offer until it has received an answer to the original offer or until that original offer is rejected.

There is also a constraint on the number of m-lines an answer can have. The number of m-lines in an answer must equal the number of m-lines in the offer.

If multiple media streams of different types are present, this means that the offerer wishes to use these streams at the same time. Rejecting media can be achieved by setting the port in a media line to 0, but not by removing the media line because, as stated earlier, the number of m-lines in an answer must equal that in the offer.

If the offerer wishes to send (and/or receive) multiple streams of the same type at the same time, then it places multiple media streams of that type in an offer. Each stream may use different encoding.

The offerer sends media after receiving an answer (it cannot do so before it receives an answer since it does not know the IP address and port to which to direct media). It uses the media format listed in the answer and, typically, uses the first media format listed in the answer: it is recommended that formats appear in an SDP offer/answer in such an order that the most preferred appears at the ...

Get The IMS: IP Multimedia Concepts And Services, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.