(Answer) (Category) SIP FAQ : (Category) SIP Protocol Operation :
Can I remove an m= line from SDP in response or re-INVITE?
No. Once an "m=" line made it into SDP of a request or response, it cannot be removed until the call is terminated. The only way to decline a media session is by setting its port number to 0. The only way to offer a new media session is by adding it to the end of the list.

The reason for this is that we need to ensure that it is always possible to match media sessions (i.e., "m=" lines) in requests and responses. Consider an INVITE with the following SDP:

 ...
 c=IN IP4 1.2.3.4
 m=audio 54678 RTP/AVP 0 1 3
 m=video 7346 RTP/AVP 28 31 (face)
 m=video 7880 RTP/AVP 26 28 (presentation)

If the response contained something like

 ...
 c=IN IP4 3.4.5.6
 m=audio 6540 RTP/AVP 0 1
 m=video 6578 RTP/AVP 28

the caller would not be able to tell which of the two offered video streams was accepted.

[Append to This Answer]
islepchin@dynamicsoft.com
2000-Jul-06 11:16pm
Previous: (Answer) Can a User Agent also act as a Registrar?
Next: (Answer) I'm a UAC. I sent an INVITE, and then decide I want to hang up before getting a final response. Do I send BYE or CANCEL?
This document is: http://www.cs.columbia.edu/~hgs/sip/faq.cgi?file=69
[Search] [Appearance]
This is a Faq-O-Matic 2.710.
This FAQ administered by Henning Schulzrinne