SIP protocol Learning 1

Source: Internet
Author: User

SIP protocol Learning 1
The SIP protocol is an application layer control protocol proposed by IETF for multimedia communication over an IP network. A hierarchical method is used to create a service. A control protocol on the application layer is used to create, modify, and terminate multimedia session processes with multiple participants. Members participating in a session can communicate through multicast, unicast, or both. It can be used to invite a new member to join or create a new session. Generally, the sip protocol uses the RTP protocol to transmit audio and video streams, and the SDP protocol for media description. For the SIP protocol, you must first establish a call channel. The IP address and port number of the server establish a call channel between the client and the server, the parameters in the request message sent by the client tell the server the IP address and port number of its media channel. Then, when the server sends the final response, the media channel between the client and the server is established. When the server receives a confirmation message from the client, they start to communicate. The SIP protocol uses a client/server in text format and is a request response protocol, which defines multiple network entities that execute the corresponding functions. These network entities usually include user proxy UA and network server NS. UA is divided into user proxy client UAC and user Proxy Server UAS. UAC is responsible for initiating SIP call requests, UAS is responsible for responding to call requests. Network Servers mainly provide registration, authentication, authentication, and routing services for customer agents. Depending on their functions, network servers can be divided into proxy servers, redirect servers, and registration servers. The proxy server mainly forwards messages and redirects the server to receive SIP requests. It maps the source addresses in the requests to multiple or zero new addresses and returns them to the client UAC. the registration server receives client registration requests to complete user address registration. SIP supports three call methods: (1) direct call from the client-like server (2) redirection call by UAC with the assistance of the redirection server (3) on behalf of UAC, the proxy server initiates a call to the called Sip. A call is divided into three phases: Call Establishment, call protection, and call release. First, you must establish a call Channel, namely a TCP/UDP connection. Therefore, the call signaling channel between the client and the server is established by the IP address and port number of the server. Then, the client sends the INVITE message to the server. If the server segment agrees to the call, the client sends (2) and (3) messages. The 1xx Status Code indicates that the request has been received, is being processed, and 200 indicates that the request has been completed. At this time, if the client suddenly does not want to participate in this session, you can send BYE to the server. In the figure, the 3xx server will only redirect the request when it appears. The 4xx response indicates that the client request has a syntax error and cannot be executed by the server. The 5xx response indicates that the server has an error and cannot execute a legal request. The 6xx response indicates that all servers have errors and cannot execute valid requests. After receiving a response from 3xx, 4xx, and 5xx, the customer can modify the message and resend the request based on the message in the response. When the client accepts the 6xx response, the call is completed.
Message usage INVITE calls a user proxy and sends a call. ACK confirms the call. BYE terminates the call. CANCEL ends a call that is not yet OK. REGISTER provides a registration service with a contact address and an alias that can be used as a replacement. OPTIONS queries the "capabilities" of a user agent (for example, the messages and codes that the user agent can recognize ). Response Message: Message usage 100 The Trying message has been received, but the end user agent has not processed it. Please wait. 180 the Ringing end user proxy has received a message and is prompting the user. Please wait. 200 OK the end user has accepted the message. 301 Moved Permanently & 302 Moved Temporarily the address of the user proxy has been changed, and the new permanent or temporary address is in the Contact field. 400 Bad Request common error message. The client cannot recognize messages. 401 Unauthorized & 407 use the certificate and try again. 404 Not Found the user to be contacted does Not exist or has Not been registered. 408 Request Timeout the other party does not respond. This means that the SIP message will never be OK. All retries will be discarded. This does not mean that the phone rings too long (the phone can ring the bell forever ). A message uses a header field similar to the header field type field usage as the sender of a FromSIP request. The receiver of the ToSIP request. This is usually the same as the sip uri (it can be an "alias" or an actual address ). The actual address of the Contact user proxy. Call-ID indicates the complete Call or dialog between two user proxies. All related SIP messages use the same Call-ID. For example, when a user agent receives a BYE message, according to the Call-ID, it knows which Call is to be hung up. The sequential number of the CSeq message. This is unique in a conversation or Call-ID. This is used to distinguish between a new message and a "retry message ". When an initial message is not OK in time, retry and send it regularly. The MIME Type of payload in the Content-Type message. The size of Content-Lengthpayload, in bytes. The envelope and payload are separated by an empty line.

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.