# OSS Endpoint Manager

#### Links

- Github: [https://github.com/billsimon/endpointman](https://github.com/billsimon/endpointman)
- Doc: [https://wiki.freepbx.org/display/FPG/OSS+End+Point+Manager](https://wiki.freepbx.org/display/FPG/OSS+End+Point+Manager)
- [EPM-Supported Devices](https://wiki.freepbx.org/display/fpg/epm-supported+devices)
- [Introducing OSS Endpoint Manager for FreePBX 16 &amp; Incredible PBX 2027 – Nerd Vittles](https://nerdvittles.com/introducing-oss-endpoint-manager-for-freepbx-16-incredible-pbx-2027/)

#### Installation

Incredible PBX 2027

```bash
cd /var/www/html/admin/modules
wget http://incrediblepbx.com/ossepm16.tgz
tar zxvf ossepm16.tgz
rm -f ossepm16.tgz
rm -f /tmp/*
fwconsole ma install endpointman
fwconsole reload
```

[![ossepm-module.png](https://osslab.tw/uploads/images/gallery/2023-04/scaled-1680-/ossepm-module.png)](https://osslab.tw/uploads/images/gallery/2023-04/ossepm-module.png)

#### Configuration

##### Package Server

FreePBX GUI &gt; Settings &gt; OSS Endpoint Manager &gt; Settings

- Package Server: `http://provision.lol/`

FreePBX GUI &gt; Settings &gt; OSS Endpoint Manager &gt; Package Manager

- Click the Check for Update

<p class="callout info">如果沒出現更新視窗，檢查網路狀態或稍後再試。</p>

[![ossepm-update_package.png](https://osslab.tw/uploads/images/gallery/2023-04/scaled-1680-/ossepm-update-package.png)](https://osslab.tw/uploads/images/gallery/2023-04/ossepm-update-package.png)

##### Additional brands (Grandstream &amp; Yeallink V80)

- Download: [SourceForge](https://sourceforge.net/projects/pbxinaflash/files/OSS%20End%20Point%20Manager%20for%20FreePBX%2016%20and%20Incredible%20PBX%202027/)

FreePBX GUI &gt; Settings &gt; OSS Endpoint Manager &gt; Settings &gt; Package Import/Export

- Brand Package: `grandstream.tgz` `yealinkv80.tgz`

[![ossepm-yealinkV80.png](https://osslab.tw/uploads/images/gallery/2023-04/scaled-1680-/ossepm-yealinkv80.png)](https://osslab.tw/uploads/images/gallery/2023-04/ossepm-yealinkv80.png)

##### IP &amp; NTP &amp; Type

FreePBX GUI &gt; Settings &gt; OSS Endpoint Manager &gt; Settings

- IP address of phone server: &lt;server-ip-addr&gt;
- Internal IP address of phone server: &lt;server-ip-addr&gt;
- Configuration Type: Web (HTTP)
- Time Zone: Asia/Taipei
- Time Server: `tw.pool.ntp.org`

<p class="callout info">如果以後有修改 Settings 的內容，或者 Template Editor，完成變更後，還要到 Extension Mapping，選擇 Selected Phone Options 或者 Global Phone Options，按下 Rebuild，這樣才會套用更新到所有裝置的佈署檔。</p>

#### Extension Provisioning

##### Add Device: Linksys PAP2T

FreePBX GUI &gt; Settings &gt; OSS Endpoint Manager &gt; Package Manager

- Cisco/Linksys - PAP2T : Enable

##### Create Template: my-pap2t

<p class="callout warning">注意：預設的部署檔會將 PAP2T 的管理網頁界面關閉，新增一個部署設定檔 my-pap2t。</p>

<p class="callout info">技巧：如果 template 內容如果有修改過，必須到 Extension Mapping 選擇分機後，重新執行一次 Save，這樣新的設定才會被套用。</p>

FreePBX GUI &gt; Settings &gt; OSS Endpoint Manager &gt; Template Manager

- Template Name: my-pap2t
- Product Select: Linksys/Cisco
- Clone Template From: PAP2T

Edit the template: my-pap2t

- Profile Resync: 3600 (對應設備參數 `Resync_Periodic`，秒數不要調太低，避免設備太忙碌更新)
- Enable Webserver: Yes
- Enable Webserver Admin: Yes
- Administrator Password: &lt;set-your-password&gt;
- User Password: &lt;set-your-password&gt;

<p class="callout warning">注意：編輯 template 時，不要使用 Edit Global Setting Overrides，這個可能會弄壞 template。如果不小心 弄壞 template，只要將 template 移除後重建即可。</p>

<p class="callout info">技巧：template 或者原始設定檔 (`spa$mac.xml`) 有修改過參數，要如何在設備部署前做驗證？以 HTTP 為例，瀏覽這段網址 `http://freepbx-ip-addr/provisioning/p.php/spaxxxxxxx.xml`，xxxxxxx 是設備的 MAC address （必須是小寫），可以下載部署設定檔。 </p>

##### Extension Mapping

FreePBX GUI &gt; Settings &gt; OSS Endpoint Manager &gt; Extension Mapping

- MAC Address: &lt;pap2t-mac-addr&gt;
- IPEI: &lt;blank&gt;
- Brand: Cisco/Linksys
- Model: PAP2T
- Line: 1
- Extension Number: &lt;select-your-extension&gt;
- Template: my-pap2t

##### PAP2T 設置

登入 PAP2T 管理界面 (advanced view) &gt; Provisioning

- Provision Enable: yes
- Profile Rule: `http://<freepbx-ip-addr>/provisioning/p.php/spa$MA.xml`

須重啟電源才會重新部署新設定。

#### Provisioning Template Files

##### SPA-3102/PAP2T

File: [spa$mac.xml](https://osslab.tw/attachments/74)

將檔案複製到目錄 `/var/www/html/admin/modules/_ep_phone_modules/endpoint/cisco/linksysata/`

修正內容：

1. 移除日光節約的時間設定
2. 移除 LAN 關閉 DHCP（SPA3102 必須啟用）
3. 移除部署主機位址的設定（目前只能支援 tftp 方式）