Android IOS WebRTC Audio Video Development Summary (14)

Source: Internet
Author: User

This article mainly introduces XMPP and sip, many people easily confuse these two concepts, reprint please explain the source, CNBLOGS_RTC. Blacker.

Summary: Both XMPP and sip are application-layer protocols that are used primarily for sending voice and instant messaging over the Internet. SIP is defined in RFC 3621 , and XMPP is defined in RFC 3920 ,

XMPP evolved from instant messaging, and sip evolved from VoIP, XMPP added an extension for session negotiation called Jingle,sip to add an extension called simple for the Instant messaging business.

SIP (Session initiation Protocol)

SIP is an application-level protocol that is used in situations such as VoIP to create, modify, and abort a session, while at a multi-person session He can also add a new session to an existing session.

Basically SIP is a signaling protocol in VoIP that handles call setup, call forwarding, and the generation of CDR (call Detail Record, which is used for calling charges).

XMPP (extensible Messaging Presence Protocol)

XMPP is an XML protocol that responds to business services for instant messaging and requests.

Originally developed by the Jabber Open source community in 1999, the XMPP Working Group expanded the Jabber for Instant messaging in 2002.

The similarities and differences between SIP and XMPP

In fact, we can not simply take the SIP and XMPP to do, as we can not directly compare apples and oranges, the former is mainly for session negotiation, the latter is mainly for structured data exchange, but with their own simple and jingle introduced, they have some similarities.

1,SIP provides connection creation, modification, and termination, while XMPP provides a stream pipeline inside the client, exchanging structured data.

That is, the focus of the SIP is the establishment and maintenance of connections between the terminals, and the subsequent data and information transmission he does not pay attention to, while the XMPP focus is to consider the data exchange within the terminal, connection building is the basic function, not the focus. Therefore, XMPP is well-considered for the support and extensibility of the application, which is better than sip.

2, SIP signaling and message transmission is based on text, not very good parsing, or the lack of regular resolution, in the new data message body when the lack of inheritance, the need to develop new code to encapsulate and parse, the original code inheritance is poor. XMPP, with XML, is a structured message structure that facilitates the expression of hierarchical content and the inherent logic of content. This kind of XML structure has great convenience to the application extension and the content parsing, and a lot of software code can be reused.

3, SIP signaling consists of the header and body, meaning that the header of the SIP message format already contains some content, similar to HTTP, that is directly associated with a specific upper-level application rather than a generic message format , and all XMPP information is transparently transmitted between stream pipelines using XML.

The connection establishment channel of the SIP is separate from the data transfer channel, and the connection is established between the SIP client and the server, and the data transfer channel is directly between the client--client. This is a good fit for video, voice, and file transfer services, but not for other forms of application.

The control of XMPP and the data channel are one, clent only connect with the server, and there is no connection between client and client. The channels transmitted between the clients are: Client1---〉server1---〉server2---〉client2. This approach seems to be poor scalability, server pressure is great, but can achieve good business functions, such as message, broadcast, group chat, status update, Blog, Weibo, data sharing and so on.

This c-s model, a lot of business control done on the server, the addition of new features implemented on the server, the definition of new XML objects and logic on the server, the client as long as the responsibility of XML data flow parsing and rendering can be, so the terminal implementation is simple

4,sip can be transmitted using UDP,TCP,TLS, and XMPP is only sent using TCP and TLS.

5, SIP is two-way symmetric, and both the client and the server can initiate connection requests and respond in a way that is cumbersome to traverse NAT and firewall, and cannot be guaranteed to traverse NAT. While XMPP is a one-way connection, only the client can initiate a connection request to the server, and the server does not initiate a connection to the client. This facilitates the traversal of NAT and firewall.

Reference Document: http://www.differencebetween.com/difference-between-sip-and-xmpp-jabber/

Android IOS WebRTC Audio Video Development Summary (14)

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.