1.
Sip1.1. overview 1.1.1.
Basic components of the SIP System
(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 includes 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. It has the ability to parse the name and can send a call request to the previous user's next hop server. Then the server decides the next hop address, which is similar to another Dynamic Routing Protocol BGP (Border Gateway Protocol ).
(3) Redirect server redirect Server
After obtaining the next hop address, immediately tell the previous user to directly send a request to the next hop address, and then exit the control of the call, accessing such a server is like accessing a database.
(4) register the Register Server
Used to log on to UAS. In the network element of the SIP System, all UAS must log on to a logon server so that UAC can find them through the server, only register requests sent by UAC are received. The registration server is usually in the same physical entity as the proxy server or the redirection 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: user@company.com ). Because of its similarity with the e-mail address
URLs is easily associated with the user's e-mail address.
(5) locate the server location Server
It can summarize the content of each login server to facilitate the search of the SIP server. It can act as a global database and act like DNS. Its access and access can be non-sip, such as finger or LDAP. The locating server can be physically in the same location as the SIP network server (proxy server or redirection server) or configured separately.
1.1.2.
Request Method and response
Invite |
Initiate a call |
1xx progress indication |
ACK |
Respond to the invite and confirm the final response. |
2XX successful |
Register |
User Registration: register the location service. |
3xx redirection |
Options |
Capability query: query the capabilities of the other party. This message can be used as a heartbeat message to check whether the peer entity is alive and whether the two entities are reachable. |
4xx client Error |
Cancel |
Cancel call, cancel search, and ring. |
5xx Server Error |
Bye |
Call termination |
6XX global error |
Other request messages:
Info:
Send the information in the session without changing the session status.
Prack:
Similar to ACK, but used for temporary response.
Subscribe: This method is used to subscribe notifications of status changes to the remote endpoint.
Notify:
This method sends a message to notify the subscription of changes in its predefined status.
Update:
Allow the customer to update the parameters of a session without affecting the current state of the session.
Message:
The request body carries real-time messages.
Refer:
This function instructs the recipient to contact a third party by using the contact address provided in the request.
1.2. Format 1.2.1.
SIP format
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.