TEL 500 WRITE UP WEEK 8 FREE PBX SIP LAB SUBMITTED TO: PROF. RONNY BULL BY: ANUSHA ALIGAPALLY DATE: 11/05/2014
ABSTRACT: Private Branch Exchange has multiple phones connected to it which are in the same subnet. In this lab, we are going to create SIP extensions and use the soft phones and hard phones to test them. PROCEDURE: 1. Setup networking on second VM with Free PBX The second virtual machine is created in the web portal and can be accessed by the link http:xen-web.cs.sunyit.edu. When we open the link it asks for username and password. We have to enter the details correctly in order to open the web portal where the virtual machines are present. The second virtual machine is turned on and consoled. When we console the virtual machine it opens a new window which displays as below. In this window we have to enter our login as root and password as CaptainCrunch. The setup command is entered in the above window, which in turn displays a new screen as below. In this screen we can choose the required tool which we want to setup. Let us select network configuration tool from the tools mentioned.
After selecting network configuration, it displays the following screen. Here we have to select Device configuration action. We have to select the device configuration from the above screen. The below screen is displayed where we have to choose eth0 (eth0) -Ethernet device from it.
This opens a network configuration setup, here we can make changes to Static IP, Net mask, Default gateway IP and Primary DNS server. The screen after the changes is displayed as below. After making doing the network configuration, we have to do the DNS configuration. The host name and Primary DNS can be changed in this setup. The screen after the changes is displayed below.
To save all the changes made to the devices, we have to reboot the virtual machine and close the tab. 2. Free PBX installation The AsteriskNOW virtual machine with Free PBX is pre-installed and there is no necesity to update it or pre-configure it. The free PBX is installed in such a way that we can access it by enetring our server s IP address in the web portal. 3. Setting up SIP extensions with hard and softphones in Free PBX. To connect different phones to the system, we have to setup SIP extenisons on our AsteriskNow virtual machine. For that, the virtual machine must be turned on and consoled. To access the FreePBX we have to enter our IP address in the web portal and choose FreePBX Administration from the options.
To login into it we have to enter the user as admin and password as CaptainCrunch. Once we are logged in we can see different menu items as below.
To add an extension, go to Applications Extensions. The screen after selecting extensions will be proceeding to add an extension page. The new extensions are used by SIP devices on our Asterisk PBX phone system. Select Generic SIP Device as we are dealing with SIP protocol and click on submit. This takes us to other page where we can add SIP extension. The details in this page can be broken into sections or steps. The changes made in this page are as follows. Add extensions: In this step, we have to give our user extension and display name. The user extension can be 3-4 digits and the display name can be characters. User Extension= 7002 Display name= aligapa3
Device options: In this step, we have to mention secret password. My secret password is aligapa19. The secret password should be alphanumeric. This password is used to setup the soft phone and hard phone. The dtmfmode and nat are left default. Voicemail: In this step, we have to enable the status and the email attachment is turned to yes. The voicemail password and email address should me mentioned and the other options can be left default. The voicemail password should be only numeric so that it will be easy to enter our password from phone dial pad Status= Enabled Voicemail Password=190692 Email address= aligapa@sunyit.edu Email attachment= Yes
The email address is given to obtain an email alert when we have a new voicemail message which is as follows. After making the above changes, click on submit which is at the bottom of the page to add the extension. To apply all the changes click on Apply Config which is at the top of the page. Now we have to create 3 more SIP extensions by using the above procedure. Totally, we have to create 4 SIP extensions as below to make calls between the hard phones and soft phones. 4. Testing To make the calls between the hard phones and soft phones, we have to first set the phones. We can use either X-Lite or Ekiga for soft phones. As X-Lite has expired, I have used Ekiga which is
already installed in the system. To configure the soft phone, open Ekiga and click on Edit Account settings. It opens another window Edit account. In this we can edit our details which are as follows.
After editing the account, it registers and is displayed as below. If we want to add more accounts, go to Accounts Add SIP account. Now we have to even set a hard phone to make the calls. To setup hard phone we have to configure IP address, SIP user account and password. When both soft phone and hard phone are configured, we have to open VM Console tab. Once, we open it, we have to login into it. The login is root and password is CaptainCrunch.
To connect it to asterisk we can to use the command cd /etc/asterisk. To enter into asterisk CLI, we can use asterisk r command. To verify that our phones are registered or not we have to enter sip show peers in asterisk CLI. In the figure, one hard phone and one soft phone are registered and so it displayed as 2 online. The output of the sip show peers is the number of phones which are connected. This is the reason why sip show peers is so useful. To check whether the phones are connected successfully or not we can dial the extensions *97 and *98 to access our voicemail. It is also a good way of verifying the working of the phones. When we dial each extension, each of it have different features. *97: Using this extension, we can connect to the voicemail of particular phone from which we are dialing and so asks the password of it. *98: Using this extension, we can get access to voicemail box of any extension within the system and so asks for the login ID as well as password.
Now we have to make the calls between the extensions and verify that the sound can pass to and from the both ends of the call. Keep one of the phone on hold and listen to the music and try it with the other phone also. 5. Comparison of sip.conf and extension.conf config files on both of our virtual machines. In CLI server, the extensions.conf file is configured by us i.e, we have to dump the code into the file. Also, we have to specify the MAC address, voicemail box number and password in sip.conf file. These all are given by using keyboard. This process is similar to the CUI (Character user interface). In web server, the extensions.conf is pre-configured. The data will be taken from other files during the execution. The sip.conf files are to be set up in Free PBX. These are done using the web interface on the computer. This process is similar to the GUI (Graphical user interfeace)
6. Comparison of contents of /etc/asterisk on both virtual machines In CLI server, when we are connected to the asterisk and enter ls to check the list of contents, we can see the list of files which we have created by using touch filename.conf. In web server when we check the list of contents in asterisk by typing ls, it displays all the files which are present in that server. 7. Differences between the two servers The CLI server is the server which is created by us. It does not have any web interface. But, the web server is pre-defined and has web interface.
CONCLUSION: Using PBX, I have successfully created the sip extensions and also tested them by configuring hard phones and soft phones.