SIP and VoIP protocols and Their Applications

Source: Internet
Author: User

SIP and VoIP protocols and Their Applications

As an important protocol in NGN, the SIP protocol has gained more and more attention from the industry. This article briefly introduces the meanings of VoIP and SIP protocols, introduces the working principles of the SIP protocol from the aspects of background, functions, and main messages, and analyzes the process of establishing a SIP call.

1 VoIP Overview

Currently, the Internet is widely used. As the speed of the backbone network increases rapidly and the access speed increases, services on the Internet are moving from narrowband to broadband and from non-real-time to real-time, the VoIP (Voice over Internet Protocol) service is an important service.

VoIP is a technology that digitally encodes, compresses, and processes voice signals into frames, and then converts IP data packets for transmission over an IP network to achieve voice communication over an IP network. Its biggest advantage is its ability to make extensive use of the Internet and the Global IP connection environment, providing voice, fax, video, and data services at a very low cost, such as unified messaging, virtual phone, virtual voice/fax mailbox, account checking service, Internet call center, Internet call management, video conferencing, e-commerce, fax storage and forwarding, and storage and forwarding of various information..

Currently there are two completely independent signaling protocols in the VoIP field: International Telecommunications Standardization Department (International Telecommunications Union-Telecommunication Standardization Sector, ITU-T) and Session Initiation Protocol of the Internet Engineering Task Force (IETF.

Traditional IP networks are mainly used to transmit data services. They use best-effort and connectionless data technologies. Therefore, there is no service quality guarantee, and packet loss, out-of-order arrival, and latency jitter exist. Data Services do not have high requirements for this, but voice is a real-time service and has strict requirements on time sequence and latency. Therefore, special measures must be taken to ensure the service quality. Key Technologies of VoIP include signaling, encoding, real-time transmission, QoS, and network transmission.

2. Introduction to the SIP protocol and its Functions

2.1 Session Initiation Protocol sip

Session Initiation Protocol (SIP) is an application layer control protocol proposed by IETF for multimedia communication over IP networks. As part of the IETF standard process, SIP is built on top of SMTP (Simple Mail Transfer Protocol) and HTTP (Hypertext Transfer Protocol. It is used to establish, change, and terminate calls between users based on IP networks. In order to provide telephone services, it also needs to combine different standards and protocols, especially to ensure the transmission (RTP), and The Signaling connection with the current telephone network, to ensure the quality of speech (RSVP ), provides directory (LDAP) and user authentication (RADIUS. It is based on Internet Protocol (HTTP) and follows Internet design principles. It is based on peer-to-peer working mode. Using sip, you can connect, establish, and release sessions, and support unicast, multicast, and mobility. In addition, if SIP is used with SDP, You can dynamically adjust and modify session attributes, such as call bandwidth, transmitted media type, and CODEC format.

SIP is much better than some existing protocols, such as the Media Gateway Control Protocol (MGCP) that converts the PSTN audio signal into IP packets ). Because MGCP is a closed voice standard, it is complicated to enhance it through the signaling function. Sometimes, the message is damaged or discarded, which prevents the provider from adding new services. With sip, programmers can add a small amount of new information to messages without affecting connections. For example, a sip service provider can create a new media that contains voice, video, and chat content. If the MGCP, H.323, or SS7 standard is used, the provider must wait for a new version of the protocol that supports this new media. If you use sip, although the gateway and device may not be able to recognize the media, companies with branches on two continents can achieve media transmission. In addition, because the SIP Message construction method is similar to HTTP, developers can use common programming languages (such as Java) to create applications more conveniently. For carriers that want to use SS7 and advanced intelligent network (AIN) to deploy call wait, caller ID Recognition, and other services after several years, if you use sip, deployment of advanced communication services takes only a few months.

2.2 basic functions of the SIP protocol

SIP is described to generate, modify, and end sessions between one or more participants. These sessions include Internet Multimedia conferences, Internet (or any IP Network) telephone calls, and multimedia Publishing. The members of a session can communicate with each other through multicast or unicast networks. SIP supports session description, which allows participants to agree on a set of compatible media types. It simultaneously supports user mobility through proxy and redirect requests to the current user location. SIP is not bundled with any specific conference control protocol. Essentially, SIP provides the following functions.

Name Translation and user positioning: ensure that the call is reached wherever the called party is. Map any description information to the positioning information. Ensure that essential details of the Call (session) are supported.

Feature negotiation: it allows the call-related group (which can be multiple-party calls) to reach an agreement on the supported features (Note: not all parties can support the same level of features ). For example, videos can or cannot be supported. In short, there are many scope for negotiation.

Call participant management: Call participants can introduce other users to call or cancel connections to other users. In addition, the user can be transferred or set to call persistence.

Call feature change: the user should be able to change the call features during the call process. For example, a call can be set to "voice-only", but you can enable the video function as needed during the call. That is to say, a third party that joins the call can enable different features to join the call.

2.3 overall description of the SIP Message

SIP messages are used to establish and modify Session connections. There are two types of SIP messages: client-to-server request and server-to-client response ).

A sip Message consists of three parts: a SIP Message consists of one start-line, one or more fields (fields) composed of a message header, a blank line (CRLF) marking the end of the message header, and an optional message body, which describes the message body) object header ). The start line is divided into two types: Request Line and status line. The request line is the start line of the Request Message and the status line is the start line of the Response Message, the start line is at the beginning of the message. Message Headers include general-header, request-header, response-header, and entity-header. A message header describes the attributes of a message. It is similar to the syntax and semantics of an HTTP message header. Some of them are completely copied. The message body describes the session to be created for the message. A typical message body is in SDP format, which describes the session to be created, for example, the message body that creates a multimedia session contains the description of audio, video encoding, sampling frequency, and other information. The message body type is identified by the code defined by mime (multi-purpose Internet Mail Extension). For example, the SDP type is application/SDP. In addition to SDP, the message body can also be other types of text or binary data.

(1) sip Request Message

The invite method is used to invite users and services to a session. In the message body of the invite request, you can describe the sessions that the called party is invited to participate in. For example, the caller can receive the media type, the sent coal type, and some parameters. A successful response to an invite request must specify the media that the callee is willing to receive or the media that the callee sends in the Response Message Body. The server can automatically respond to the Meeting invitation with 200 OK.

The ack request is used by the client to verify to the server that it has received the final response to the invite request. Ack is only used with the invite request. The confirmation of the 2XX final response is sent by the client user proxy, and the confirmation of other final responses is sent by the first proxy that receives the response or the first client user proxy. The values of the to, from, call-ID, and CSeq fields in the ACK request are copied from the values of the corresponding fields in the inivite request.

Options is used to query the capabilities of a server. If the server thinks it can contact the user, a capability set can be used to respond to the options request. Options from and to 91 contain the address information of the master callee, the values of the from, to (TAG parameter may be added), and call-ID fields in the response of the options request are copied from the Field Values in the response of the options request.

The bye user agent uses the bye request to indicate to the server that it wants to release the call. A bye request can be forwarded as an invite request, either by the caller or by the callee. The caller must send a bye request before releasing (hanging up) the call. The caller must stop sending a media stream to the caller who sends a bye request.

The cancel request is used to cancel an ongoing request with the same call-ID, to, from, and CSeq (serial number only) fields, however, the request that has been completed cannot be canceled (if the server returns a final response, the request is deemed to have been completed ). The numbers of call-ID, to, and CSeq In the cancel request and the from field are the same as those in the original request, so that the cancel request matches the request to be canceled.

The register method is used by the client to register the address information listed in the to field with the SIP server.

The info method is an extension of the SIP protocol. It is used to transmit session-related control information, such as ISUP, ISDN Signaling messages, and DTMF numbers.

Invite and ACK are used to establish a call, complete three-way handshake, or change session properties after the call is established. Bye is used to end the session. Options is used to query server capabilities; cancel is used to cancel a request that has been sent but has not ended. register is used to register a user location with the registration server by a client.

In addition to message interaction when a session is established, the SIP terminal can send messages to change or add certain attributes of the session during the session. For example, if you want to increase video communication during a voice call, you can send a new INVITE message without interrupting the call to open the video media of both parties, converts a call to a videophone. This brings great flexibility to users.

(2) sip Response Message

The three-digit status code and Reason code are used in the SIP Protocol to respond to the request. The status code is used for machine identification and the reason phrase (reason-phrase) it is a simple text description of the status code for manual identification. The first digit of the status code defines the type of the response. In Sip/2.0, the first digit has six values, which are defined as follows:

LXX-temporary response, indicating that the request has been received and the request is being processed.
2XX-a successful response indicates that the action has been successfully received, understood, and received.
3xx -- Relocation response, indicating that further action must be taken to complete the call request.
4xx -- client error, which is a request failure response, indicating that the request has a syntax error or cannot be executed by the server. The client needs to modify the request and resend the request.
5xx -- server error, which is a server failure response. It indicates a server error and cannot execute legal requests.
6XX -- Global failure response, indicating that no server can execute the request.

3. Establish a SIP call

3.1 sip direct call

(1) first, the caller sends an invite request to the called party. An invite request is used to initiate and establish a call, inviting the called party to join the call established by the caller.

(2) the called party responds to the caller after receiving the request. The receiving requestor's response to the request is divided into a temporary response (status code 1xx) and a final response (status code 2XX ). The caller only responds to the final response. In Figure 1, 100 trying, 180 ringing (called or in Request status ), 182 queued.

(3) In order to confirm that the caller has received the final response, the caller sends an ACK request after receiving the response. The called receives an ACK request from the caller, marking the end of the call establishment phase.

(4) The caller or callee initiates a subsequent request after the call is established. Subsequent requests can be initiated by either party participating in the call. You can initiate an invite request, perform interactive operations, and modify the current call. You can also initiate a bye request to terminate the current call.

The process of SIP direct call 1 is shown in.

The structure 2 of the SIP User adapter in the SWAp system used for testing is shown in.

3.2 outbound call process of SIP IN THE SYSTEM

When the basic call process analyzes the call information, it sends the request route message to the routing management module. If the Routing Management Module finds that it is a sip route, it returns the SIP address to the Basic Call process, the basic call process adds the SIP address to the setup message and sends it to the SIP module. When the SIP module receives the setup message from the basic call process, it allocates call resources, call IDs, then, send a message to the process, as shown in process 3.

3.3 sip inbound PROCESS IN THE SYSTEM

When the SIP module receives the invite message from the call process, it allocates the call resource and binds the call ID and call resource, returns the 100 message to the process, and sends the setup message to the Basic Call process, process 4.

3.4 sip sound Releasing Process in the system

If this SIP user is registered with the sound service, the connection management module will send a sound command to the SIP-UA module, the SIP-UA will send invite to the process, after the other party returns 200ok, the SIP module sends a sound release command to the connection management module and enters the sound release stage. The process is shown in Figure 5.

4 Conclusions and prospects

As the core protocol of NGN communication, SIP has great market potential and application prospects. Protocols are the basis of communication. Especially in 3G and VoIP, the flexibility and scalability of SIP will be reflected and welcomed. It is foreseeable that in the near future, especially for some large operators, their central platform will be based on SIP.

SIP can be connected to any IP Network (wired LAN and WAN, public Internet backbone network, mobile 2.5g, 3G, and Wi-Fi) and any IP device (phone, PC, PDA, mobile handheld device) users, and thus a large number of lucrative new business opportunities, improved the communication between enterprises and users. SIP-based applications (such as VoIP, Multimedia conferences, push-to-talk (key-call), location services, online information, and Im) are used independently, it also provides many new business opportunities for service providers, ISVs, network equipment providers, and developers. However, the fundamental value of SIP is that it can combine these functions to form a variety of large-scale seamless communication services.

With sip, service providers and their partners can customize and provide SIP-based combined services so that users can use conference, web control, online information, IM and other services in a single communication session. In fact, a service provider can create a flexible combination of applications that meet the needs of multiple end users, rather than installing and supporting a single distributed application that relies on the limited functionality or types of terminal devices. By combining IP-based communication services under a single and open standard sip application architecture, service providers can greatly reduce the cost of designing and deploying new IP-based hosting services for users. It is the powerful motive force for SIP scalability to promote the development of the industry and the market, and the hope of all of us. However, as an unencrypted protocol, the security of the SIP Protocol becomes very complex, which is a problem that we cannot ignore in the future.

 

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: info-contact@alibabacloud.com 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.