SIP: Build a new generation of Softswitch
First, SIP's proposal and initiated
SIP (Session Initiation Protocol, Session Initiation Protocol) is the IP Telephone Signaling Protocol proposed by the IETF (INTERNE engineering task group). Its main purpose is to resolve signaling controls in the IP network, and communication with SoftSwitch, thereby constitute a better value-added business platform for telecommunications, banks, finance and other industries. The structural diagram is shown below.
Each functional module is described below:
SoftSwitch: Mainly implemented connection, route and call control, defecting and bandwidth management, as well as the generation of traffic records.
Media Gateway: Provides information conversion (including speech compression, data detection, etc.) in a circuit switched network (i.e., traditional PSTN).
SINNALING GATEWAY: Provides conversion of protocols with the IP network.
Application Server: The platform runs and manages the value-added service, communicating with SoftSwitch with SIP.
Media Server: Provides a platform for media and voice resources while transmitting RTP streams with Media Gateway.
Use SIP as an interface between SoftSwitch and Application Server to implement all functions of call control. At the same time, SIP has been accepted by SoftSwitch as a general interface standard, so that the interconnection between SOFTSWITCH can be implemented.
Second, SIP function and characteristics
As the name is impossible, SIP is used to initiate sessions, which controls the establishment and end of multimedia sessions participating in multiple participants, and dynamically adjusts and modifies session properties, such as session bandwidth requirements, media types (voice) , Video and data, etc.), the media's codec format, support for multicast and unicast, etc.
SIP is designed to take into account extended adaptability to other protocols. It supports many address descriptions and addressing, including: username @ host address, called number @PSTN gateway address and such as Tel: 010-62281234 Such ordinary telephone numbers, etc. In this way, the SIP call is called by the called address, you can identify whether the called is on the traditional telephone network, and then passed through a gateway connected to the traditional telephone network and established a call. The most powerful SIP is the user positioning. The SIP itself contains functions registered with the registration server, or other locating servers such as DNS, LDAP, such as DNS, LDAP, etc. to enhance their positioning function.
three. Classification and function of servers in SIP
There are clients and servers in the SIP. The client refers to an application that establishes a connection with the server in order to send a request to the server. User Agent and Proxy (Proxy) contain clients. The server is an application for providing services to the client and returning a response.
A total of 4 basic servers:
User Agent Server: Contacts the user when you receive a SIP request and return response on behalf of the user.
Proxy server: Represents other client initiating requests, both serve both the server that acts as a client. It may rewrite the contents of the original request message before the forwarding request.
Right to the server: Receive the SIP request, map the original address in the request into zero or more new addresses, return to the client.
Register Server: Receive the client's registration request to complete the registration of the user address.
User terminal programs often need to include user agency clients and user proxy servers. Proxy servers, redirect servers and registration servers can be seen as a public network server. The Concept of "Location Server" is often mentioned in SIP, but the location server is not part of the SIP server. The way the SIP server requests the location service is not within the discussion of the SIP. Its implementation in the IP network is as follows. SIP is independent of the low-level protocol, generally uses unconnected protocols such as UDP, and uses its own application layer reliability mechanism to ensure the reliable transmission of the message.
Fourth, SIP message definition and format
SIP's message definition is fully text-based format. Divided into a message header and a message body, which mainly has the following fields.
TO
Registered destination address.
From
Registered header address. If it is registered for the first time, it is the same as the destination address.
Content-Type
Type of message
Content-Length
Length of the message
Request-URI
Registration request destination address
Call-id
All registrations from one client use the same CALL-ID
CSEQ
Registration of the same CALL-ID must have an incremental CSEQ number.
V. SIP method
SIP mainly implements the control of calls with the following six ways.
(1) Invite
INVITE method illustrates a user or service to participate in a session. The message body section contains the information description of the called. For both calls, the callback needs to explain the type of media he can accept and send. Examples are as follows:
INVITE A -> Proxy 1
INVITE SIP: Userb@there.com SIP / 2.0
VIA: SIP / 2.0 / udp here.com:5060
From: Bigguy
To: Littleguy
Call-ID: 12345600@here.com
CSEQ: 1 Invite
Contact: Bigguy
Content-Type: Application / SDP
Content-Length: 147
V = 0
O = usera 2890844526 2890844526 in ip4 here.com
s = session sdp
C = in IP4 100.101.102.103
T = 0 0
M = Audio 49172 RTP / AVP 0
a = rtpmap: 0 pcmu / 8000
(2) ACK
The ACK method is mainly used to confirm that the client's request for the Invite method has responded. Examples are as follows:
ACK SIP: Userb@there.com Sip / 2.0
VIA: SIP / 2.0 / udp ss1.wcom.com:5060; branch=2d4790.1
VIA: SIP / 2.0 / udp here.com:5060
Route:
From: Bigguy
To: Littleguy
; TAG = 314159
Call-ID: 12345601@here.com
CSEQ: 1 ACK
Content-Length: 0
(3) BYE
The client is sent to the server with a BYE method to end the call. Examples are as follows:
Bye Sip: Usera@here.com SIP / 2.0
VIA: SIP / 2.0 / udp therere.com:5060
Route:
.
From: Littleguy
; TAG = 314159
TO: BIGGUY
Call-ID: 12345601@here.com
CSEQ: 1 bye
Content-Length: 0
(4) Cancel
The CANCEL method is used to cancel a pending call. Examples are as follows:
Cancel Sip: Userb@there.com SIP / 2.0
VIA: SIP / 2.0 / udp here.com:5060
From: Bigguy
To: LittleguyCall-ID: 12345600@here.com
CSEQ: 1 Cancel
Content-Length: 0
(5) Register
Used to register the client to the location server.
(6) Options
Used to query the information and functions of the server.
Six, the definition of the status code
SIP mainly defines five types of response states.
1xx: information. Indicates that the request has been received, and the request can be processed.
2xx: Correct. Indicates that the call has been properly accepted and processed.
3xx: redirection. Indicates that the call needs to be redirected.
4xx: Client error. Indicates that the message has an expression error and cannot be processed by the server.
5xx: server error. Indicates that the server cannot handle the message.
Seven. Superiority of SIP
At the beginning of the H.323 and SIP design, it is the application layer control (signaling) protocol for multimedia communication, and is generally used for IP phones. The signaling functions they can implement are basically the same, and RTP uses RTP as a protocol for media transmission. But the design styles of the two are different, which is due to the two major camps launched (telecommunications fields and Internet areas) want to follow their own tradition. H.323 is proposed by ITU, which attempts to put the IP phone as a well-known traditional telephone, just that the transmission mode has become a packet switching, as analog transmission becomes digital transmission, coaxial cable transmission Getting fiber optic transmission. The SIP focuses on an application on the Internet as an application on the Internet, adds signaling and QoS to other applications (such as FTP, E-mail, etc.). H.323 has earlier, and the agreement has been mature; due to its use of traditional implementation telephone signaling mode, it is easy to interwork with existing telephone networks, but relatively complicated. SIP draws on other Internet standards and protocol design ideas and has its own advantages.
1. First, it is a text-based protocol, and H.323 uses the binary method based on ASN.1 and compressed coding rules, which is simple to analyze the words and grammar analysis of the message indicated by text form.
2. Second, the SIP session request process and the media negotiation process are carried out together, so the call setup time is short, and the signaling control process of the call setup process and the media parameter in H.323 is separate.
3, again, H.323 define a special protocol to implement the supplementary business, such as H.450.1, H.450.2 and H.450.3, while SIP is simple to expand the header field as long as it takes advantage of the defined head domain. It is convenient to support supplementary business or intelligent services.
4, finally, H.323 is concentrated, and the level control is controlled. Although centralized control facilitates management (eg, billing and bandwidth management, etc.), but when used to control large conference calls, multi-point control units that perform conference control functions in H.323 are likely to be bottlenecks. SIP is similar to other Internet protocols, designing distributed call model services, with distributed multicast functions.
In my country IP phone field, the H.323 protocol is used in conjunction. But we should also see the advantages of simple SIP simple and flexible, distributed control. And with the development of SoftSwitch and other technologies, SIP will replace H.323 and become the most widely used signaling control protocol in IP.