Updating an EPM Brand Package with a new Family/Product

I’m having some difficulty trying to add a new phone/sidecar combination (7961+7914) to the Cisco “brand”.

I can provision 7961G phones and make calls, then manually edit to add 7914 capabilities, show BLF and have speed dials for other extensions.

I’d like to get the 7914 able to be auto-provisioned initially, and then build capabilities for phone-specific speed dial and presence xml (and perhaps some other Cisco-isms) into the EPM so I don’t have to edit the config files when I use these features (or re-edit when I make an extension change).

This is a new attempt on FreePBX 2.10 after getting 2.9 to perform some of this.

I have done the following:

  • created a new “product” dir and files by cloning/renaming the sip79x1G
  • tweaked the names, family_data.json and phone.php files for the new family_line
  • updated the brand_data.json file including incrementing the last_modified
  • tweaked the base.php file to incorporate the new family_line
  • tar/compressed the whole Cisco tree including the new dir/files
  • turned on the FreePBX debug log
  • checked the Set Debug Mode on the EPM Settings page
  • uploaded the new “brand” file via Manual Endpoint Modules Upload/Export page

The output to the FreePBX web page is:

Extracting Tarball…Done!
No ‘brand_data.xml’ file exists!
Removing Temporary Files…Done!

Going into the MySQL DB shows that nothing is loaded into the relevant endpointman_* tables. Clearly something’s Not Quite Right.

The FreePBX log has nothing. The FreePBX debug log has minimal output:

2012-Oct-26 16:24:25 /var/www/html/admin/modules/endpointman/includes/advanced.inc:99 [WARNING]: date() expects parameter 2 to be long, string given

2012-Oct-26 16:24:25 /var/www/html/admin/modules/endpointman/includes/advanced.inc:99 [WARNING]: date() expects parameter 2 to be long, string given

2012-Oct-26 16:24:25 /var/www/html/admin/modules/endpointman/templates/freepbx/compiled/advanced_settings_manual_upload_1349511796.php:22 [NOTICE]: Undefined index: xml

Question: Is there some other “debug” setting I’m missing that could help me discern what part of the new file set is causing a problem in the upload and subsequent DB population process?

Platform details: PBX in a Flash “purple” distro under VirtualBox on a Mac. This installed Asterisk + Gareth’s Cisco BLF patch, FreePBX, I updated to EPM and uploaded the latest Cisco brand before I started.

Provisioner is not the same thing as endpoint manager. Endpoint Manager uses provisioner.

EG you need to modify two repos: https://github.com/tm1000/freepbx-endpointmanager

Trying my hand at Github and some local git installs to see if I can get the files where they need to be in both repos. Stand-by…

I need to look into this. I hope this weekend I will be able to do so and I’ll update you when I get it working.

Nothing like a few strategically placed “echo” statements… It appears there is a bug in functions.inc update_brand() that builds the wrong temp dir path rather than what the upload_brand() created when un-tar-ing:

$temp_directory = $this->sys_get_temp_dir() . "/epm_temp/";

should read:

$temp_directory = PHONE_MODULES_PATH . "temp/";

Now parsing occurs on my files as it can find them. With a minor family_data.json typo fixed, I’m loaded into the DB and it shows up in the Endpoint Configuration Manager. Now off to provisioning testing.

I’ll add some additional error checking and submit a pull request of the updated functions.inc and cisco brand once I test this out and get my git updated.

Don’t use PHONE_MODULES_PATH. ‘temp/’ thats depreciated because it can fill up the systems disk drives very quickly.

Also. I encourage you to use ‘dbug(‘message’)’ and run ‘amportal a dbug’

OK - I’ll swap the temp dir locations to both use /tmp.

Thanks for the tip on the debugging - I’ll give it a hefty exercise testing the integration of Cisco-isms in the configuration process.

Let’s see if we can get some of the Cisco mystery (misery?) worked out.

Just use: $this->sys_get_temp_dir() . “/epm_temp/”;

The function sys_get_temp_dir asks the system where to store temp files. Thats the important part.

Thank you very much! Remember to pull request when you are done.

Looks like the 7961 + 7914 extension provisioning is working properly. This includes adding a 7914 firmware image name entry/variable to the End Point Configuration Manager web page (you’ll need the latest 7914 FW which works with SIP).

Note this is only for extensions presently, not Cisco speed dials or BLF which will be the next phase of this project.

Just need to tidy up the names a bit and it can be submitted for review. Do I need to make updates to the brand_data.json md5sum and last_modified before submitting? The last_modified looks like a system date, but from what is the md5 checksum created? It’s kind of a chicken-n-egg thing.

Time to prepare for Sandy heading this way…


EPM doesn’t work at all on my FreePBX. When I try to manually upload a product I get the Updating an EPM Brand Package with a new Family/Product. I have been geting the Extracting Tarball…Done!
No ‘brand_data.xml’ file exists!
Removing Temporary Files…Done!

Message. I am not knowledgeable enough to delve inside the program… Is there a way to fix this

I thank you in advance


What version FreePBX? What operating system are you running it on?

Manual upload doesn’t work at the moment. However the online repo downloading works fine. Why do you need to manually upload it?


Thanks for the quick replies. I am Running FreePBX 2.8 at RentPBX. When I try to down the automatic update I get this:

"Not able to connect to repository. Using local master file instead.

Aborting Brand Downloads. Can’t Get Master File, Assuming Timeout Issues!

Learn how to manually upload packages here (it’s easy!): Click Here!"

I did change the DNS to the Google free DNS service and am still getting the same message.

I am a newbie, an ignoramus to say the least I tried the suggestion to do it manually and went to the provisioneer site as per the HERE link, … Links are broken and I wasn’t able to do anything. I seached forums and landed to this manual updating which, now I know doesn’t work.

This is one of the problems with outfits like RentPBX that try and virtualize a package they know nothing about. They charge customers for a broken, almost end of life version of FreePBX. We have to pickup the support and they get the revenue.

Question, would you be interested in a high quality hosted option officially endorsed by the FreePBX team?

You never know, it is almost Christmas.

Of course I would … You can contact off site

lmisteus at yahoo dot com.

I am interested …

Back online after Sandy made a mess of the local (Long Island) electric grid.

I have updated both the installer.inc and functions.inc to expand the .tgz file to the system “tmp” dir before loading it. I added support for echo-ing the Family and Model names as they are added to the DB as well as “Enable Debug Mode” global to give additional info as processing progresses.

I also have a new “cisco” brand file that includes support for 7961 + up to 2-7914 sidecars for provisioning extensions. Provisioning “speed-dials” and BLF is quite a bit more complex and will be the next hurdle I’ll try to tackle.

Q: I have a Git setup and a fork of the master Github Provisioner repository. But I don’t see installer.inc and functions.inc in the fork to be able to edit/commit this. I am a Git newbie, so it’s quite probable this is a self-inflicted problem…

Did you ever manage to get your Git repository set-up? I’ve got pretty much the same set-up, and could do with setting up the BLF/Line buttons.

If you’re interested, I’ve also updated the Gareth-BLF patch so it applies cleanly on Asterisk

I did get one operating, and did an initial submission for a fix to the manual brand update process, but I then tried to re-sync my fork to Andrew’s updated EPM main and managed to foul things up :frowning: I may just have to delete and re-fork the GitHub version and start over locally. Any advice on a local Git setup to make that sort of process easier and less apt to sync-ing problems, or am I incorrect in trying the fork approach? I would like to get on with finishing the Brand file and doing some “speed dial” enhancements for Cisco since it looks like the other brands are going the new EPM route.

I’d be interested in an updated patch as I want to install a new version of my VM with this functionality. I might even try it with Asterisk 11…

Many thanks for any guidance you can provide.

jmce, would it be possibly to send me the Gareth-BLF patch that works with or post a link to it somewhere?