What Is the Session Initiation Protocol?
The session initiation protocol SIP, using H.323 recommendations, can make various products interoperable. It has been adopted by some manufacturers. However, H.323 recommendations are too complicated, so the IETF has formulated another relatively simple standard, namely the Session Initiation Protocol (SIP), which uses many HTTP headers, encoding rules, and some authentication mechanisms. The RTP and RTCP protocols combine to provide services similar to H.323, and have stronger scalability.
- The session initiation protocol SIP, using H.323 recommendations, can make various products interoperable. It has been adopted by some manufacturers. However, H.323 recommendations are too complicated, so the IETF has formulated another relatively simple standard, namely the Session Initiation Protocol (SIP), which uses many HTTP headers, encoding rules, and some authentication mechanisms. The RTP and RTCP protocols combine to provide services similar to H.323, and have stronger scalability.
1 Session Initiation Protocol SIP overview
- SIP (Session Initiation Protocol, Session Initiation Protocol) is an IP telephone signaling protocol proposed by the IETF. SIP is used to initiate a session. It can control the establishment and termination of multimedia sessions attended by multiple participants, and can dynamically adjust and modify session attributes, such as session bandwidth requirements, the type of media (voice, video, and data) transmitted, and media Codec format, support for multicast and unicast, etc.
2 1. Session Initiation Protocol Features of SIP
- (1) Protocol format: SIP borrows the design ideas and architecture of Hypertext Transfer Protocol (HTTP), uses many HTTP message types and header fields, uses entities (description of content types) to identify the content of the information flow, and considers Authentication and authorization. The authentication and authorization methods used are similar to the authentication and authorization methods used in the Web. H.323 uses a binary method based on ASN.1 and compression coding rules to represent its messages. Therefore, SIP is easier to read and debug.
- (2) Scalability of the protocol: SIP has fully considered the expansion adaptability of other protocols in the design, and supports many types of address description and addressing, including username @ host address, called number @ PSTN gateway address, and such as Tel: 020-62581234, such as the description of ordinary telephone numbers. In this way, the SIP caller can identify whether the called party is on the PSTN according to the called address, and then initiate and establish a call to the called party through a gateway connected to the PSTN.
- (3) User positioning: The most powerful feature of SIP is to implement the user positioning function through a uniform resource locator (URL). SIP URLs can even be embedded in Web pages or other hypertext links. Users can place a call with just a click of a mouse, which makes it easy to integrate audio and video applications with other multimedia applications. In addition, SIP itself has a function of registering with a registration server, and it can also use other positioning servers such as DNS, LDAP and other positioning servers to enhance its positioning function.
- (4) Call establishment: The SIP session request process and the media negotiation process are performed together, so the call establishment time is short, while in H.323, the call establishment process and the signaling control process for media parameter negotiation are performed separately. . This fast call establishment mechanism can be obtained by comparing the number of messages. Before H.323 establishes a media channel, it needs to establish H.225 initialization messages, H.245 control channels, and related confirmation messages. The control protocol is very complicated. The efficiency of establishing a media channel using SIP is very high-the media channel from the called party to the calling party can be established in one round trip, and the called media channel can be established within one and a half round trip time.
- (5) Expansion of supplementary functions: H.323 defines special protocols for implementing supplementary services, such as H.450.1, H.450.2, and H.450.3, etc. As long as SIP makes full use of the defined header fields, the header fields are adjusted as necessary Simple extensions can easily support supplementary or intelligent services.
- (6) Multipoint transmission: H.323 does not support the Multicast protocol. It can only adopt a Multipoint Control Unit (MCU) to form a multipoint conference, and therefore it can only support a limited number of multipoint users at the same time. SIP itself is formulated by the IETF MMUSIC (Multiparty Multimedia Session Control) working group, so supporting multipoint protocols is its unquestionable advantage. Session participants and media types can join an existing conference at any time.
3 2. Session Initiation Protocol SIP description syntax
- The Session Description Protocol (SDP) used by SIP is a standard formulated by the IETF. The basic purpose of SDP is to define a standard syntax for transmitting messages, such as the UDP destination port, the audio or video encoding standard used, the schedule of events, the name / short description of the session, and so on. It is used to transmit protocol information similar to the capacity exchange mechanism in the H.245 protocol. For example, in a call, SDP can be used to transmit codec identification during the exchange process. SDP is also used for real-time information protocol (RTSP) messages.
- SDP is an easy-to-read text protocol, consisting of several <TYPE> = <VALUE> lines, each line ending with CRLF. Unlike binary encoding like H.323 ASN.1, it sacrifices bandwidth to facilitate programming and debugging. However, in the actual application process, such a description protocol that is not professional and easy for multiple parties to participate is more easily accepted by users.
4 Session Initiation Protocol SIP entities
- The design idea of SIP is based on the peer-to-peer principle session between hosts. SIP defines an optional SIP server to replace the complicated H.323 addressing process to shorten the call setup time. The mode adopted by SIP is very suitable for using the client / server (Client / Serve) operation type in the Web environment. A client is an application that establishes a connection with a server in order to send a request to the server. The User Agent and the Proxy contain clients. A server is an application used to service requests from clients and return responses. There are 4 types of basic servers.
- (1) User proxy server: when receiving a SIP request, contact the user and return a response on behalf of the user.
- (2) Proxy server: It can accept requests as a server and send requests as a client. The proxy server can forward the request to the final destination without any change, and can also filter the content in the original request message when the request passes.
- (3) Redirection to the server: Receive the SIP request, map the original address in the request to zero or more new addresses, and return it to the client.
- (4) Registration server: Receives the registration request from the client and completes the registration of the user address. The essence of its work is to complete the mapping of user SIP address to IP address.
- User terminal programs often need to include user agent clients and user agent servers. The proxy server, redirect server, and registration server can be considered as public web servers. The concept of "location server" is often mentioned in SIP, but the location server is not a SIP server. The way the SIP server requests location services is also outside the scope of SIP.
5 4. Session Initiation Protocol SIP call summary
- (1) Call establishment: The SIP endpoint calls another SIP endpoint by sending an invitation message (invite) using UDP or TCP signaling. The invitation message usually contains enough information to enable the called terminal to immediately establish the requested media connection with the calling endpoint. This information includes the media capabilities that the calling endpoint can support, and the address at which the calling endpoint expects the called end to send media data.
- (2) Codec negotiation: When the called end does not accept the calling end's codec mode, it will send a message with the reason for the negotiation failure and the proposed usage mode; the calling end can re-initiate an invitation message through the proxy server in the network , After the proxy server conversion to meet the requirements of the called end codec.
- (3) Call process: Both parties transmit media information on a known port address. It should be noted that SIP does not have the concept of a logical channel as defined by H.323. When a client proposes to receive several types of media on several UDP or TCP ports, it must immediately be ready to receive media on any of these ports.
- (4) Terminate the call: When any party requests to terminate the call, it should send an end request (bye) to the other party. After confirmation, the entire call is completely completed.
- SIP is still in the development and testing stage and is not as widely accepted as H.323, but many manufacturers (such as 3Com, Cisco, Nortel Networks, etc.) are actively developing. The future development trend is SIP or H.323 Used in conjunction with MGCP.