Open Source Training Seminar FreePBX Paid Support

Ticket #1950 (new Module Submissions)

Opened 1 year ago

Last modified 1 week ago

Auto Provisioning For Polycom & Grandstream Phones

Reported by: thisboyiscrazy Assigned to:
Priority: minor Milestone: Cut Line
Component: Other Module Version: 2.2.1
Keywords: Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

Here is a module that will assist in Auto Provisioning Polycom Phones

You add a MAC and map it to a device on "Add phone"

It will download 000000000000.cfg.template and phone1.cfg.template from your ftp server and replace varibles then upload them to the ftp server as (mac).cfg and (mac)-phone1.cfg

The varibles are replaced with values from the sip table e.g. account in the sip table will replace any occerance of %ACCOUNT% in the template files, %MAC% is also replaced with the mac address of the phone.

currently the ftp host, username, and password are hard coded.

Under settings there is:

"Update All" - which will recreate the config files.
and
"Detect and map phones" - which will search for polycom MAC addresses and allow you to quickly assing them (uses the nmap scaning on DevicesTakeTwo )

This is my first module and the coding is a little bit of a mess but here you go.

Attachments

autoconfig.tgz (3.5 kB) - added by thisboyiscrazy on 05/17/07 11:29:11.
autoprovision.tgz (6.1 kB) - added by thisboyiscrazy on 05/18/07 11:38:09.
Auto Provisioning Module
autoprovision.2.tgz (6.7 kB) - added by thisboyiscrazy on 05/22/07 11:41:20.
Updated version
autoconf.php (2.9 kB) - added by thisboyiscrazy on 06/04/07 06:33:49.
autoconfig update from phone
extensions_custom.conf (0.6 kB) - added by thisboyiscrazy on 06/04/07 06:34:34.
customer app for autoconf.php

Change History

05/17/07 11:29:11 changed by thisboyiscrazy

  • attachment autoconfig.tgz added.

05/18/07 11:38:09 changed by thisboyiscrazy

  • attachment autoprovision.tgz added.

Auto Provisioning Module

05/18/07 11:49:50 changed by thisboyiscrazy

The module now works with polycom and grand stream

there was a redisign on how it works. now inside the autoprovision modules directory the is a template files directory. a feature should be added that the user can upload these.

The basic idea is the same take a template from the templates folder substitute vars. and upload the new file

for grandstream it also uses autoprovision/helpers/config.php to create the config files for the phones.

it uses a exec call to "tftp localhost -c put" to upload the files. this should also be change to a "setting". allow the to be a exec call allow the user to select how he want the files uploaded: tftp, ftp, mv, scp, etc.

also todo:
Change "Settings" to "Tools"
Upload of config files
Add in setting where you can set other vars. e.g. NTP server

05/20/07 05:19:24 changed by lazytt

  • summary changed from Auto Provisioning For Polycom Phones to Auto Provisioning For Polycom & Grandstream Phones.

05/22/07 11:41:20 changed by thisboyiscrazy

  • attachment autoprovision.2.tgz added.

Updated version

05/22/07 11:47:58 changed by thisboyiscrazy

Made some updates, mainly cleaned up the code. added a Auto Provision section to extensions and devices, this adds a MAC address field and an enable, disable.

might help with #459 and #103

05/23/07 07:50:17 changed by p_lindheimer

two quick notes. First - we have been doing a lot of work on the auto-provisioning (silently) and it will work quite different. We'll look through your work if there is some stuff to leverage but want to make sure you are aware so you don't put more work into this then you really want to.

another note - all the guielements library will be deprecrated and removed within the next release or so - so be careful how much time you invest into using those libraries. Feel free to find me on the #freepbx-dev irc if you have questions and for now thanks for the submissions.

06/04/07 06:33:49 changed by thisboyiscrazy

  • attachment autoconf.php added.

autoconfig update from phone

06/04/07 06:34:34 changed by thisboyiscrazy

  • attachment extensions_custom.conf added.

customer app for autoconf.php

06/04/07 06:43:23 changed by thisboyiscrazy

Added files
autoconf.php - goes in /var/lib/asterisk/agi-bin/
extensions_custom.conf - goes in /etc/asterisk/

the idea of thies is that you can make Auto Provisioning changes from the phone (current by dialing *456)

For example on polycom phones: set up a default 000000000000.cfg that assings the phone a temp account from the phone then you assign the phone it's actual device account.

This would allow installing and configuing the phones in one job.

TODO: make the extension for Auto Provision changes a feature code
TODO: password protect or use pins sets

11/13/07 12:18:56 changed by p_lindheimer

  • confirmation set to Confirmed.
  • milestone deleted.

07/25/08 08:00:55 changed by ryppn

  • milestone set to Cut Line.

08/19/08 10:26:35 changed by warmbowski

I installed this module on FreePBX 2.4.1.0 (PiaF 1.2) and it all worked fine. That ought to get me through until the official provisioning module comes out in v3.0.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads