====== FreePBX Phone Provisioning ======
See also: **[[https://www.sonoracomm.com/wiki/doku.php?do=search&id=freepbx&highlight=no|Other FreePBX pages in this wiki]]**
:!: For small systems with less than 10 extensions, it's probably not worth installing and configuring the End Point Manager. If you have lots of extensions, read on.
===== DHCP =====
http://www.3cx.com/sip-phones/dhcp-option-66/
:!: You will need to enable ''option 66'' on your dhcp server so phones get their configuration on boot.
:!: You will need to open the firewall for UDP ports 67-69 for DHCP, BOOTP and TFTP.
===== Commercial EndPoint Manager =====
https://www.freepbx.org/endpoint-manager/
**Admin Guide**: http://wiki.freepbx.org/display/FPG/EPM-Admin+User+Guide
**Port Management**: http://wiki.freepbx.org/display/FPG/System+Admin+-+Port+Management
**Supported Devices**: http://wiki.freepbx.org/display/FCM/EPM-Supported+Devices
As of 12/13/14, the Yealink firmware downloaded by EPM does NOT support RPS. You can replace the ''.rom'' files for the models you are using with RPS-compatible versions. I replaced the ''.rom'' files in ''/tftpboot/yealink/2/'' with files from here: ftp://ftp.yealink.com/RPS/T4X/ This becomes particularly important if you are using config files to switch your phone to another VLAN.
==== Adding New Extensions ====
:!: Provisioning must already be working.
- Add the MAC address to RPS and assign to a provisioning server
- Add the extension to FreePBX
- Use the FreePBX EPM to rebuild the phone config file
- Reset the phone to factory defaults, then reboot it
- If you use a VLAN, you may need to enter Setup and adjust the VLAN ID
* Yealink RPS and DHCP Option 66 can do this for you
https://rps.yealink.com
**Applications -> Extensions -> Add an Extension**
**Settings -> EndPoint Manager -> Extension Mapping -> Select Extension -> Rebuild Configs**
==== Configuration of Commercial EPM ====
- Go to **Settings -> Endpoint Manager -> Firmware Management** (scroll down)
- Install firmware for the brands/models of phones you have
* It takes a while for the firmware to download and install so do this first
* Drag and drop the latest firmware into slot 1
* For Polycom, select ''Use Upgrader Bootrom for looping phones''
- Go to **Settings -> Endpoint Manager -> Global Settings**
- ''Internal IP Address''
- ''External IP Address''
- ''Enable XML-API (RestAPI) Default Login''
- ''Enable IP Addresses in Extension Mapping''
- ''Enable Phone Status in Extension Mapping''
- Go to **Settings -> Endpoint Manager -> your brand -> New Template**
- Name it something like ''polycom-internal-companyname''
- Configure as needed
* Lots of settings
* Time Server -> Router IP (gateway IP)
* Per phone model
- Go to **Settings -> Endpoint Manager -> Extension Mapping**
- Map the extension
- Select (checkmark) and Rebuild Configs
- Reset the phone to factory defaults
- Reboot the phone
==== Multiple Accounts ====
To provision multiple accounts to a phone (shared phone) **in Endpoint Manager**:
- Configure the first extension normally
- Edit the first extension just created
- Select ''Account 2''
- Choose the second extension
- Use the same template, model and MAC address
**Endpoint Manager -> Extension Mapping -> -> Edit**
{{ :voice:pbx:freepbx:freepbx_prov_second_extension.png?750 |FreePBX Provision Second Extension}}
==== HTTP ====
http://:84
===== Free OSS EndPoint Manager =====
FIXME Unfinished because we usually purchase the commercial EPM to support FreePBX development.
Just install the **OSS End Point Manager** FreePBX module.
http://www.the159.com/endpointman/tut.html
==== Basic Steps ====
- Go to the configuration page and install firmware for the brand/model of phones you have
* It takes a while for the firmware to download and install
* Drag and drop the latest firmware into slot 1
- Go to the advanced settings and enter the server ip address and set it to HTTP
* Update globals
- Go to device list and scan for your phones
- Add the phones and configure the extensions (lines) they will be using
- You will also need to enable option66 on your dhcp server so the phones get the config on boot
==== TFTP ====
**Verbose Logging**: http://wiki.freepbx.org/display/L1/Enable+TFTP+verbose+logging
See also **[[networking:linux:dnsmasq|dnsmasq]]**
Enable the TFTP server function of DNSMasq:
vi /etc/dnsmasq.conf
# Enable dnsmasq's built-in TFTP server
enable-tftp
# Set the root directory for files availble via FTP.
tftp-root=/tftpboot
mkdir /tftpboot
chown -hR root:asterisk /tftpboot/
chmod g+w /tftpboot/
service dnsmasq restart
**Connectivity -> OSS End Point Manager Advanced Settings**
{{ :voice:pbx:freepbx_epm_1.png?direct&750 |FreePBX OSS End Point Manager TFTP Setup}}
===== Basefile Edits =====
**EndPoint Manager -> Basefile Edit -> Your Polycom Template -> Legacy**
:!: Once saved, the customized setting will now be **listed at the bottom** of the list.
:!: **Regenerate** the template, **rebuild** all your configs and **reboot** your phones when done making changes.
==== Legacy Polycom ====
For some reason, the old IP301 and IP501 phones don't respect the DST settings in the template.
Scroll down to the setting for ''sntp.daylightSavings.enable'' and set it to ''0'', then click ''Submit Query'' to save.
=== legacy_sip.cfg ===
==== Grandstream DST ====
There is no place in the template to set the proper time zone for Arizona or to turn off the observation of Daylight Savings Time.
Scroll down to the setting for ''P64'' and set it to ''MST'' (for Arizona with no DST), then click ''Submit Query'' to save.