Technologies required for video calls

Source: Internet
Author: User
Tags dot net email protocols

To make a good video call software, you must understand the main technologies of video calls. The following are some summarized technologies for your reference only.

 

1. Supports standard SIP protocol.

SIP is a text-based protocol similar to HTTP. SIP can reduce the development time of applications, especially advanced applications. As the IP protocol-based sip utilizes the IP network, fixed network operators will gradually realize the profound significance of the SIP Technology for them.
Session Initiation Protocol is a signaling control protocol at the application layer. Creates, modifies, and releases sessions for one or more participants. These sessions can be Internet multimedia meetings, IP phone calls, or multimedia distribution. Session participants can communicate with each other through multicast, unicast, or a mixture of the two. With sip, service providers can select standard components at will. Regardless of the number of media content and participants, users can find and contact each other. SIP negotiates sessions so that all participants can agree on and modify session functions. It can even add, delete, or transfer users.
SIP is neither a Session Description Protocol nor a conference control function. To describe the load conditions and features of message content, SIP uses the Internet Session Description Protocol (SDP) to describe the characteristics of terminal devices. SIP itself does not provide quality of service (QoS). It is interoperable with the Resource Reservation Protocol (RSVP) responsible for voice quality. It also cooperates with several other protocols, including Lightweight Directory Access Protocol (LDAP) for locating and remote identity authentication for Identity Authentication Dial-In User Service (RADIUS) and RTP and other Protocols responsible for real-time transmission.
SIP defines the following basic communication requirements:

1. User positioning service

2. Session Creation

3. Session participant Management

4. Limited identification of features
SIP sessions use up to four main components:

SIP User proxy, SIP registration server, SIP proxy server, and SIP redirection server. These systems complete the SIP session by transmitting messages that include the SDP protocol (used to define the content and features of the message. The following describes the various sip components and their functions in this process.
3.1. SIP User Agent
The SIP User Agent (UA) is an end user device, such as a mobile phone, multimedia handheld device, PC, and PDA used to create and manage sip sessions. The user agent client sends a message. The user proxy server responds to messages.
3.2. Sip registration server
The SIP registration server is a database that contains all user proxies in the domain. In SIP Communication, these servers retrieve the IP address and other related information of the parameter and send it to the SIP proxy server.
3.3. Sip Proxy Server
The SIP Proxy Server accepts the sip ua Session Request and queries the SIP registration server to obtain the UA address information of the recipient. It then forwards the session invitation information directly to the receiver UA (if it is in the same domain) or the proxy server (if the UA is in another domain ).
3.4. Sip redirection Server
The SIP redirection server allows the SIP proxy server to direct the SIP session invitation information to an external domain. The SIP redirection server can be on the same hardware as the SIP registration server and the SIP proxy server.

An important feature of SIP is that it does not define the type of session to be established, but only defines how to manage sessions. With this flexibility, it means that sip can be used in a wide range of applications and services, including interactive games, music and video on demand, as well as voice, video, and web conferencing. SIP messages are text-based and therefore easy to read and debug. New Service programming is simpler and more intuitive for designers. The MIME type description is reused as the e-mail client, so session-related applications can be started automatically. SIP reuse several existing mature Internet services and protocols, such as DNS, RTP, And rsvp. No need to introduce new services
The infrastructure provides support because many of the infrastructure is in place or ready for use. The expansion of SIP is easy to define. It can be added by the service provider to a new application without damaging the network. The old SIP-based devices in the network will not impede new services based on the SIP. For example, if the old SIP implementation does not support the method/header used by the new sip application, it will be ignored. SIP is independent of the transmission layer. Therefore, the underlying transmission can use an atm ip address. SIP uses User Datagram Protocol (UDP) and Transmission Control Protocol (TCP) to flexibly connect users independent of the underlying infrastructure. SIP supports multi-device function adjustment and negotiation. If the service or session starts the video and voice, you can still transmit the voice to a device that does not support the video, or use other device functions, such as one-way video stream transmission.
Communication providers and their partners and users are increasingly eager for a new generation of IP-based services. Now we have the Session Initiation Protocol (the Session Initiation Protocol. SIP was born less than a decade ago in the computer science laboratory. It is the first protocol suitable for multi-user sessions in various media content. Now it has become the specification of the Internet Engineering Task Group (IETF. Today, more and more carriers, CLEC (competing with local carriers), and ITSP (IP phone service providers) are providing SIP-based services, such as local and long-distance telephone technology, online information and instant messaging, IP
Centrex/hosted PBX, voice messaging, push-to-talk (button call), multimedia meetings, and so on. Independent software vendors (ISVs) are developing new development tools to build SIP-based applications and SIP software for carrier networks. Network equipment suppliers (Nev) are developing hardware that supports sip signaling and services. Currently, many IP phones, user agents, network proxy servers, VOIP gateways, media servers, and application servers are using SIP. SIP uses similar authoritative protocols, such as web Hypertext Transfer Protocol (HTTP) formatting and Simple Mail Transfer Protocol (SMTP) email protocols-evolved and evolved into a new and powerful standard. However
SIP uses its own unique user proxy and server. It does not work in an integrated manner. SIP supports integrated multimedia services and works with a large number of existing protocols for identity authentication, location information, and voice quality. SIP is flexible, scalable, and open. It inspires the power of a new generation of Services launched by the Internet and fixed and mobile IP networks. SIP can complete network messages on multiple PCs and phones and simulate Internet sessions. Unlike the long-standing International Telecommunication Union (ITU) SS7 standard (for call establishment) and ITU H.323 Video protocol combination standard, SIP works independently of the underlying network transmission protocol and media. It specifies how terminal devices of one or more participants can establish, modify, and interrupt connections, regardless of voice, video, data, or
Web content. 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 recognize the media, companies with branches on two continents can achieve media transmission. In addition, because the message Construction Method of SIP is similar to HTTP, developers can easily use common programming languages (such as Java) to create applications. 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. This scalability has already achieved significant success in more and more SIP-based services. Vonage is a service provider for users and small business users. It uses
SIP provides users with over 20,000 digital city calls, long calls, and voice mail lines. Deltathree provides Internet telephone technology products, services and infrastructure for service providers. It provides a SIP-based PC-to-phone solution that enables PC users to call any phone number in the world. Denwa communications wholesale voice services worldwide. It uses SIP to provide caller identification, voice mail, teleconference, Unified Communication, customer management, self-configuration, and web-based personalized services from PC to PC and telephone to PC. Some authoritative people predict that the relationship between SIP and IP will develop into a similar
The relationship between SMTP and HTTP and the Internet, but some people say it may mark the end of ain. So far, the 3G community has selected sip as the next-generation mobile network session control mechanism. Microsoft has selected sip as its real-time communication policy and deployed it in Microsoft XP, Pocket PC, and MSN Messenger. Microsoft also announced that the next version of Ce dot net will use the SIP-based VoIP application interface layer and promise to provide SIP-based voice and video calls to users' PCs. Additionally, MCI is using
SIP deploys advanced telephone technical services to IP communication users. The user will be able to notify the caller whether they are free and the preferred communication method, such as email, phone or instant message. With online information, users can also instantly establish chat sessions and hold audio meetings. Using SIP will continuously implement various functions.

 

2. DTMF supports rfc2833 or sip info
3. Speech Encoding priority: g729, g711u, g711a, and GSM
4. Non-encrypted and Vos-encrypted encryption methods are supported.
5. Supports the explicit Balance Function
6. Supports the phone book function.
7. Support for call record
8. Supports reading the mobile phone number and setting the display to display the de-power of the SIP protocol.
9. Support for 3G WiFi dialing
10. Nat penetration is supported.

Nat, that is, network address translation, can be translated into network address translation or network address translation.

The current Internet is facing two major problems: the shortage of available IP addresses and the increasing number of Route tables, which makes access for many users difficult. NAT technology allows all users in an organization to access the Internet through a limited number of (or one) valid IP addresses, thus saving the legitimate IP addresses on the Internet. On the other hand, through address translation, you can hide the real IP addresses of hosts on the Intranet to improve network security. In the ccna stage, we mainly examine the basic NAT technology. The examinee should master the following Nat terms and several typical address translation types.

1. in Nat, four address terms must be correctly understood. They are inside local, inside global, outside local, and outside global. In these terms, inside (internal) refers to the internal networks owned by organizations or enterprises. hosts on these networks are usually allocated private addresses. These addresses cannot be directly routed on the Internet, so they cannot be directly used for Internet access. You must use the network address translation to access the Internet as a valid IP address. The former is the insidelocal address. The latter is inside.
Glob Dynamic Address. The local address is an IP address that cannot communicate over the Internet, and the global address is an IP address that can communicate over the Internet. Outside (external) refers to all networks except the internal network we inspect. Internets has an explanation of the four words "Inside", "outsider local", and "global". Let's take a look at the definition of the four addresses.

● Inside local address refers to the IP address assigned to an online host in a network. This address is generally not a valid IP address on the Internet, that is, it is not a Network Information Center (NIC) or the IP address assigned by the Internet service provider (ISP: Internet service provider.

● Inside global address is used to replace one or more internal local IP addresses, external IP addresses, and Internet legitimate IP addresses.

● Outside local address (external local address) the IP address of an external host relative to the Intranet. This address must be a valid address on the Internet, but can be allocated from the address space that can be routed on the Intranet.

● Outside global address (external global address) the IP address assigned by the host owner to the external host on the Internet. This address is allocated from a globally routable address or network space.

2. static internal source address translation the so-called static internal source address translation refers to converting an internal local IP address into a unique internal global address, that is, static one-to-one ing between private addresses and legitimate addresses. This type of conversion is usually used when hosts on the Intranet need to provide external services (such as web and e-mail services.

3. dynamic internal source address translation in the form of dynamic internal source address translation, a dynamic one-to-one ing relationship is established between a group of internal local addresses and an internal global address pool. In this form of address translation, the internal host can access the external network, and the external host can also access the internal network, but it must be successful only when there is a ing relationship between the Intranet IP address and the internal global address, and the ing relationship is dynamic.

4. The Cisco router can reuse the internal global address to realize the multi-to-one ing of the internal local address to the internal global address. When address multiplexing is enabled, the router maintains relevant information in the high-level protocol (such as TCP or UDP port number) and converts the global address to a local address. When multiple internal local addresses are mapped to the same global address, the port number is used to distinguish different local addresses. Port addresstranslation is also called Port addresstranslation. Port address translation ).

For a long time, many people have been told to use the UDP punch Technology for Nat penetration, basically, no one will tell you how to use the TCP protocol to penetrate (or even some people will tell you that the TCP protocol cannot penetrate ). However, we all know that UDP is a connectionless Datagram Protocol, which requires you to maintain the integrity of data packets sent and received by yourself, which often greatly increases the complexity of the program, in addition, some programs must use the TCP protocol for some reason, so that some TCP network program developers often "talk about penetration color change ". So, can TCP be used to achieve penetration? The answer is no: TCP not only achieves Nat penetration, but also is easier than UDP penetration.

To learn how to use TCP to penetrate NAT, we should first look at how to use UDP to penetrate NAT.

We assume that there are two clients a and B behind two different LAN, and the LAN where AB is located is connected to the Internet through a router. There is a server s on the Internet.

At present, AB cannot directly send information with the other party, and AB does not know the real IP address and port of the other party on the Internet, the vro of the LAN where AB is located only allows information sent internally to the outside to pass through. For messages sent by B directly to a's vro, the routing will regard it as "untrusted" and directly discard it.

To achieve direct AB communication, you must perform the following three steps: A first connects to the server s on the Internet and sends a message (for a non-connection protocol such as UDP, you can directly send a message through the initial session ), in this way, s obtains the actual terminal (IP address and port number of the message sending) of a on the Internet ). Then B follows the same steps, and s will know the terminals of AB on the Internet (this is "drilling holes "). Then, s tells Client A and client B the actual terminal on the Internet, that is, s tells client B's session terminal, and s tells Client A's session terminal. In this way, after AB knows the actual terminal of the other party, it can directly send messages through the actual terminal (because both parties have previously sent messages to the outside, there is already a message channel on the route that allows data access ).

There is no theoretical problem when using UDP to implement the above three steps, because UDP is a connectionless protocol, it allows the socket to communicate "many-to-one" (that is, several sockets with different IP addresses and port numbers send messages to one receiving socket ). However, a problem occurs when you use TCP: under normal circumstances, TCP socket cannot listen on the port that has established a connection and use the local port. In other words, When AB is connected to the server S, s will tell the actual terminal of AB to the other party, and the next step should be to use the actual terminal of the other party for direct connection, however, you will find that the actual terminal of the other party is occupied (that is, the session connecting to the server s occupies the terminal), and The listen and
Connect. So many people come to the conclusion that TCP cannot achieve Nat penetration.

The key to the problem is how to reuse a TCP connection's local terminal. This is not a protocol issue, but an API issue. Fortunately, all mainstream operating systems support a specific TCP socket option-so_reuseaddr. This option allows you to bind multiple sockets to the same local terminal. When we create a socket, we only need to add the following line:

Setsockopt (socket, sol_socket, so_reuseaddr, & flag, Len); // C ++

_ Client. setsocketoption (socketoptionlevel. socket, socketoptionname. reuseaddress, true) 'This is more simple for VB.net

It is easy to understand the above knowledge. Next I will talk about the TCP protocol Penetration Process:

The machine layout is the same as that of UDP. Assume that customer a wants to establish a TCP connection with customer B.

First, we should establish connections between AB and server s respectively, and s records the actual Internet terminals of AB. Then s sends the actual terminal of the Peer to AB respectively. Then, AB asynchronously calls the connect function from the port used by a and B to S to connect to the other terminal (that is, the terminal notified by S). At the same time, both parties are listening for incoming connections on the same local port (you can also listen for connections first, and connect is better ). Since both parties send a CONNECT request to the other party (assuming that their respective Syn packets have passed through their own Nat), when the other party's CONNECT request reaches the local listening port, the router will think that this request is part of the Connect session just now and is licensed, and the local listening port will respond with a SYN-ACK and agree to the connection. In this way, the point-to-point connection through NAT through TCP is successful.

 

 

 

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.