1 Introduction
SIPSession Initiation Protocol, Session Initiation Protocol), SAPSession Announcement Protocol, Session notification Protocol), SDPSession Description Protocol, Session Description Protocol) are three sessions) related RFC protocols are connected and differentiated. In this article, we will make a simple analysis of the three protocols and provide a multimedia application that has some practical value to achieve with these three protocols.
2 protocol analysis
2.1 introduction and analysis of the SIP protocol
Session Initiation Protocol (SIP) is a messaging protocol used to initialize, manage, and terminate voice and video sessions in a group network, specifically, it is used to generate, modify, and end sessions between one or more participants. SIP is an integral part of the multimedia data and control architecture of the Internet Engineering Task Group IETF. Therefore, it is associated with many other IETF protocols, such as RTP real-time transmission protocol) and the SAP and SDP protocols mentioned in this article.
SIP provides five functions related to session establishment and termination:
1) User positioning: Decisions of the terminal system used for communication;
2) User availability: The decision of the willingness of the called party to participate in the communication;
3) user capability: determines the media and media parameters used;
4) Session creation: "ringing" refers to the establishment of call and called Party session parameters;
5) session management: includes transferring and terminating sessions, modifying session parameters, and calling services.
The SIP network consists of four types of logical SIP entities. Each entity has a specific function and serves as the initial request of the client), or as the server to respond to the request), or as a combination of the two to participate in the SIP Communication. A physical device can have more than one logical SIP entity. For example, a network server that acts as a proxy server can register servers at the same time.
The following are four functional entities:
1) User Agent
In SIP, the user agent UA is an endpoint entity. The User Agent initiates and terminates a session by exchanging requests and responses. As an application, UA contains the user proxy client and user proxy server, as follows:
· User proxy client UAC): the initial SIP request of the client application.
· User Proxy Server UAS): Server application. When a SIP request is received, it contacts the user and returns a response on behalf of the user.
Devices with UA functions in the SIP network are workstation, IP Phone, Telephone Gateway, call proxy, and automatic response service.
2) Proxy Server
The proxy server serves as the intermediate entity of both the server and the client. Its purpose is to generate requests on behalf of other clients. The request is internally processed or may be transferred to another server after translation. If necessary, the proxy can interpret and rewrite the request message before forwarding.
3) Redirect Server
The redirection Server accepts the SIP request, maps the called party's SIP address to zero if no known address) or more new addresses and returns them to the client. Unlike the proxy server, the redirection server does not send requests to other servers.
4) register the server
The registration server is the server that accepts the REGISTER request. It aims to update the location database based on the contact information specified in the request.
SIP uses an e-mail address to indicate the user address. Each user is identified by a hierarchical URL that constructs elements such as a user's phone number or host name, such as a SIP: user@company.com ). Because of its similarity with the e-mail address, SIP URLs is easily associated with the user's e-mail address.
SIP has two types of messages:
1) Request: the message sent from the client to the server.
2) response: the message sent from the server to the client.
The request message includes:
· INVITE: initial call, changed so the parameter re-INVITE ).
· ACK: confirm the final response of INVITE.
· BYE: Terminate the call.
· CANCEL: Undo search and zhenling.
· OPTIONS: query the capabilities of the other party.
· REGISTER: REGISTER the location service.
· INFO: Send session information without changing the session status.
· PRACK: It works the same as ACK but is used for temporary response.
· SUBSCRIBE: This method is used to SUBSCRIBE to notifications of status changes to the remote endpoint.
· NOTIFY: This method sends a message to NOTIFY the subscription user of the change in its predefined status.
· UPDATE: allows the customer to UPDATE the parameters of a session without affecting the current state of the session.
· MESSAGE: enables instant messages by carrying the Real-Time MESSAGE content in the Request body.
· REFER: This function instructs the recipient to contact a third party by using the contact address provided in the request.
The response message contains the digital response code. The SIP response code set is based on the HTTP response code. There are two types of responses:
· Temporary response 1XX): the temporary response is used by the server to indicate the process, but does not end the SIP transaction.
· Final response to 2XX, 3XX, 4XX, 5XX, 6XX): The final response to terminate the SIP transaction.
Each SIP Message consists of the following three parts:
1) Start Line): Each SIP message starts from the Start Line. The message type in the start line is the method type in the request, and the response code in the response) and Protocol version. The starting line can be a request line request) or a status line response ).
2) SIP header: used to transmit message attributes and modify message meaning. They have the same syntax and semantics as HTTP header fields. In fact, some headers are borrowed from HTTP. They are always in the format of <name >:< value>.
3) Message Body: used to describe the initial session, such as audio and video encoding types and sampling rates in multimedia sessions ). The message body can be displayed in the request and response. SIP clearly distinguishes the signaling information transmitted in the starting line and header of the SIP from the session description outside the SIP range. Possible body types include the SDP Session Description Protocol described in this article.
2.2 SAP protocol introduction and analysis
The full name of SAP is the session notification protocol, which aims to send relevant session creation information to the expected meeting participants to notify a multicast multimedia meeting or other multicast sessions. The SAP protocol itself does not establish a session. It only notifies other participants in a multicast group of the information necessary to establish a session, such as the video or audio encoding method adopted, after receiving the notification packet, the participant can start the corresponding tool and set the correct parameters to establish a session with the initiator of the meeting. The established session can use the SIP protocol ).
The initiator of the notification does not know whether each participant has received the session notification. That is to say, each participant does not reply "I have received the notification" to the initiator. Therefore, the notification initiator can only send the session notification periodically so that the participant can receive the notification as much as possible.
SAP does not send one-to-one notification packets to each participant. It uses the multicast mechanism multicast to send one notification packet to a known multicast address and port at a time, if the multicast group members work properly, they will receive the notification packet. Therefore, to enable all participants of the meeting to receive notifications, ensure that they participate in the multicast group.
In addition to notifying that a session is about to be initiated, a notification datagram can also notify that the session has been canceled or that some communication parameters of the session have been modified. Of course, this requires a mechanism to make these notifications target the same session.
So how does SAP describe session information? This requires the use of SDP protocol. In the payload field of the SAP data packet, SDP data is usually filled, which describes the basic information necessary to establish a session.
SDP is described in section 1.3.
2.3 SDP protocol introduction and analysis
The two protocols described above use SDP. In fact, SDP is used to describe multimedia session announcements, multimedia session invitations, and other forms of multimedia session initialization protocols. The SDP package usually includes the following information:
1) session information
· Session name and purpose.
· Session activity time.
Since the resources involved in the session are restricted, it is very useful to include the following additional information.
· The bandwidth used by the session.
· Contact information of the Session Manager.
2) Media Information
· Media type, such as video and audio.
· Transport protocols, such as RTP/UDP/IP and H.320.
· Media formats, such as H.261 videos and MPEG videos.
· Multicast address and media transmission port IP multicast session ).
· The remote IP address used to contact the media address and the transmission port for the unicast session ).
The SDP description consists of multiple text lines. The text line format is <type >=< value>, <type> is a letter, and <value> is a structured text string, the format depends on <type>.
3. SAP, SIP, and SDP Combination Application Instances
In this application example, we designed a scenario where a company leader needs to hold a video meeting with the heads of various departments of the company. The multimedia conferencing system he uses the combined application of SAP, SIP, and SDP described in this article. The company's leaders first log on to the conference server through a client with Web browsing function and register a meeting. At the same time of registration, he will include the heads of departments into the participants of this meeting. Of course, the heads of the company and the clients of the heads of departments must be in the same multicast group ). Then, he clicks a "meeting notification" button on the page, and the conference server will send the SAP protocol to the participants of the meeting, including the company leaders and department heads) the client sends a meeting notification. In this case, if the client where each participant is located is normally connected to the network and SAP notifies the receiver that the participant is working properly, it will notify the participant in sound or graphics, prepare the client program for this meeting. When the participants find the meeting notification, they click a "participate in the Meeting" button on the prepared meeting client program, the client can easily add the client to the meeting through the SIP protocol. After the participants arrive, the meeting can be officially started under the control of the chairman of the meeting company.
After the SAP notification receiver on each participant's client receives the meeting notification, it will try its best to call various resources on the client to meet the requirements of this meeting. If the requirements cannot be met, it can also notify the participants in writing of the resources required by their local machines. The SDP protocol is used to describe session and media information throughout the SAP and SIP interactions of the Conference. The following figure shows the brief process.
4 Conclusion
SAP, SIP, and SDP are not isolated protocols. They can play their due role only when they are combined and coordinated with other protocols. This article provides an example of a combination of SAP, SIP, and SDP. There are still many such applications. For example, a slight change to the technology in this article can also be used in the building's Multi-Point Video automatic monitoring system. With the development and popularization of the above protocols, we firmly believe that SAP, SIP, and SDP will be widely used in the next-generation NGN networks, 3Tnet high-performance broadband information networks, and other broadband multimedia applications.
Related Articles]
- SIP Protocol paves the way for real-time media communication
- Intercommunication between SIP and MGCP
- Use SOA and SIP to provide next-generation Network Services