Bookmark and Share



VoIP 2020

VoIP.png

VoIP (Voice over IP)

3 Flavors of VoIP
  • Analog Telephone Adaptor (ATA): The simplest and most common way.
    The ATA allows us to connect a standard phone to our Internet connection for use with VoIP.
    The ATA is an analog-to-digital converter.
    It takes the analog signal from phone and converts it into digital data for transmission over the Internet. We simply take the ATA out of the box, plug the cable from our phone that would normally go in the wall socket into the ATA, and we're ready to make VoIP calls.
  • IP Phones: hardphone These specialized phones look just like normal phones with a handset, cradle and buttons, however, instead of having the standard RJ-11 phone connectors, IP phones have an RJ-45 Ethernet connector.
    IP phones connect directly to our router and have all the hardware and software necessary right onboard to handle the IP call. Wi-Fi phones allow subscribing callers to make VoIP calls from any Wi-Fi hot spot.
  • Computer-to-computer : softphone
  • - This is certainly the easiest way to use VoIP.
    We don't even have to pay for long-distance calls. There are several companies offering free or very low-cost software that we can use for this type of VoIP. All we need is the software, a microphone, speakers, a sound card and an Internet connection. This softphone is client software that loads the VoIP service onto your desktop or laptop.



SIP (Session Initiation Protocol)

SIP (Session Initiation Protocol) is a VoIP signaling protocol. As its name suggests, it has everything to do with setting up sessions, which means it has the responsibility for starting a session after you dial a number (or double-click, in some cases). As such, SIP's role also includes maintaining user registrations with a server, defining session routing, handling various error scenarios, and, of course, modifying and tearing down sessions.

Signalling for call control:

  • Like http, SIP uses simple method/response codes
  • It runs on UDP or TCP
  • SIP proxy servers and registrar provide mobility

The following two articles from arstechnica.com explains SIP in depth.

VoIP in-depth: An introduction to the SIP protocol, Part 1.

Wired for sound: how SIP won the VoIP protocol wars.

Or, we can get additional info from wiki.



VoIP Servers

Open Source VoIP servers and proxies

A SIP (Session Initiation Protocol) proxy/registrar is an essential part of a VoIP network. Today I will focus on all Open Source available solutions for deploying SIP proxies. Some proxies are useful for beating NAT by rewriting IP addresses in SIP messages, some proxies are useful as security tools and some of them act as registrar proxies which are the most important part of a VoIP network.

  • Asterisk PBX
    Asterisk is software that turns an ordinary computer into a voice communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and more. It is used by small businesses, large businesses, call centers, carriers and governments worldwide. Asterisk is free and open source. Asterisk is sponsored by Digium. It can be used as registrar.

  • OpenSIPS
    OpenSIPS (Open SIP Server) is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities. OpenSIPS, as a SIP server, is the core component of any SIP-based VoIP solution. With a very flexible and customizable routing engine, OpenSIPS 'unifies voice, video, IM and presence services in a highly efficient way, thanks to its scalable (modular) design. What OpenSIPS has to offer, comes in a reliable and high-performance flavour - OpenSIPS is one of the fastest SIP servers, with a throughput that confirms it as a solution up to enterprise or carrier-grade class.

VoIP Phones
  • Hardphone
    • Dedicated VoIP phones connect directly to the IP network using technologies such as wired Ethernet or wireless Wi-Fi. As discussed in the later section, for compatibility, we need to get phones using SIP protocol instead of the phones using proprietary protocol.
    • An analog telephone adapter is a device that connects to the network and implements the electronics and firmware to operate a conventional analog telephone attached through a modular phone jack. Some residential Internet gateways and cable modems have this function built in.
  • A softphone is application software installed on a computer. The application typically presents a dial pad and display field to the user to operate the application by mouse clicks or keyboard input.


  • Yate is one of the SIP software for client VoIP, and the pictures below are from the one that I built on my Fedora 18 machine.
    Here is the C++ VoIP source code for Linux: yate-4.3.0-1.tar.gz or we can get it directly from Yate
    Building process is quite straight forward:
    • ./configure
    • make
    • make install
    • add /usr/local/lib to /etc/ld.so.conf file
    Later, I'll post some key portions of VoIP source code (C++).

    Yate_VoIP_Client_Account.png

    yate_VoIP_client.png

    Actually, I tried other open source VoIP clients but no luck with them:
    • Twinkle Phone: this is too old, lots of installing issues.
    • KPhone: I was very close on this one, but it has some issues with Advanced Linux Sound Architecture (ALSA) pcm references.

Gateway

Gateway can be used to interface a SIP network to other networks, such as the public switched telephone network, which use different protocols or technologies.


Protocols
  • Session Initiation Protocol (SIP)
    We need to get a phone using SIP protocol instead of proprietary phone such as Skype which is using Proprietary P2P protocol. Actually, there are lots of manufacturers using the SIP protocol.
    SIP is an application layer protocol designed to be independent of the underlying transport layer; it can run on Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or Stream Control Transmission Protocol (SCTP).[1] It is a text-based protocol, incorporating many elements of the Hypertext Transfer Protocol (HTTP) and the Simple Mail Transfer Protocol (SMTP).

How analog audio is turned into packets for VoIP transmission? Codecs.

A codec (coder-decoder), converts an audio signal into compressed digital form for transmission by sampling the audio signal several thousand times per second, and then back into an uncompressed audio signal for replay.

Codec determines the quality of the sound and the bandwidth usage.

VoIP server comes with codec either proprietary or open source version.

Codecs use advanced algorithms to help sample, sort, compress and packetize audio data.
The CS-ACELP (Conjugate-Structure Algebraic-Code-Excited Linear Prediction) algorithm is one of the most prevalent algorithms in VoIP. CS-ACELP organizes and streamlines the available bandwidth.




Network Latency

Latency is very important for Voip, this will determine the time that will take for the data package transmission to reach the destination. A high latency will lead to a delay and echoes in the communication.

Since we're using computers with VoIP, our bandwidth starts to see bandwidth constricted. So, we need to prioritize the communication. Latency is measured in milliseconds (ms) Normal latency for telephone calls is 45ms. For VoIP, it's usually 75-200ms. A latency of 150ms is barely noticeable so is acceptable. Higher than that, quality starts to suffer. When it gets higher than 300 ms, it becomes unacceptable.



Unified Communications

VoIP solutions aimed at businesses have evolved into unified communications services that treat all communications - phone calls, faxes, voice mail, email, Web conferences and more - as discrete units that can all be delivered via any means and to any handset, including cellphones.




VoIP Call Monitoring

The source of this section is http://computer.howstuffworks.com/ip-telephony8.htm.

VoIP has its distinct advantages and disadvantages.
The greatest advantage of VoIP is price and the greatest disadvantage is call quality. For businesses who deploy VoIP phone networks - particularly those who operate busy call centers (customer service, tech support, telemarketing, etc.) - call quality issues are both inevitable and unacceptable. To analyze and fix call quality issues, most of these businesses use a technique called VoIP call monitoring (aka quality monitoring (QM)).

Call monitoring hardware and software uses various mathematical algorithms to measure the quality of a VoIP call and generate a score. The most common score is called the MOS(Mean Opinion Score). The MOS is measured on a scale of one to five, although 4.4 is technically the highest score possible on a VoIP network. An MOS of 3.5 or above is considered a "good call".

To come up with the MOS, call monitoring hardware and software analyzes several different call quality parameters, the most common being:

  • Latency
    This is the time delay between two ends of a VoIP phone conversation. It can be measured either one-way or round trip. Round-trip latency contributes to the talk-over effect experienced during bad VoIP calls, where people end up talking over each other because they think the other person has stopped speaking. A round-trip latency of over 300 millisecond is considered poor.
  • Jitter
    Jitter is latency caused by packets arriving late or in the wrong order. Most VoIP networks try to get rid of jitter with something called a jitter buffer that collects packets in small groups, puts them in the right order and delivers them to the end user all at once. VoIP callers will notice a jitter of 50 msec or greater.
  • Packet loss
    Part of the problem with a jitter buffer is that sometimes it gets overloaded and late-arriving packets get dropped or lost. Sometimes the packets will get lost sporadically throughout a conversation (random loss) and sometimes whole sentences will get dropped (bursty loss). Packet loss is measured as a percentage of lost packets to received packets.



More to come...




TongYoung4