Research on combined application of SIP sap and SDP protocol

Source: Internet
Author: User
Abstract sip, sap, and SDP are important protocols involved in NGN and 3tnet. Based on introduction and analysis of SIP, sap, and SDP protocols, this paper provides a multimedia conference application instance based on the combination of the three protocols.

Key words: SIP sap SDP

1 Introduction

Session Initiation Protocol (SIP), SAP (Session announcement protocol), and SDP (Session Description Protocol) are three session) related RFC protocols are connected and differentiated. In this article, we will make a simple analysis of the three protocols and give 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

The 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", 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 specific functions and participates in SIP Communication as a client (initial request), server (Response Request), or as a combination of the two. 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 proxy (UA) is the 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 is available) 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) registration 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, which is constructed by elements such as the user's phone number or host name (for example, SIP: ). 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 (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 start line transmits the Message Type (method type in the request and response code) and Protocol version. The starting line can be a request line (request) or 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), and are always in the format: <name >:< value>.

(3) Message Body: used to describe the initial session (for example, including 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 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, 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 sends one notification packet to a known multicast address and port through the multicast mechanism (Multicast, if the Members in the multicast group 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 address (IP Unicast session) of the media and transmission port used for the contact address ).

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, the person in charge of each department is included in the participants of this meeting (of course, the person in charge of the company and the client of the person in charge of each department must be in the same multicast group ). Then, click a "meeting notification" button on the page, and the conference server will send the sap Protocol to all participants (including company leaders and department heads) of the Meeting) 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 will officially start under the control of the meeting Chairman (company leader.

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 further development and popularization of the above protocols, we firmly believe that sap, sip, and SDP will be widely used in NGN (Next Generation Network), 3 tnet (high performance broadband information network) and other broadband multimedia applications. (Jack, Master, Technical Department of China Telecom Research Institute, ye Hua, vice minister of Technology of China Telecom Research Institute, from China Data Communication)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.