📜  sip sdp (1)

📅  最后修改于: 2023-12-03 14:47:27.843000             🧑  作者: Mango

SIP SDP

SIP SDP stands for Session Description Protocol in Session Initiation Protocol. SIP protocol is used for establishing, maintaining, and terminating a session on the Internet whereas SDP is used to describe multimedia communication sessions for the purposes of session initialization, negotiation, and modification.

What is SIP?

SIP is a protocol used for initiating, maintaining, and terminating real-time sessions that involve video, voice, messaging, and other communication applications and services between two or more endpoints on IP networks. It provides a way to establish, modify, and terminate sessions that involve several participants. SIP is able to work with other protocols, including HTTP, SMTP, and others.

What is SDP?

SDP is a protocol for transmitting multimedia session descriptions over the Internet. It describes the media and parameters of a media stream for a session. It is used to negotiate the capabilities of endpoints via SIP. SDP defines the message format used to initiate, negotiate, and modify multimedia sessions. It specifies session-level information for audio, video, and data streams and defines how the different streams are multiplexed onto transport protocols such as UDP, TCP, and RTP.

Examples
Sample SDP
v=0
o=- 1668932140268919 1 IN IP4 127.0.0.1
s=SDP tutorial
t=0 0
a=group:BUNDLE audio video
m=audio 16304 RTP/AVP 0
c=IN IP4 192.168.100.100
a=rtcp:16305 IN IP4 192.168.100.100
a=rtpmap:0 PCMU/8000
a=sendrecv
m=video 19302 RTP/AVP 97
c=IN IP4 192.168.100.100
a=rtcp:19303 IN IP4 192.168.100.100
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42e01f;packetization-mode=1
a=sendrecv
Example usage in SIP
INVITE sip:sip.example.com SIP/2.0
Via: SIP/2.0/TCP pc33.atlanta.example.com;branch=z9hG4bK776asdhds
Max-Forwards: 70
To: Bob <sip:bob@example.com>
From: Alice <sip:alice@example.com>;tag=1928301774
Call-ID: a84b4c76e66710@pc33.atlanta.example.com
CSeq: 314159 INVITE
Contact: <sip:alice@pc33.atlanta.example.com>
Content-Type: application/sdp
Content-Length: 142
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO

v=0
o=alice 2890844526 2890844526 IN IP4 pc33.atlanta.example.com
s=-
c=IN IP4 pc33.atlanta.example.com
t=0 0
m=audio 49170 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
Conclusion

SIP SDP are essential protocols for establishing and maintaining multimedia sessions between endpoints on IP networks. The protocols define session-level information for audio, video, and data streams and specify how the different streams are multiplexed onto transport protocols such as UDP, TCP, and RTP. The use of SIP SDP enables negotiation of capabilities between endpoints and efficient transfer of multimedia data.