VoIP Laboratory A Creating a local private telephony network in a rural community (cc) Creative Commons Share Alike Non Commercial Attribution 3 This laboratory focus on building local Voice infrastructure within a community. The lab consists of three parts: Part A: Intercom with IP04 Part B: Local Community Telephony Part C: Inter connecting two local telephony networks PART A: Intercom with IP04 Scenario: A hospital with four departments needs a local telephony network to be able to call between each other. Hardware: 1 IP04, 2 4 Analogue phones Step 1: Hardware setup 1. Power on the IP04 2. Connect two analogue phones to the IP04. 3. Connect the IP04 to the switch Step 2: Access to IP04 To install new packages and to edit configuration files manually, we need to access the IP04. There are many ways to access your IP04, serial, Telnet, FTP, SSH, and rsh. In this example, we will use SSH as it is easy to use and gives us good flexibility. The default root password of an IP04 via SSH is uclinux. 1 (9)
1. Open a command window in a PC connected to the switch. 2. Run the following command (replace [i] with the IP address of your IP04) and enter the password of your IP04. #ssh 192.168.46.[i] 3. Voila! You are now inside of the IP04. Step 3: Installation of Asterisk Configuration Interface To be able to configure the IP04 easily, we need a graphical interface. For that, we well use the Voiptel GUI. The VoIPtel GUI is not installed in the IP04 by default. Therefore, we need to download it and install it manually. First we need to tell the IP04 where to find the Voiptel packages. We do that by editing the file ipkg.conf. root:~> vi /etc/ipkg.conf src snapshots http://rowetel.com/ucasterisk/ipkg src voiptel http://update.voiptel.no dest root / Save and exit the ipkg.conf file. Then, install the Voiptel packages. root:~> ipkg update root:~> ipkg install voiptel gui voiptel ntp root:~> reboot Step 4: Login to the IP04 using the Voiptel GUI 1. Direct your browser to the IP address of your IP04 and make sure that you can see the Voiptel interface. 2. Login by using the default username and password (admin/mysecet) 2 (9)
Step 5: Dial plan and Calling Rules 1. Create a new dialplan (Dialplan1). 2. Create four users (one for each port on the IP04) with the following parameters: Parameter User 1 User 2 User 3 User 4 Extension 1000 2000 3000 4000 Name 1000 2000 3000 4000 VW password 1234 1234 1234 1234 Analogue port 1 2 3 4 Dialplan Extension options: Dialplan1 Voicemail, Call waiting, 3 way calling Exercise A1: Make internal phone calls between user 1, 2,4 and 4. Exercise A2: When would a system like this be useful in your project? Part B: Local Community Telephony Scenario: A nearby health clinic needs a direct connection to the hospital for urgent consultations. Make sure that any department can call the Health Clinic, and the Health Clinic can reach all departments. Hardware: 1 IP04, 1 ATA, 2 Analogue phones 3 (9)
Step 1: Configure the ATA The ATA should communicate with the PBX (IP04) with SIP protocol. It should have extension 5000. 1. Power on the ATA, connect it to the switch, and connect an analogue phone to it. 2. Enable DHCP in the ATA (see instruction in Section xx). 3. Configure the ATAs VoIP settings according to the information below: Proxy and Registration Proxy: 192.168.46.X (the IP address of the PBX you want to register to) Register: Yes Subscriber Information Display Name: 5000 User ID: 5000 Password: 5000 Use Auth ID:yes Auth ID: 1000 4 (9)
Step 2: Add user to the PBX (IP04) 1. Add a user with extension 5000 to Dialplan1 using SIP protocol. Remember to save your options! Exercise B1: Place phone calls between the analogue users in the IP04 and the ATA (user 5). Exercise B2: When would a system like this be useful in your project? 5 (9)
PART C: Interconnecting two PBXs Scenario: Assume that two local telephony systems (two PBXs) have been deployed in the community. Your task is now to interconnect the two systems, allowing any user (1 4) in System A to call any user in System B. Hardware: 2 PBX, 2 analogue phones Comments: Please note that you need to collaborate with another group, since the exercise requires 2 PBXs. The instructions assumes that the id of your group is [i] and the id of your collaborating group is [j]. Step 1: Create a service provider (a trunk) Create a service provider to interconnect two PBXs with the SIP protocol. The host IP address should be the IP address of the PBX that you want to communicate with. The username and password should be agreed on between the two PBX administrators. In this lab, we will use WA as both username and password. Parameter Provider type Comment Protocol Register Host Username Password Value Customer voip InterSIP SIP Yes 192.168.46.j WA WA 6 (9)
Step 2: Create a user extension The trunk between the two PBXs needs to have a user extension defined. Parameter Value Extension [peer] 4646 Name InterSIP ext Password 4646 Analogue phone None Dialplan Dialplan1 Extension Options SIP Step 3: Calling rules (outgoing) We need to create a calling rule for all outgoing phone calls from this PBX, using the service provider we just created. The calling rule should route all outgoing phone calls starting with j and followed by 4 digits (an extension) to the service provider InterSIP. Add a calling rule for outgoing calls according to the following data: Parameter Rule name Place this call through Analogue fallback Dialing rules If the number begins with......and follows by... Strip... 0...and prepend... 0 Value InterSIP calling rule Custom InterSIP None J [j=10 20] 4 digits 7 (9)
Step 4: Incoming Call Rules Now we need to create the corresponding incoming calling rules, one for each analogue port. For example, all incoming rules that follows the pattern [i]3000, should be routed to the 3000 extension. Create four matching incoming call rules for, one for each port. Parameter Rule 1 Rule 2 Rule 3 Rule 4 Route All incoming calls that match Pattern [i]1000 [i]2000 [i]3000 [i]4000 From provider Custom InterSIP To extension 1000 1000 2000 2000 3000 3000 4000 4000 Exercise C1: Place phone calls between yours and your partner's PBX. Exercise C2: What happens if someone place a phone call to an non existing extension in your PBX? How can you make sure that such phone calls are routed to The Operator (let's say Port 1 in your PBX). Exercise C3: When would a system like this be useful in your project? 8 (9)
Tips and Tricks 1. How to see registered peers SSH to the IP04 and run #asterisk r #>sip show peers 2. How to edit a file with vi Save and exit file: Esc : qw! Delete row: Esc d d Edit: Esc I Delete character: backspace 3. Default password VoIPtel GUI: admin/mysecret IP04 (ssh): uclinux 9 (9)