How to Make a VoIP Network
What you’ll need:
• A Linux NUC or another device to boot FreePBX onto
• A Bootable flash drive
• A wall network jack with internet connection
• A switch with a DHCP port
• A gateway router with FXO ports
• An 8 port POE Switch
• About 10 network patch cables
• Phone sets for the network (this guide will have 4)
• A laptop or another device to browse configuration settings
• Download Angry IP to monitor ip addresses easily
- Proper Plugging
- Wall outlet – DHCP port of switch
- 2nd slot of the same switch – POE switch
- POE switch – laptop or other device for configuration settings
- POE switch – FXO gateway router
- POE switch – NUC or another device for booting FreePBX
- POE switch – Remaining 4 ports are for the phones
- Static IP’s
- The following need static IP’s as to not mess with connection for the phones. Type in the Ip address of the device once its connected to the network to set static settings for each
- FreePBX Device
- Once installed and activated, go to Admin –> System Admin –> Network Settings
- Network Interface: eth0
- Ip assignment: static
- Static ip: an ip address that is within the static range of ip addresses for the network
- Netmask: 24
- Gateway: Your Router’s IP address
- Start Automatically: yes
- Create interface
- FXO Gateway
- The example in this guide is the GrandStream gateway router, each router settings may vary depending on make and model
- Check the ip of the router and visit the address
- Default username and password are admin, admin
- Click networks
- Click the bubble for statically configured (default) as:
- IP address: a static ip that is within the static range of ip addresses for the network
- Subnet Mask: 255.255.255.0
- Default Router: same ip as your router’s IP address
- DNS Server1: 8.8.8.8.
- DNS Server2: 8.8.4.4
- Save
iii. DHCP Switch (unless the last octet is set to 1, take these steps)
- Each process will defer based on the make and model of the switch.
- Go to the IP address of your DHCP Switch(Router)
- Sign in using the default sign in (if you don’t know the default sign in information google the make and model password and you will find it there)
- If there is a setup wizard, follow that.
- The phones
- Using Angry IP, find the ip address of the phones connected to your network. You can also go into the menu of the phones and find it in the settings there
- Go to the ip address of each phone
- Process defers based on make and model
- This guide uses Sangoma S505 phones
- Sign in using the default sign in (for Sangoma phones it is admin, admin)
- Go to network –> Basic
- Static IP address
- Fill in the static ip with an ip address that works with the static ip scheme for your network
- Subnet mask is 255.255.255.0
- Default Gateway: same ip address as your router
- Static dns yes
- Primary DNS: 8.8.8.8.
- Secondary DNS: 8.8.4.4
- SaveSet
- Repeat for each phone
- Download FreePBX to a bootable usb flash drive
- https://www.freepbx.org/
- https://rufus.ie/en/
- Download the most current version from each website. Use Rufus to create a bootable version of FreePBX on the flash drive
- Insert the flash drive into the FreePBX device (NUC or another predefined device)
- Boot from the flash drive and set up the device for FreePBX
- Set the root password and configuration settings and remove the flash drive and reboot
- If configured properly, you should see an Ip upon boot of FreePBX
- Use this Ip address on the laptop connected to the network by searching it in a URL
- FreePBX
The following links are in depth guides for setting up the phones. Look here for anything that is not in this guide.
https://wiki.freepbx.org/display/FPG/Configuring+Your+PBX
https://wiki.freepbx.org/display/PHON/Setup+Phone+by+hard+setting+provisioning+server#SetupPhonebyhardsettingprovisioningserver-FromthePhoneGUI
https://wiki.freepbx.org/pages/viewpage.action?pageId=4161667
https://wiki.freepbx.org/display/PHON/Dial+Patterns - Go to the IP address provided by the FreePBX device and sign in using the user/password used to set up the device
- Activate the system by going to Admin – System Admin – Activation
- Follow the form and submit
- DNS – make sure DNS is set to your FreePBX IP
- Intrusion Detection – Set an email to receive alerts on any intrusion by putting an email address under email
- Network Settings – if not set earlier
- network interface: eth0
- static Ip: set to static ip address within DHCP range for client server
iii. netmask: 24
- Gateway: FXO gateway router Ip
- Start automatically: Yes
- Time zone –> set to local time zone
- Setting up Extensions
- Go to Applications – Extensions
- Add extension –> add new SIP (chan_pjsip)
- User extension –> whatever the user’s ext. will be
- Display name –> the person’s name (can be left blank)
iii. Secret – a password to access a person’s ext.
- Select User Directory –> PBX Internal Directory
- Link to a default user: Create new user
- Groups –> all users
vii. Go to the voicemail tab next to general
viii. Voicemail enabled: yes
- Password: same as extension
- submit
- Once an extension is created, you can create more extensions based on how many phones you are setting up. This is expedited with quick create extension
- Click quick create extension
- Follow the prompt to complete the remaining extensions
- After Your extensions are created, make one more but this one is a virtual extension for a general voicemail box
- Add extension –> add new virtual extension
- Ext: something within your extension scheme but 5 or 10 numbers ahead of the last extension to save space for any additional phones you wish to add.
iii. Display name: general voicemail
- Do NOT create a new user for this extension
- Go to the voicemail tab next to general
- Enabled: yes
vii. Voicemail password: same as the extension
viii. Submit
- Configuring a phone using EndPoint Manager (EPM)
- Settings -> EndPoint Manager
- In the menu button on the right side -> Global Settings
- Global Settings
- Internal Address –> The IP address from FreePBX device
- Phone admin password – defaulted to 222222 but you can change this to whatever the client needs. If not, leave as be.
iii. Phone User Password – Defaulted to 111111 but you can change this to whatever the client needs. If not, leave as be.
- Save Global Settings
- Creating templates for phone
- In the same menu as Global Settings, go to Add Brand
- Select the brand of your phones, in this guide we have Sangoma S505
- Template name – You can name the template whatever you want (no spaces)
- Destination Address – Will be pulled from internal IP address defined in global settings
- Regional – > Time Zone - Select time zone according
- Models –> select your phone model –> Line Label – Any of the options are fine, this is preference by client.
- Options
- Background image – once you upload an image, you can apply it to the background here.
- To do this, have your image file ready as a .GIF, .JPEG or .PNG
- In the menu button on the right-hand side, scroll down to image management
- Add image
- Choose file
- Choose the image file
- Upload image
- Go back to options where background image was
- The image will show up as a drop-down option listing its file name
- Line label – what the line label displays
iii. Dial patterns – add dial patterns here for the phone to use
- Dial entry timeout – change from 0 to 2. This will make the phone dial out after dialing a number without having to hit send
- LED statuses will change how the LED indicator will react to different scenarios
- Save, rebuild config, and update phones
- Firmware Version – Select Firmware Slot 1(if this doesn’t show in the drop down go to firmware management and select the latest firmware version and drag it to firmware slot 1 go back to the general tab and select firmware slot 1)
- Provision Server Address – should match the destination address
- Provision Server Protocol – Click on HTTP. FTP or TFTP based on which protocol is correct for the phone model
- Save Template
- Setting up a line key for an extension
- Settings –> EndPoint Manager –> Brands –> Phone Brand –> Manage (template name)
- Select model of phone you’re setting up
- Line Keys –> Type: line (line keys are for extension lines, park, transfer, etc. set up 4 lines and then set up other lines for anything the client requested)
- Account: Account 1
- Save Model
- Mapping the phone to an extension
- Menu button on the right side where global settings is
- Extension mapping
- Add extension
- Extension/name –> first extension
- Brand/MAC Address –> Brand of phone and Mac Address of phone(you can find this on the phone Menu –> )
iii. Template/Model –> Template you created, model of phone
- Action –> Save and Rebuild
- Click Use selected the new extension should have a green background
- Repeat for each extension
- Installing Firmware
- Click Firmware Management
- Your phone brand should appear under Firmware
- Drag the latest firmware to firmware slot 1
iii. Submit
- Downloading Configuration Files to the phone
- Settings defer by phone model for downloading configuration files. Follow directions for the specific phone
- Go to the phones ip address in a url and change the settings (for Sangoma)
- Go to Phone IP address
- User/pw is admin, admin
iii. Management –> Auto Provision
- Change Firmware Server Path to your FreePBX IP address with the port number with proper protocol for either http or https (i.e., http://192.168.10.6:84)
- Change Config Server Path to your FreePBX IP address as well
- Save
vii. Apply to each phone
- Username and password are admin, admin by default but if it is configured the phones password will be 222222 unless changed at that step
- Go to Network (if not set up prior in the static ip section)
- IPv4
- IPv4 setting – Static IP Address
- Ip address is the assigned address for this phone
- Subnet mask 255.255.255.0
- Default gateway – FreePBX Ip address
- DNS 8.8.8.8 (testing purposes only)
- Saveset
iii. Management –> Auto Provision
- PnP active – no
- Upgrade mode: HTTP
- Firmware server path –> http://YourFreePBXIPAddressgoeshere:84
- Config Server Path –> http://YourFreePBXIPAddressgoeshere:84
- Saveset
- Scroll to AutoProvision Now and click on that
- Phones should now be configured with the settings from FreePBX
- Do for each phone
- Setting up a Trunk
- Connectivity –> Trunks
- Add Trunk (chan_pjsip)
- Trunk Name – “client name trunk”
- Outbound CallerID – client phone number
- Allow Any CID
- Maximum Channels: 4 (or however many phones they have)
- Dial Number Manipulation Rules
- NPA is the area code, NXX is the following three numbers in a phone number.
- Type in NPA your area code, and NXX the following three numbers in your area phone numbers
iii. Add emergency lines separate, as the wizard won’t pull both the local numbers and emergency at the same time.
- Inserting these will allow the phone to dial out after dialing the numbers without having to hit send or call
- Pjsip settings
- General
- Secret – password (You MUST set a password so when you connect to your fxo gateway you enter in the same password on that interface and that’s how the phones will connect. Without a password, FreePBX and your fxo gateway router will not connect.)
iii. Authentication – both
- Sip server – ip address of your FXO Gateway
- SIP server port – 5060
- Save Trunk
- Setting up an inbound route to an extension manually
- Connectivity –> Inbound Routes
- Add inbound route
- Describe it however you see fit
- DID number – the clients phone number
- CID – any
- Set Destination: set to an extension you created.
- If you want all phones to ring at the same time you will need to set up time groups/conditions and ring groups
- Time groups and conditions
- On set destination select time conditions to the ext you created and save it. This will have that specific phone ring when the phone is called. Go to Applications and click time groups
iii. Add time group
- Description – describe what the time group is, in this example it is open hours
- Time: select the time when your clients company is open if they are open 8-5 Monday through Friday
- Time to start: when you will open (8:00)
- Time to finish: when you close (17:00)
- Week day start: starting day of the week that you are open. If you are open Monday to Friday set this to Monday
- Week day finish: the last day of the week you are open. If you are open Monday to Friday then you set this to Friday
- Month day start/finish: the days of the month you are open, mainly used for holidays. you would be closed so you would make a new time group called holidays and set a time for each holiday of the year. Example: new years day - month day start: 1 month day finish: 1 month start: January month finish: January
- Submit after you set your open hours of operation
- Back in the time groups main page, click on list time conditions
- Add time condition
- In this example we are setting closed hours
- Time condition name: Closed hours
- Override code pin: whatever pin works for the client to override a time condition
- Time group: open hours
- Destination matches: Ring Groups
- If you plan on all phones to ring at the same time when someone calls in, select ring group
- A prompt will show up saying to create a new ring group
- Ring Group number: the extension to call to ring all phones in the group
iii. Description: describe what this ring group is
- Extension list: using the user quick select, you can quickly add any extension to this group
- Ring strategy: ringall
- Destination if no answer: voicemail General voicemail box (unavailable message)
vii. submit
b.
- Destination non matches Voicemail box – general voicemail (unavailable)
- Apply Config
- Repeat for each phone
- This allows phones to all ring at the same time when called in. This also sets the phones to not ring after a certain time (i.e., closed) and goes directly to a voicemail
- Setting up Outbound routes
- Connectivity –> Outbound Routes
- Add Outbound Route
- Route Settings
- Route name - Give the route a name, no spaces
- Route CID – A client phone number
iii. Trunk Sequence for matched routes – select the trunk name you created
- Dial Patterns – same as setting up the trunk, you create rules based on what the client needs for dial patterns
- Save Route
- Create another Route for Emergencies
- Add outbound route
- Route name: Company name Emergency
iii. Route type: Emergency
- Trunk Sequence for matched routes: the trunk you created
- Dial Patterns: unselect 7,10- and 11-digit patterns and only select US Emergency
- Additional Settings: force record phone calls
- Save Outbound Route
- Configuring your FXO Gateway with FreePBX
- This guide we use a GrandStream GXW4104
- Login – default password is admin
- Networks (If not set earlier in static ip address setting)
- Basic Settings
- IP Address
- Select statically configured as:
- Ip address – whatever number in the last octet of the ip that won’t interfere with any of the other static addresses
- Subnet mask – 255.255.255.0
- Default router – The router that connects internet to network
- DNS Server 1 – 8.8.8.8 (testing purposes only)
- DNS Server 2 – 8.8.4.4 (testing purposes only)
- Save
- (OPTIONAL WHILE TESTING) Change the default admin password
- Maintenance
- Admin password – enter whatever you’d like
- Unless its analog, you do not need to do an FXO line test
- FXO Lines – scroll to FXO Termination
- Change AC Termination Impedance from ch1-4:0; to ch1-4:1; save
- Go to Dialing on the left-hand side
- Min Delay before dialing out ch1-4:1300;
- Channel Dialing to VOIP (FXO Gateway)
- Settings –> Channels Settings –> Calling to VoIP –> Unconditional Call Forward to following:
- User ID: ch1:phone#1;ch2:phone#2 etc. until all phone numbers are added between users (use the phone numbers for each phone)
- SIP Server: ch1-4:p1;
iii. SIP Destination Port: ch1-4:5060;
- T.38 setting: ch1-4:mode=2,rate=9600,ecm=1;
- save
- Channels (FXO Gateway)
- Select Accounts tab: Set your SIP server IP address (FreePBX IP address)
- Select User account on the left-side
- Going down the channels should be 1,2,3,4
iii. SIP User ID is the name of the trunk that you created
- Authenticate ID should also be the name of the trunk
- Authen Password – Password
- SIP Account 1
vii. Save
- Ring Groups(FreePBX) – if not set up in inbound routes
- Applications –> ring groups
- Add ring group
- Ring-Group number – the number to call to ring the group of extensions
- Group Description – describe this ring group here
- Extension List – using user quick select, add the extensions you created to the ring group
- Ring strategy – ringall will ring all the extensions selected. Other options are available for whatever the group is being used for
- Destination if no answer – voicemail general voicemail (unavailable)
- Time Groups – If not set up in inbound routes
- Applications –> Time Groups
- Add time group
- Description – define what this time group is (open hours)
- Time – this is very specific. If you are setting up open hours for your phones to work, you need to select the hours and days your business is open. This example will be 8-5 Monday to Friday
- Time to start – 08:00
- Time to finish – 17:00
iii. Weekday to start – Monday
- Weekday to finish – Friday
- If you are setting up a time group for holidays when you will be closed, set up a new time group named holidays
- Example: New Year’s Day
- Month day start – 1
- Month day finish – 1
- Month start – 1
- Month finish – 1
- Time Conditions – if not set in inbound routes
- Applications –> time conditions (or from time groups click time conditions)
- Add Time Condition
- Time condition name – name your condition
- Override code pin – a pin you can enter to override the condition and have the phone ring when its closed
- Time zone – use system time zone
- Mode – time group mode or calendar mode
- Time group mode will pull times from the time groups to decide when to activate phones
- Calendar mode will pull from a calendar for when to activate phones. You would need to set up a calendar with holidays and days that your business is closed.
- Time group – select the time group to pull active times from
- Destination matches – Ring Groups – Ring all lines (if ring group for all lines was created)
- Destination non matches – Voicemail
- Recordings – the client will usually have these recorded but for testing you can set it here.
- Admin –> System Recordings
- Add recording
- Name – name your recording
- Description – describe your recording
iii. Upload recording – browse your files to select the recording to upload
- If you don’t have anything prerecorded, you can also record yourself via a phone by choosing an extension to call and it will record what you say.
- Convert to WAV file
- submit
- Announcements – announcements can be used in many places to let the caller know a message. You can set an announcement in an IVR to let people know what to dial to reach their destination or an announcement can play before you reach a voicemailbox etc.
- Applications –> Announcements
- Add
- Description – describe your announcement
- Recording – Select a recording of a script you uploaded
iii. Destination after playback – Voicemail
- IVR
- Applications –> IVR (interactive voice response)
- IVR Name – name your IVR
- IVR description – describe what your IVR does
iii. Announcement – select a recording that will play at the beginning of the IVR
- Invalid destination – voicemail
- IVR entries
- Digits – the number for the user to select when navigating through the IVR
- Destination – Where the user will go after pressing a digit (i.e., pressing 1 will send you to the first phone number’s voicemail when closed)
- Submit
- Adding Recordings and images and where to apply them
- Images
- Go to endpoint manager
- Menu button
iii. Scroll down under advanced and click image management
- Click add image
- Choose file, browse your files to find the image you wish to upload
- Upload image
vii. Go back to the endpoint manager menu
viii. Go to your phone brand and select your phone template
- Options – background image select your image
- Screensaver – custom photo (optional, depends on client request)
- Save
- Recordings
- Admin –> system recordings
- Add recording
iii. Name - Name your recording
- Description - Describe your recording
- Upload recording – browse
- Select file to upload
vii. If you do not have it prerecorded, you can choose an extension to call and record a message to upload to the phone system
viii. Convert to WAV file
- Save
- You can add recordings to announcements, IVR and other places as well.
New Systems and configurations will change, and the system may not recognize it giving problems with SIP. Either reboot the system or go into command line on the FreePBX console and type in fwconsole reset
At this point the phones should be working and able to do as needed.