linux telephony

19
Linux Telephony Voice over IP with Asterisk Ryan Ellingson Herzing University 3/6/15

Upload: ryan-ellingson

Post on 07-Aug-2015

22 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Linux Telephony

Voice over IP with Asterisk

Ryan Ellingson Herzing University 3/6/15

Page 2: Linux Telephony

Table of ContentsI. Executive Summary..............................................................2

II. Project Planning...................................................................3

Network Diagram

Technical Planning

Server Specifications

Linux Client Specifications

Windows Client Specifications

III. Implementation....................................................................5

Installation of Asterisk

Installation of Centos

Installation of Windows 7

Asterisk Web Interface

IV. VOIP Plan Test....................................................................13

V. Conclusion..........................................................................16

VI. Appendix.............................................................................17

1

Page 3: Linux Telephony

Executive Summary

Making calls is often times very expensive for companies. Many companies are switching to VOIP systems that often times cost less money or nothing at all. VOIP offers more than simple calling, but all sorts of modules like messaging, Google Voice plugins, voicemail, and much more. Implementing systems, such as Asterisk is a completely free and easy to configure solution that will reduce costs for any business. It also adds a simple and user-friendly way to make calls between clients both internally on your network and externally on other networks, which helps in cutting down on training time. With Asterisk, you do not need to worry about which operating system your clients use, as long as you can download a softphone to the client and connect to the Asterisk Server.

Project Planning

For this project, a basic understanding of VOIP (Voice Over IP) is required. Also note that a basic understanding of network layouts is necessary. Some common terms mentioned are:Trunk – Pre-defined extensionExtension – (For purposes of this project) The number used to reach a certain clientSIP – Session Initiation ProtocolSoftphone – A software program for making telephone calls over the InternetThis project is manageable on both a large-scale network, a small-scale network, or for testing purposes on a virtual machine without any notable issues.

Network Diagram

Page 4: Linux Telephony

Technical PlanningThe following specifications were used as part of the technical planning of the project entities. These include servers and client workstations. For this project, make 2 Asterisk servers, 2 Linux (Centos) clients, and 2 Windows (7) clients.

Server SpecificationsOperating System AsteriskNow 1.8Memory 1 GBHard Disk 8 GBNetwork Cards 2 NICs (Internal & External)

Figure 2 Server Specifications

Linux Client SpecificationsOperating System Centos 5.6Memory 1 GBHard Disk 20 GBNetwork Cards 1 NIC

Figure 3 Linux Client Specifications

Windows Client SpecificationsOperating System Windows 7Memory 2 GBHard Disk 20 GBNetwork Cards 1 NIC

Figure 4 Windows Client Specifications

-

3

Page 5: Linux Telephony

Implementation

Implementation (for the purpose of this project) was done on VMware Workstation 10.0.1. Depending on the size of the network, the time that implementation will take will vary.

Installation of AsteriskWhen installing Asterisk, be sure to have 2 NICs already in the machine.There will be a prompt for which version of Asterisk the user wants to install. It is important to select FreePBX 5.211.65 with Asterisk 1.8 Full Install.

Figure 5 Choosing Which Asterisk To Install

When prompted which Network Card you want to set up, select the second one and configure it with your internal network specifications.

-

4

Page 6: Linux Telephony

Figure 6 Setting IP's

Once fully installed, open /etc/sysconfig/network-scripts/ifcfg-eth0 in either vi or nano. Make sure that the MAC address is the same as the MAC address on your first NIC. Configure the IP Address, Network Mask, and Gateway to be public. Next, make sure you can ping 8.8.8.8. If you cannot, make sure to go back and check your configurations. Once you can ping 8.8.8.8, reboot your machine. When the Asterisk server starts again, it will install an update for all of its modules.

Installation of CentosInstall Centos like normal. Set a user and root password. Make sure to write them down so you will not forget them. On Centos, for this project, Ekiga is the softphone of choice. Any softphone with SIP capabilities should work fine though. Ekiga comes pre-installed on Centos.

Installation of Windows 7Install Windows 7 like normal. Set a user and password. Make sure to write them down so you will not forget it. On Windows 7, for this project, X-Lite is the softphone of choice. Any softphone with SIP capabilities should work fine though. X-Lite is not pre-installed on Windows 7, so you will have to download it (for free) from their website.

Asterisk Web Interface

First, make sure your workstation is set to connect to the second NIC on your Asterisk machine. Once done, open the browser on any machine on the internal network, and type in the IP Address of Asterisk machine. This will bring you to the Asterisk Web Interface.

-

5

Page 7: Linux Telephony

Figure 7 Asterisk Web GUI

Click on FreePBX Administration. You will be prompted to make an account. Once the account is made and you are signed in, you will be brought to a web interface that give a quick look (with customizable modules) at your Asterisk machine.

Figure 8 System Status

First, you will need to add a user. At the top of the page, click Admin. Under that, click “User Management”. Once opened, you will want to add a user. Create the Login Name and Password. Leave everything else blank. Make sure “none” is selected for Linked Extensions.

-

6

Page 8: Linux Telephony

Figure 9 User Settings

Next, click Connectivity at the top of the page. Then click on one of the sub-categories called “Trunk”. Once opened, you will want to add a SIP Trunk. Give the Trunk a name and leave all the other options under General Settings blank.

Figure 10 Editing SIP Trunk

Go down to Outgoing Settings. Copy the information in Figure 7 for your first Asterisk Machine. (Be sure to change the host, username, and fromuser configuration accordingly when configuring your second Asterisk machine.)

-

7

Page 9: Linux Telephony

Figure 11 Outgoing Settings

For Incoming Settings, copy the configuration shown in Figure 8. (Be sure to change the User Context accordingly to which machine your are doing the configurations on.)

As for the registered string, be sure to copy the configuration shown in Figure 8. (Be sure to change the User Context accordingly to which machine your are doing the configurations on.)

Figure 12 Incoming Settings

Next, under Connectivity at the top of the page, click on “Outbound Routes”. You will want to add a route. For the Route Name, be sure to set a name accordingly to the Trunk you made in the previous step.

-

8

Page 10: Linux Telephony

Figure 13 Router Settings

Scroll down to set the extension route. In this project, we are limiting it to a 3 number pattern with a single digit for a prefix. Follow the example in Figure 10. Lastly, be sure to set the Trunk Sequence for Matched Routes to the trunk you previously made.

Figure 14 Setting Dial Patterns

For the last part in the Asterisk Web Interface, under Applications at the top of the page, click “Extensions”. We want to create 2 extension (one for each workstation). Create the Display Name and SIP Alias (as shown in Figure 11). Set a secret (password) so you can log in to the account with a softphone.

Figure 15 Setting Display Alias

-

9

Page 11: Linux Telephony

Once all the configurations have been done on the Asterisk Web Interface (by clicking the apply configuration button at the top of the page), restart the Asterisk server to make sure all the configurations have been applied.

Softphone Setup (Ekiga)

Once the application is opened, go to Account Settings. Add the account for one of the extensions created previously. Be sure to set the Registrar to the internal IP of the Asterisk Server. Once these settings are filled out, click the check box, and make sure the account is registered with the Asterisk Server.

Figure 16 Softphone Setup (Ekiga)

Softphone Setup (X-Lite)

Once the application is opened, go to Account Settings. Fill out the settings with the extension created previously on the Asterisk Web Interface. Set the Domain to the internal IP of the Asterisk Server. Make sure the account is verified in order to place calls.

-

10

Page 12: Linux Telephony

Figure 17 Softphone Setup (X-Lite)

-

11

Page 13: Linux Telephony

VOIP Plan Test

To test all the configurations, simply open the configured softphone on each of the clients (both internally and externally) and make a call. If at any point you want to see what is happening on your Asterisk Server as these calls are being made, type the command “asterisk –rvv”

Making Internal Calls

To make an internal call, just input the extension of the user you want to call (as shown in Figure 18).

Figure 18 Calling with Ekiga

If everything is correct, you should receive an answer or decline prompt on the client that the call is being made to.

Figure 19 Incoming Call

-

12

Page 14: Linux Telephony

Making External Calls

To make a call to someone that is not on the same network, the only difference is adding the prefix number that you created when dialing.

Figure 20 Outgoing Call

If everything is correct, you should receive an answer or decline prompt on the client that the call is being made to. You should also be able to see that you are making an external call when you go onto the Asterisk Web Interface (as shown in figure 20).

-

13

Page 15: Linux Telephony

Figure 21 System Status While Calling

-

14

Page 16: Linux Telephony

Conclusion

To conclude, watch out for misspelling while changing configurations. Also, watch out for which configuration you do on each device, and do not confuse them. If all goes correct, you will be able to place calls free both internally on any network, and externally to any other network.

References

Wilson, C. (2014, August). AssistanceCann, J. (2014, August). Assistancehttp://asterisknowtutorial.blogspot.com/http://www.callcentric.com/support/device/freepbxhttp://tyler.anairo.com/?id=3.1.0http://www.voipvoip.com/asterisk/http://siptrunkservice.com/pbx-configs/easy-sip-trunk-configuration-for-asterisk/http://siptrunkservice.com/pbx-configs/how-to-configure-your-sip-trunk-in-asterisk/

-

15

Page 17: Linux Telephony

Appendix

-

Figure 22

Figure 23

16

Page 18: Linux Telephony

Figure 24

Figure 25

-

17