GUI Asterisk Configuration Labs
IP Addressing & Phone Extensions
These are the IP addresses and phone extension numbers assigned to your pod which you can use for your pod.
Pod | Asterisk eth0 IP | Pod Router Fa0/0 IP | Phone Extension Range | Classroom Switch Asterisk Port |
---|---|---|---|---|
Pod A |
172.17.219.11/24 |
172.17.144.11/24 |
2100-2199 |
Gi1/0/31 |
Pod B |
172.17.219.12/24 |
172.17.144.12/24 |
2200-2299 |
Gi1/0/32 |
Pod C |
172.17.219.13/24 |
172.17.144.13/24 |
2300-2399 |
Gi1/0/33 |
Pod D |
172.17.219.14/24 |
172.17.144.14/24 |
2400-2499 |
Gi1/0/34 |
Pod E |
172.17.219.15/24 |
172.17.144.15/24 |
2500-2599 |
Gi1/0/35 |
Pod F |
172.17.219.16/24 |
172.17.144.16/24 |
2600-2699 |
Gi1/0/36 |
Pod G |
172.17.219.17/24 |
172.17.144.17/24 |
2700-2799 |
Gi1/0/37 |
Pod H |
172.17.219.18/24 |
172.17.144.18/24 |
2800-2899 |
Gi1/0/38 |
Pod I |
172.17.219.19/24 |
172.17.144.19/24 |
2900-2999 |
Gi1/0/39 |
Pod J |
172.17.219.20/24 |
172.17.144.20/24 |
3000-3099 |
Gi1/0/40 |
Asterisk Server eth0 Interface:
The eth0 interface on your Asterisk server is used to connect with other pods, the Internet, and your SIP PSTN provider. |
-
Default Gateway: 172.17.219.1
-
DNS Server: 172.17.139.11
Asterisk Server eth1 Interface:
The eth1 interface on your Asterisk server is used to connect with your IP phones on the same layer 2 network as the phones and without going through NAT which simplifies the configuration. |
-
IP Address (same for all pods because it’s inside behind your NAT): 192.168.10.3/24
-
No default gateway or DNS servers for this interface
Pod Router:
-
Default Gateway: 172.17.144.1
-
DNS Server: 172.17.139.11
The XX99 extension will be used for future voicemail capability so that one should not be used for a regular phone/line. |
Work you can do remotely
In general you will be able to install FreePBX. If you have VPN access to the ITCnet you will also be able to configure FreePBX through it’s web interface. You will need to come to campus and setup the network with the router, switch, and phones in order to test anything, get the correct MAC addresses to put in the configurations, etc.
Internal Network Setup
When you are on campus and working with your IP phones you will need to setup your internal network with your pod router and switch as you did for the previous lab.
-
Use the sample switch and router configurations (need to be modified with correct IP addressing for your pod) to configure the router as a NAT device and DHCP server for your pod LAN.
-
Connect port Fa0/0 on your pod router to an available port on the B144 ITCnet classroom switch.
-
Connect for Fa0/1 on your pod router to port Gi1/0/24 on your pod switch.
-
Connect for port Gi1/0/23 on your pod switch to the correct port on the classroom switch identified in the table at the top of the lab. This connection will make a layer 2 connection from your Asterisk server’s ens224 interface to your internal pod network (the 192.168.10.0/24 subnet).
-
Sign in to a second PC in the classroom. After you have successfully signed in connect that PC to port Gi1/0/1 on your pod switch.
-
Because of our NAT and DHCP setup on the router even after connecting to the pod LAN the second PC should still have working Internet access. It should also be able to now ping both the inside and outside IP addresses of your pod’s Asterisk server and access the server using PuTTY (SSH) and Filezilla (SCP).
Of course, make sure that your Asterisk server is up and running! It’s strongly suggested you connect to and work on your Asterisk server over SSH from this point on instead of trying to use the Netlab console. Cut and paste support works in PuTTY which it does not in the Netlab console and can transfer files in and out of your server using Filezilla.
Install FreePBX
-
Ask your instructor to reset your virtual machine and load the FreePBX install CD.
-
Install "FreePBX XX (Asterisk XX) - Recommended"
-
Use "Installation - Output to VGA" and the "FreePBX Standard" options
Be sure to set the root password to something you will remember or write down.
-
-
Login to the CLI as the root user to obtain the IP address of eth0 and then visit that IP address in a browser on a system on the ITCnet network or your Pod network.
-
Create an "admin" user account
-
Login to the administration interface
-
Set the locales .Complete the Firewall wizard
-
Trust your current client
-
Trust your current network
-
Enable the responsive firewall
-
Automaticlly configure the firewall Asterisk IP Settings
-
-
On the Connectivity → Firewall page click on the "Networks" tab and set 172.17.0.0/16 as a "Trusted (Excluded from Firewall)" network.
-
Go to the Admin → System Admin page and click the link on the right to register/activate your FreePBX system
-
Update all your modules if you are prompted.
-
Double check that all modules have successfully upgraded by going to the Admin → Module Admin and clicking the "Check Online" button. Review the data and install any upgrades you can. Repeat this process until all modules say "Enabled and up to date". This may take several passes through the list as many modules require other modules be enabled and updated before they will update.
-
In the Admin → System Admin → Network Settings page of FreePBX set a static IP Address on the eth0 and eth1 interfaces using the table and information at the top of this lab. You will need to "Save and apply" after changing each interface. Be sure both interfaces are set to start automatically.
-
Go back to the Connectivity → Firewall page and click on the "Interfaces" tab. Ensure both eth0 and eth1 are "Trusted (Excluded from Firewall)" for our lab purposes.
-
On the Connectivity → Firewall page click on the "Networks" tab and set 192.168.10.0/24 as a "Trusted (Excluded from Firewall)" network.
-
Click the red "Apply Config" button in the upper right corner of the page.
Configure Generic SIP Phones
-
Connect your Digium A-25 phone and Grandstream 2135 phone to the network
-
Under Settings → Asterisk SIP Settings → General SIP Settings add 192.168.10.0/24 as a local network, save, and apply.
-
Add the required PJSIP extensions in FreePBX for the phones
You will need to update the phone username/password and voicemail number (*97) configured on the phone. You should let FreePBX create a new user for the phone automatically (probably the extension number) and then use that username but the extension "secret" as the password on the phones -
Test calling yourself and leaving a message, MWI capability, and checking the message
Configuring SIP Trunks
-
Make sure the "External Address" under Settings → Asterisk SIP Settings correctly reflects the outside IP of your eth0 interface.
-
Create a new FreePBX PJSIP trunk pointed to the ITC SIP Phone Company (172.17.219.2) using your Pod credentials.
In addition to setting your username and secret you also need to set the "From User" on the advanced page of PJSIP trunk settings. THis should be set to the same username you use for registration to the ITSP. -
Create outbound routes for the different types of outside numbers you can call (emergency, premium, international, long distance, toll-free, local) which route the traffic out the SIP trunk to the ITSP
-
Try placing calls out to the PSTN and make sure things are all working
-
Test at least the following types of calls:
-
Local calls (both by dialing 7-digit numbers and 10-digit numbers)
-
Long distance calls (calls to a different area code than the 510 area code, and which begin with a 1)
-
Toll-free numbers (1-800, 1-888, etc.)
-
Per-minute premium charge numbers (1-900)
-
Emergency Services (911, 9-911)
-
Directory Assistance (411)
-
International Numbers (Numbers beginning with 011)
-
-
-
Create at least one inbound route for one of your 5105552XXX numbers and point it to your extension
-
Test inbound calling by having another pod call you through the ITSP
Configuring DPMA Phones
-
Go to the Settings → EndPoint Manager → Global Settings page and switch "Use DPMA" to Yes. Wait while the module installs.
If you receive a "permission denied" error you will need to acces your FreePBX CLI console in Netlab and run the fwconsole chown
command, then try enabling DPMA again. -
Set the Internal Address on the swttings page to the IP address on eth1
-
Click the "Save Global" button
-
Click the "DPMA Management" button.
-
Set the phone authentication method to "None" for lab purposes.
-
Set the mDNS Discovery Address to the IP address on eth1
-
Save the DPMA management settings
-
-
Click the red "Apply Config" button in the upper right corner
-
Go to the Settings → EndPoint Manager → Brands → Sangoma page and open the D&P Series Phones page
-
Modify the digium_default template
-
Ensure the D60 phone model is activated for the template.
-
Ensure the Destination and Provisioning Server addresses match the internal (eth1) interface address on your server.
-
Go to the Applications → Extensions page and create at least one new extension with Voicemail for each DPMA phone
-
Go to the Settings → EndPoint Manager → Extension Mapping page
-
Add a new extension mapping and choose the Extension/Name, the first available Account on the phone, a Sangoma D&P Series Phone, and the correct model number (D60) for your phone. Leave the MAC address blank so you can select the line on the phone.
-
Click the "Use Selected" button next to the "Save and Rebuild Config(s)" dropdown.
-
Go to Connectivity → Digium Phones and follow the instructions to install the DPMA module
-
Click the red "Apply Config" button in the upper right corner
-
Connect your Digium D-series phone to your VoIP network
-
Select the new extension on the D-series phone to configure the phone with the extension
-
Test calling between extensions, voicemail, calling out to the PSTN through the ITSP, and all other functionality configured so far
Configuring SCCP Phones
-
Install Chan-SCCP following the instructions from your readings for FreePBX. Be sure to disable chan_skinny.so and load chan
-
Run the
fwconsole chown
command on the CLI to assign permissions -
Restart your FreePBX VM
-
Setup a phone, button, line, etc. in your sccp.conf file as we have done before. You may be able do this in the GUI from the Admin → Config Edit page by selecting the sccp.conf file as long as you don’t see an error message about it being not writable.
-
Add a "Custom Extension" for the SCCP phone in FreePBX being sure to set a dial string for the SCCP device.
-
Test calling between extensions, voicemail, calling out to the PSTN through the ITSP, and all other functionality configured so far
Cleanup
-
Safely shutdown your Debian system
-
Erase your switch/router configuration
-
Put away all equipment and cables. Be sure to note which phones you have so that next week you’ll be able to get the same five phones.
Document Build Time: 2024-10-30 23:55:41 UTC
Page Version: 2024.01
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License