SDP application in the SIP protocol and SDPSIP Application
The SDP is used to construct the message bodies of INVITE, 200OK, and ACK messages for the master and called users to exchange media information.
1. Media Stream Configuration
(1) The description of the primary called media must correspond to the nth media stream (m =) of the primary called, and both contain a = rtpmap. this aims to adapt to the conversion from static Net Load types to dynamic Net Load types.
(2) If the callee does not want to receive a media stream proposed by the caller, set the port number of the media stream to 0 in the response and the corresponding media popularity must be returned.
2. Setting unicast SDP values
(1) only send a media stream. The port number is meaningless. It should be set to 0.
(2) The net load type example table of each media stream should transmit two messages: acceptable/sent compilation codes and RTP net load type numbers used to identify these compilation codes.
(3) For a media stream, the master/called does not have a public media format. The called still requires that the m = row of the returned media stream be returned, and the port should be 0. At the same time, no column of Net Load type.
(4) If all media streams do not have a public media format, the called back sends a 415 response (media type not supported) and adds the 304 warning header field (media type not supported ).
3. multicast operations
(1) The accepted and sent multicast addresses are the same.
(2) called media streams cannot be changed only by sending, only receiving, or receiving/sending.
(3) If the called table does not support multicasting, the system will send a 400 response and a 330 warning (Multicast unavailable ).
4. Delayed media streams
Since the caller may actually be a gateway that is similar to other protocols (such as H.323), the caller needs to establish a call and then negotiate with the media. The caller can first send an INVITE without SDP, use ACK to carry SDP or resend an INVITE request to modify the called Session Description (SDP ).
5. Media Stream persistence
If you require the recipient to enter the HOLD state, that is, to temporarily stop sending one or more media streams, you can use the Re-INVITE request to carry SDP. The description is the same as that described in the original request or response, only "c = 0.0.0.0", and Cseq in Re_INVITE increases progressively.
6. There are three entity fields in the SIP
(1) Content-Type: indicates the message body Type. For example, application/SDP indicates the SDP Session Description.
(2) Content-Encoding: Describes the message body type, allowing you to edit the message body using compression Encoding.
(3) Content-Length: the number of bytes of the message body.