Search code examples
modelsiprfc

Offer/answer model in sip according to RFC3264


I have troubles to understand statements made in RFC3264 which specifies the offer/answer model used in SIP.

1st paragraph on Page 2, chapter 1 The answer has a matching media stream for each stream in the offer, indicating whether the stream is accepted or not..

So in answer each stream found in offer gets assigned a matching stream. This sounds like a copy, offer completely or in part is copied into answer. In my understanding matching stream must look like copy of stream. Further more cit.: "answer has that included". So a property is described which can have one single state. There is no single word in RFC's that statement about non-matching stream, nor about lack of stream in answer.

On another side one gets indication if stream is accepted or not. Here we have 2-states artifact.

I wonder how 1-state artifact can describe 2-states artifact.


Solution

  • By "media stream" it means some source of media like audio, video or something else. The answer have have supply multiple streams and and the answer must have a reply to each stream. The "basic" setup of a "media stream" is the "m=" line.

    You can see this in the examples in the RFC like this one:

    10.1 Basic Exchange
    
       Assume that the caller, Alice, has included the following description
       in her offer.  It includes a bidirectional audio stream and two
       bidirectional video streams, using H.261 (payload type 31) and MPEG
       (payload type 32).  The offered SDP is:
    
       v=0
       o=alice 2890844526 2890844526 IN IP4 host.anywhere.com
       s=
       c=IN IP4 host.anywhere.com
       t=0 0
       m=audio 49170 RTP/AVP 0
       a=rtpmap:0 PCMU/8000
       m=video 51372 RTP/AVP 31
       a=rtpmap:31 H261/90000
       m=video 53000 RTP/AVP 32
       a=rtpmap:32 MPV/90000
    
    
       The callee, Bob, does not want to receive or send the first video
       stream, so he returns the SDP below as the answer:
    
       v=0
       o=bob 2890844730 2890844730 IN IP4 host.example.com
       s=
       c=IN IP4 host.example.com
       t=0 0
       m=audio 49920 RTP/AVP 0
       a=rtpmap:0 PCMU/8000
       m=video 0 RTP/AVP 31
       m=video 53000 RTP/AVP 32
       a=rtpmap:32 MPV/90000
    

    You can see that the offer has three streams offered, 1 audio and 2 video as you can read from the "m=" lines.

    You can also see that the answer has three "m=" lines (in the same order). The "m=video 0 RTP/AVP 31" line in declining the video stream offer to be received because of the "0" part. No further lines are required.

    You can also see that the lines are not "copies" but actually setup of what that endpoint requirements for accepting that media stream. The only "copy" is the "m=xxx" order.