Understand and Install VoIP System: Step by Step Instructions

Communication

VoIP technology has been around for many years now, and still spreading. It has been propelled by the advent of services like Skype and WhatsApp. Some telecom operators have even blocked some of these services on their networks so they won’t compete with the traditional phones.

Realizing that the technology has matured now, small and medium companies, in addition to larger ones, are trying to benefit and get the most of this technology. It is used to connect workers from home, freelancers or to communicate inside the company. VoIP devices can integrate easily with other communication media like email and instant messaging.

We will have a look, in this article, on the principles on which VoIP technology is based, and more interestingly how to understand and install a VoIP system in your company and take full advantage of it. But first of all, what exactly is VoIP?

What is VoIP?

VoIP stands for Voice over IP. It means the use of the Internet Protocol (IP), devised to transfer data, to carry voice for real time communications. Using the same protocol to both data and voice gives the opportunity for a more unified and integrated systems. You can this way get a voice message on the phone and open it in on your email.

In regards to the advantages of using VoIP phone systems for company’s communication systems, there are many of them, for example:

  • Less recurring fees and payments: If you are using the traditional phone system you will be paying bills in a monthly base, proportionally to the phone communications you make. This is different from the VoIP phones where you make an investment for purchasing and installing the system and do occasional maintenance operations. Your company can use its existing Local Area Network (LAN) to plug in the new hardware. Internal VoIP communications won’t leave your network and the outgoing communication will transit by your Internet line.
  • More phone features: VoIP phone systems are easy to monitor and control. You can, in one central place, view the status (in use, ready, ringing,…) and performances (data sent and received) of all the phones connected to the system.
  • Unified management for the information and communication systems: The same team or provider who assures that the company’s servers and computer network are up and running will assure your VoIP phone system is in a good status.
  • Control the Quality of Service (QoS) and security: Unified Threat Management (UTM) devices and firewalls used to protect your information system can be used to control and secure your VoIP phone communications. You can, for example, integrate the phone system to your Virtual Private Network (VPN) to encrypt the data and voice transferred between distant locations. If some malicious person intercept your communications, it will be difficult for him to understand them due to the encryption.

Those are just examples of how VoIP phone system can revamp your communication system. We will show, in this guide, how to set up and configure a VoIP system to integrate with your LAN, but before that we will present, in the next section, a deeper view on how VoIP communication are different from the older traditional phone system.

What are the differences between VoIP networks and traditional phone networks?

Differences in transmission

The traditional phone system is based on circuit switching, thus its technical name Public Switched Telephone Network (PSTN). A telephone call using a PSTN network goes in the following steps:

  1. The caller picks the handset and listen for the dial tone which indicates a connection between the phone and the PSTN operator.
  2. The caller dials the number of the phone he wishes to talk to.
  3. The call request is redirected via the PSTN operator’s switch to the phone requested. The call can transit via many switches before reaching the destination, depending on the distance between the two parties.
  4. The switches create a circuit between the two phones producing a ring tones on the phone being called.
  5. The receiver picks the phone’s handset and the communication can begin.
  6. When one of the two parties hangs up, freeing the circuit used to make the communication.

The PSTN works as if there was an electrical circuit between the two parties involved in the communication. Each communication has its own circuit that can’t be used by others. This circuit is opened (meaning there is no connection) when one hangs up the handset. There was a reserved cables for each communication, in the beginnings of the PSTN networks, many decades ago. The recent PSTN networks use an optic fiber to connect the switches and mix thousands of communications. However, the main principle remains as it was: a circuit for each communication.

The transmission rate in a PSTN communication is about 64 Kbs (8 KBs) in each direction. If the call duration is 10 minutes there would be 10 Mbs (64 Kbs in two directions for 10 minutes). It is worth mentioning here that the most percentage of this transmission capacity is wasted. The traditional phone system doesn’t differentiate between actual talking and silence, the transmission occurs in the two cases indifferently.

In the other hand, VoIP devices use a different switching mechanism called Packet switching, which is used in Internet to access Web pages, send emails and other services. We review the precedent call steps, but this time when using a VoIP system:

  1. When a VoIP phone receives the data from the acquisition device (handset, for example) it splits it in small packets and puts the destination address on each packet. The packets are then delivered to the nearest router. The device role in the transmission ends here.
  2. The router receives the packets and seeks, for each packet, the shortest path to the destination. The packet can transit by many routers before the final destination. Each router tries to optimize the path to deliver the packet rapidly.
  3. The packets reach their destination via different routes based on optimization done by the routers.
  4. The receiving VoIP phone uses addresses attached to each packet to reconstruct the correct order and produces the voice via the handset.

One of the advantages of using packet switching is freeing the VoIP phone from the task of persisting the circuit open. In a given moment the VoIP phone is either receiving or sending packets, reducing the transmission capacity needed by a factor of two.

The VoIP phones seek optimization in other areas like stopping sending packets when there are no voice to be packaged and using compressing algorithms to reduce the size needed to be transported.

This review should give you a good basis to understand how the wonderful world of VoIP works. However, we are not done yet. We will in the following sections show other comparisons to give you a comprehensive view of the system.

Voice acquisition

PSTN operators have introduced, in the last years, digital transmission in their networks. However, many parts of those networks still use Analogic transmission. This is especially true for the parts that are involved early in the circuit creation. The cables connected to the subscribers’ phones are grouped in what is called the concentrator which digitize the electrical signal, mix the connection and then transfer them on an optical fiber. A digitized signal is a signal which has only two states: 0 or 1. This is the type of signals used in data networks (such as Internet).

The digitization process begins from the first steps in the VoIP systems. The VoIP phone acquires the voice via the handset and digitize it via small, integrated modems (Contraction of Modulator-Demodulator). This is called the Modulation. When the contacted VoIP phone receives the digitized voice, it processes the signal in the reverse way to reconstruct the initial voice (Demodulation). The use of modems is coupled with codecs (Contraction of Coder Decoder) which are algorithms used to compress voice, and other data types, before the transmission.

The code samples the voice with a rate of 64000 samples per second. Each sample is then transformed into bits’ packets before being transferred. Humans can’t detect the differences between a voice the processed voice from the original one, due to the sampling rate. Some codecs use technics to eliminate disruptions which results in clear voices.

Mapping and addressing

Many companies use a communication center, just like PSTN operators, but with a far less extensions (phones in the company’s network). The main function of those centers, called Private Branch Exchanges (PBX) which are devices where all the phones inside the company are connected, is to coordinate the calls inside the company so that only the exterior calls are routed to the operator. The most recent PBXs offer features like calls between more than two participants, Interactive voice responder and other features.

The traditional PBX devices use the same principle behind the PSTN networks: circuit switching. If you run a PBX you will need an Uninterruptible Power Supply (UPS), unlike the phones directly connected to the PSTN operator.

The VoIP systems use a device called IPBX (or IP PBX, Internet Protocol PBX) which is a call center suited for IP networks. It offers the same features as a PBX, but for VoIP systems. The IPBX maps VoIP phones using the packet switching. It recognizes the VoIP devices attached to the network (PC, phones,…) and translate their numbers into IP addresses. In addition to mapping VoIP phones, many IPBXs have modules to integrate traditional phones, making possible to use the two systems in the same company.

Disadvantages of using VoIP phones

You should not consider VoIP systems as the perfect solution in all situations. The VoIP technology has its own drawbacks:

  • Dependence on the wall power. In the traditional system, the phones receive the electrical power directly from the PSTN operator, making communications possible while power interruptions. This is not the case with the VoIP phones where you have to ensure a complementary source of the energy.
  • Difficulties in calling the emergency. Many emergency centers use the PSTN calling center to decide which point of presence is more suitable to come in help. The VoIP communications use another path, which is difficult to localize.
  • Internet connection dependant. The outgoing VoIP calls (out your LAN) are affected by the Internet line reliability, just like other online services (Email, Web,…).
  • The VoIP devices, phones included, can be targeted by viruses and malicious programs. You have to ensure a good security policy (By using UTMs, for example).

Planning for a VoIP system

The first step, before deploying a VoIP system, is to ensure that your Internet connection can support the bandwidth needed for the VoIP phones. You can do this by estimating the maximum number of outgoing calls your company will be performing, you will need then a dedicated 64 Kbs for each call. If you are planning for 10 simultaneous outgoing calls, you will need 640 Kbs will be needed.

It is worth mentioning that the bandwidth we are talking about here is the up speed of your Internet connection. You will also need to count extra bandwidth for other online services (Email, Web,…). For internal calls (inside the company), the 100Mbs standard LANs are sufficient.

Once you are done with the bandwidth needed to deploy the system, comes the type of the VoIP system that suits the best your needs. There are, in general, three solutions to deploy a VoIP system.

VoIP software

This is the easiest solution, but with the one which has fewer features. The principle is simple: you subscribe to a VoIP online service, install its software on your smartphone or PC and begin to communicate with the people subscribed to the same service or with a PSTN or GSM phone. This is the best solution for the freelancers or the very small companies.

VoIP system hosted by a service provider

In this type, the VoIP system is run and maintained by a service provider in their local against a fixed monthly fees. The service providers offer software that can be installed on PC or smartphones, making possible the purchase of VoIP phones unnecessary. You have, if you opt for a no-phone system, to make sure the PCs are powerful enough to make phone calls in parallel to other tasks (office applications for example).

Many service providers have a gateway that connects your existing traditional phone system, if you have one, to the VoIP system hosted by the service provider; so you can use the existing phones.

A hosted VoIP system is appropriate for companies relying on employees working from their homes. The hosted VoIP system is billed by the subscriber and is suitable for small and medium companies (about 15 users).

Self-hosted VoIP system

In a self-hosted VoIP system, the company is in total charge of the system: it purchases all the devices necessary to deploy the system, especially the IPBX, and take care of the configuration. In this case, you have a lot more flexibility. The first investment can be significant, but unlike other options where you have to pay monthly fees, a self-hosted system is a one-time payment plus occasional maintenance operations. May be you will have to train your technical staff on maintaining a VoIP system.

A self-hosted VoIP system is appropriate if you have, or will have, many users and don’t wish to pay for every new user.

The system privacy is another important factor for using a self-hosted system, where you are in total control of your data.

Hardware and cabling

The hardware you need depends on what type of VoIP systems you have chosen:

  • There will be no extra hardware, beside PCs or smartphones, if you opt for a software solution or a VoIP system hosted by a service provider with no traditional phones.
  • If you choose a hosted system and still want to use your existing traditional phones, you will need a gateway that your hosted provider offers.
  • If a self-hosted system suits the best your needs, you will need an IPBX device and VoIP phones.

We will, in the next section, explain how to connect the different parts of a self-hosted solution.

Cabling

There are three types of cables in a VoIP phone:

  • The handset cord, called an RJ 9 cable. It is used to connect the handset, where you hear voices, with the phone. Those cables are specially shielded so that you can expand and yank on them.
  • Ethernet cables, called RJ 45 cables. The Ethernet cables are used to connect the VoIP phones to the local network. These cables are the same used to connect another computer network device; like PCs, routers,… etc.
  • Line cords, called RJ 11 cables. The line cords are similar to the Ethernet cables, but they are smaller and have less pins inside them. The line cords may seem identical to Ethernet cables at the first glance. However, while Ethernet cables have 8 pins, the line cords have 4, sometime just 2.

You can easily differentiate the three types: the handset cables are crispy and have very small heads (connectors), the line cords are flat with small connectors and the Ethernet cables have large connectors.

voip-phone-cables-en

Some VoIP phones are designed to work only in a VoIP environment. In this case, there will be only two of the three cable types: RJ 45 and RJ 9. For the VoIP phones designed for traditional and VoIP systems alike, all three types will be present.

Cabling plan

The next diagram illustrates the connection scheme between the different parts of the system.

voip-network-diagram-en

An Ethernet cable is used to connect the IPBX to the router, directly or via a wall jack. The VoIP phones are connected to the router using the same type of cables. You can connect traditional phones, if you want to use them, to the IPBX via line cords (RJ 11).

You can also use small boxes called ATA (Analogic Telephone Adapter) to connect the traditional phones to the system. The diagram becomes in this case like the following

voip-network-diagram-ata-en

Configuring and setting up a self-hosted VoIP system

We will be configuring in this guide a VoIP system that has the following properties:

  • VoIP phones are used to communicate inside the company.
  • The outgoing calls (going outside the company) use the PSTN or a VoIP service provider.
  • The employees inside the company can receive calls from the outside, via the PSTN or a VoIP service provider.

We will need, to realize this configuration:

  • An IPBX to manage the calls,
  • VoIP phones

There is a plenty of choice available for the IPBX. Our choice is to use CooVox from the Chinese manufacturer Zycoo. It is a flexible and easy to use IPBX. The CooVox series has the same management interface, but you have the choice of the ports and modules depending on your needs. The CooVox IPBX can manage any model of VoIP phones without problems. We will be using the Zycoo CooFone D30. There is no absolute need to the VoIP phones, you can use your existing PCs and install a software that supports the SIP protocol on them. The Session Initiation Protocol (SIP) is used by the IPBX to manage clients (VoIP phones, software,…).

Setting Up Your VoIP Device.

zycoo-coovox-u100

Setting up the IPBX

The first thing we have to do is set up the IPBX to be able to manage our communications system. The CooVox IPBX Web interface is accessible at the address 192.168.1.100:9999. We use a Windows 10 computer to access the IPBX.

Begin by editing the Windows network settings so it matches the IPBX address. To do so, go to Control panel, choose Network and Sharing Center and click on Change adapter settings on the left.

01_windows_sharing_center

Right click on Ethernet to display a contextual menu. Choose Properties from that menu to open the properties window. Double click TCP/IPv4 option in the properties window.

The TCP/IPv4 window is used to enter the IP address, the network address and the gateway address. Those addresses have to be chosen in the 192.168.1.0/24 range, like in the image below.

02_windows_ip_settings

The settings above aim to make contacting the CooVox IPBX possible. You can alter them once you have finished with the IPBX configuration.

The Zycoo CooVox is now in the same range with our PC. We can begin configuring the device to manage our VoIP phones and devices.

Preparing the CooVox IPBX

We begin by displaying the Web interface by entering the address 192.168.1.100:9999 in a Web browser (like Mozilla Firefox or Google Chrome). We get the following interface.

01_ipbx_login

The Web interface prompts us to enter the admin username and its password. The default admin username is admin and its default password is also admin. We are then prompted to change the default admin password, for security reasons.

Changing the default password

Go to the System menu located in the side menu bar and choose the Management sub-menu. Enter the default password (admin) then a new password and confirm it.

02_ipbx_change_password

A message confirming that the password will be displayed. You will then be prompted to enter the username (admin) and the new password.

The next step is to configure the IPBX IP address to be in the range of your local network.

Changing the default IP address of the IPBX

Click on the Network settings menu on the side menu bar, then choose the Network sub-menu. The next interface is then displayed.

03_ipbx_change_ip

Our existing network range is 192.168.2.0/24, the IPBX address will be changed to be in this range. We choose 192.168.2.115 for the CooVox IP address. Our gateway is reachable via the address 192.168.2.1.

A confirmation message will then be displayed. The CooVox IPBX will reboot so the new configuration takes effect. The IPBX will, after the reboot, be accessible at the address 192.168.2.115:9999. Make sure that your computer can access the new address. You should change the network settings on your computer to reflect the changes.

Testing the connection

We must check that the IPBX can contact the rest of our network. For that, we access the IPBX on its new IP address 192.168.2.115:9999, go to the Network settings menu then choose the Troubleshooting sub-menu. We enter the network gateway address (192.168.1 in our example) and hit the run button to begin the test.

04_ipbx_test_connectivity

The results will be displayed in the bottom of the page. The IPBX has to be able to reach the gateway, so we can confirm it can be contacted.

Time settings

The IPBX time is useful for exploring the events log, so we have to make sure it is in the right format. Go to the System menu and click Time settings. Choose from the drop-down menu your Timezone. Save the changes and activate them by hitting the Yes button in the pop-up menu. The CooVox will be rebooted.

Our IPBX is now prepared to add new VoIP phones to its lists and manage our calls. The next tasks are adding new VoIP phones and managing them.

VoIP phones management in the CooVox IPBX

The CooVox IPBX treats the VoIP phones as user accounts. Adding a VoIP to the system is synonymous to creating an account for it on the IPBX. We must create an account for each VoIP phone that we plan to use.

The VoIP phone registration process is divided in two steps:

  • The first step is to create an account for the phone on the IPBX.
  • The second step is to connect the phone and configure it to contact the IPBX using the account created.

Creation of the account

Log in to the IPBX web interface. Go to the Basic menu and choose the Extensions sub-menu. A list of 10 accounts will be displayed, those accounts are configured by default. You can use them if you want. We will add a new account.

Click on the New user button to display the following window.

05_ipbx_new_user

We have to enter the following information:

  • The protocol used to manage the phone.There are two choices: SIP, which is selected by default and AIX. The AIX protocol is listed for compatibility reasons and used only with the Asterix devices. We select the SIP.
  • A phone name: This is the name that will be displayed in the monitoring interface. It is preferable to use a distinctive name, like the person who will be using the phone or the office where it will be located.
  • The extension is the phone number. It has to be unique in the system.
  • The password.
  • The Outbound Caller identifier (CID). The name that will be displayed on the phone receiving a call from this one.
  • A dial plan. A dial plan is a set of rules that define what the VoIP phones can do. In the default dial plan, named DialPlan1, the phones can only make calls to the phones registered in the IPBX, meaning that this dial plan prevents users from calling phones outside the company. We will see later how to create a dial plan.
  • A traditional phone port. If the account you are configuring is not a VoIP phone you can connect it to the IPBX via an appropriate port. The ports available will be listed here.
  • The voice mail. You can enable the voic email option for this phone here. Click the enable button and enter the mail that will receive the voice file. Don’t forget to change the default voice mail password (1234) to be more secure.

Save the changes via the Save button, then activate them by clicking activate changes.

We will move now to the phone.

Configuring the CooFone D30

We begin by connecting the handset to the phone via the RJ 9 cable and plugging it into the wall power, then we use the RJ 45 cable to connect the phone to the network.

We will configure the phone to get an IP address automatically from the network. To do so, press the Menu button on the phone, choose Settings > Advanced Settings. You will be prompted to enter a password. The default password is 123. Choose then Network > WAN Settings > Connection mode and choose DHCP. Confirm the option by pressing the Save button. Return to the main screen by pressing the Back button until the main screen is displayed. The phone will get a new IP address in a few moments, note this address and enter it in a computer connected to the same network. The Phone web interface will be displayed.

01_phone_login

The goal of this step is to configure the phone to use the just created account to contact the IPBX. We choose the Wizard tab in the phone Web interface.

02_phone_wizard

Select the DHCP option, then click Next to configure the SIP.

03_phone_wizard_sip

Define in the SIP configuration page:

  • The Server address and port. This is the address of the IPBX (192.168.2.115 in our example). The port is by default 5060.
  • The authentication and SIP user. This is the account identifier.
  • The account password.

Click Next. A page resuming the configuration will be displayed. Review it and when it is fine click on Finish.

Configuring the outgoing calls

The default dial plan, as mentioned earlier, doesn’t authorize the phones to make outgoing calls. We will define, in this section of the guide, a new dial plan that authorizes users to call a phone outside the company. We must set up the outgoing redirections before defining the dial plan.

Go to Basic > Trunks to edit the outgoing redirections. There are three types of trunks:

  • VoIP trunks. This type is used to redirect the outgoing calls via another VoIP network.
  • FXO/GSM trunks. Choose this type if you want to make the outgoing calls using a PSTN line.
  • E1/T1 trunks. This is the less used type. Use trunk if you have an E1 or T1 line (E1 and T1 are a type of digital transmission networks that use optical fibers).

Redirecting outgoing calls to a VoIP provider

Go to Basic > Trunks and choose the type of trunk (VoIP trunk) then click New VoIP trunk.

06_ipbx_voip_trunk

Give in the new window:

  • A description of the trunk.
  • The protocol used in the trunk (SIP or AIX).
  • The hostname given by the VoIP provider.
  • The maximum number of simultaneous calls. 0 means no limit.
  • A prefix to be added automatically to the called phone numbers.
  • The caller identifier that will be displayed on the receiving phone via this trunk.
  • Your subscription information (Account username and the password).

Save the configuration and activate it.

Redirecting outgoing calls to the PSTN line.

Choose FXO/GSM Trunks in the Basic > Trunks menu, then click on New FXO/GSM trunk.

07_ipbx_fxo_trunk

Select in this window the PSTN lines that you want to use for this trunk. The available lines will be shown here. Remember that you cannot use a line for many trunks.

Configuring the outbound routes

The outbound routes define one or more trunks to be used when a VoIP phone managed by the IPBX call an outside phone. You will not need to configure the outbound routes if you use the IPBX only for inside calls.

Our aim of this section to give all the employees the possibility to call the outside. We will edit the default plan (DialPlan1) and authorize our VoIP phones to call the outside via a PSTN line.

Each dial plan is composed from one or more rules, called dial rules. Editing a dial plan means adding or removing the dial rules. We will create a new dial rule that redirects the outgoing calls to our PSTN line.

Go to the Basic > Outbound routes menu. You will see the DialPlan1 with an edit button. There will be a button named DialRules, click on it, then click New Dialrule.

08_ipbx_new_rule

Give, in the New Dialrule window:

  • A name for the rule. It must be unique.
  • The maximum call duration (in minutes). The call will be terminated if it exceeds this value.
  • A time rule to limit the use of the dial rule to the working hours.
  • The trunks you want to use for this rule (Place this call through).
  • A custom pattern. It indicates to the system what are the calls this rule is applied to. If you enter “7.” this will mean that this rule is to be applied to all calls requesting a phone number that begins with 7.
  • How many numbers you want to be removed from the dialled phone number. If you put 1 this means that the first digit in the phone number will be removed before sending the call to the trunk. Thus, if one employee dials “25676987” it will be transformed by this rule to “5676987” which will be then called via the selected trunk. This is used with the custom pattern, in many companies to apply a policy like “if you want to call an outside number add 7 before it”.

Save the changes and then activate them.

We return to the dial plans (DialPlans button) and edit the DialPlan1.

09_ipbx_edit_dialplan

Select the rule we created previously from the left box to include in the dial plan rules.

Save and activate the changes.

We are done now with the outgoing calls. The next thing we have to look to is receiving calls from the outside.

Inbound calls

There are many options in the Zycoo CooVox to define how to deal with the coming calls. You can, for example, redirect them to a special VoIP phone or create an interactive voice responder to redirect them based on their choice.

Configuring an Interactive Voice Responder

The Interactive Voice Responders (IVRs) are widely used in the companies phone systems. They intercept the coming call, give the caller a list of choices (the company’s services, for example) and redirect the caller to the person of his choice.

Go to Inbound control > Inbound routes, you will see a drop-down list named Destination. Choose Goto IVR from this list and select the name of the IVR.

10_ipbx_inbound_ivr

There are by default two IVRs named Working time and Closed time. The first is to be used for responding to calls coming in the working time and the second is to be used outside the working time. The IVRs are defined in the IVR menu.

We will modify the working time IVR and customize it by editing the voice message that welcome the coming call.

11_ipbx_edit_ivr

Click on the Edit button in front of the IVR working time.

12_ipbx_edit_ivr

You can use this window to change the name of the IVR, its identifier, …etc. The Keypress events decide what will occur when the caller press a number on its phone while listening to the IVR voice message. You can define an event for each key. If you like to redirect the call to the extension 810 choose Goto Extension in the dropdown list and enter the phone number (810).

The default voice of the responder is named welcome, you can customize it by clicking on Custom prompts in the Welcome message section. A new page named IVR prompts will be displayed.

There are by default two voice prompts: welcome which is used for the working time IVR and the second is used for the closed time IVR.

You have two choices for defining the voice prompt: upload a voice file or record a new one using one of the VoIP phones in your network. To upload a new file, click on Upload IVR Prompts in the IVR prompts page. If you don’t have an existing voice file you can click on New voice button to record a new one.

13_ipbx_edit_ivr_prompt

Give a name for the record and enter the phone number you will be using for the recording. Click the Record button, the phone you have chosen will start ringing. Take the handset and start recording.

Return to the Working time IVR and select the message you just recorded.

Defining time rules for the incoming calls

The time rules define a set of conditions that decide what to do based on the time of the incoming call. Defining what IVR to use based on working/closed time is an example of time rules. The time rules are located in Inbound control > Time based rules.

14_ipbx_time_rule

A time rule named TimeRule is by default configured. TimeRule defines working time to be Monday through Sunday, from 9 AM to 6 PM. The destination section decides what to do. If the time of the call is in the TimeRule range it will be redirected to the IVR working time, else it will be redirected to the closed time IVR.


 

548