4. Main Functions of Skype
Skype functions include initialization, logon, user search, call establishment and termination, media transmission, and status messages.
4.1 Initialization
After the first installation, Skype sends an HTTP 1.1 request to the central server, including the keyword "installed" and the version number of the installed Skype. Every time you log on to Skype, you will send a short HTTP 1.1 request containing the keyword "getlatestversion" to the central server to check whether a new version of Skype exists.
4.2 Login
Logon is the most important function of Skype, as shown in figure 2. In this process, the Skype terminal authenticates the user name and password on the login server, broadcasts it to friends online and other nodes, and checks the NAT and firewall types, an online Skype node with a public IP address is found. These newly discovered nodes are used to maintain the connection between the local machine and the Skype network after the super node is unavailable. If all node addresses in HC are unavailable, logon fails. By analyzing these logon failures, we can conclude a complete Skype Logon Process:
Figure 2 Skype Logon Process
Send the UDP packet first. If no response is received after five seconds, use TCP to send the login request to port 80 of the target node. If the response still fails, send the login request to port 443 through TCP, wait for 6 seconds. If the logon fails, the logon fails. The entire logon process can be repeated four times. The connected object is the list of nodes saved in the host cache on the local machine.
4.3 user search
Skype uses the global index (GI) technology for user search. users who have logged on within 72 hours can be found on both public and private networks. The client can send a request to SC by sending a TCP packet, or send a query request to other SC through a UDP packet. SC sends the result back to the client.
4.4 call establishment and Termination
Skype uses 32 Kbps voice encoding to ensure the quality of speech. Its signaling is transmitted over TCP, while the voice data is transmitted over TCP and UDP. The signaling and voice data use different port numbers. Skype can send call requests to users in the friend list. To ensure the reliability of signaling transmission, signaling is always carried out through TCP. If both parties have independent public IP addresses in the public network, the caller and the called user exchange data directly through the challenge-response mechanism. If one party is located behind the private network or firewall, the private network party must first establish a TCP link with at least one Sn in the public network and then forward data by the Sn. If both parties are in a private network, the data of both parties must be forwarded by the Sn.
4.5 media transmission and status messages
If both parties are in the public network, both parties can use UDP packets for direct data exchange. The Skype voice packet size is usually 67 bytes, which is the net load of the UDP packet. For 100 Mbps Ethernet, 140 voice packets can be transmitted per second. Generally, the average bandwidth required for upstream and downstream voice transmission is 5 kbps. If either or both parties are in a private network, data exchange with the Sn is required through TCP, and SC acts as the Media Proxy Server, the size of a voice packet is usually 69 bytes. If possible, the UDP protocol is preferred for communication over Skype.
5. Conclusion
Skype is the first VoIP tool that uses P2P Technology for voice communication, providing better call quality. Skype can communicate seamlessly with each other through the firewall, which is easy to install and use. With the increasing popularity of the Internet. VoIP technology has been applied more and more. Some operators even began to cooperate with Skype to provide voice services, which is a new trend. It is worth studying how to ensure the core position of operators in traditional communication networks while new technologies are becoming increasingly popular.