Snom Auto Provisioning Enhancements for TrixBox Mass Deployment w/ TEMPLATES!!

dfwonsite
Posts: 53
Member Since:
2006-07-09

NEWEST VERSION AVAILABLE at the following link :

Snom Auto-Provisioning w/ Templates LATEST (0.2.12)

Ok, here we go... I've seen posts about this, and though this may be a bit rough, i think it's a step in the right direction.

Snom Auto-Provisioning w/ Templates v0.02

This script set puts an additional entry below "Snom Phones" in the endpoint manager.

The added entry "Snom Templates" includes a "default" template which will auto populate any newly created templates. DO NOT DELETE the default profile or there will be no default settings to pull from.

The created templates are used in the normal snom endpoint manager, inside each mac profile, where you would normally select phone type, you will find your profiles in a pulldown menu. When this is selected, the settings within that profile will be given to that mac via the /var/www/html/snom-ap.php script. Make sure to point all of your snom phones "setting server" to your trixbox ip ONLY. (No URL, just the IP) or, preferrably, use dhcp option 66.

this setup is crude, but effective & managable, if anyone wishes to help clean it up and make it "prettier" be my guest :) I will check back here to answer any questions/complaints :)

Let me know what ya'll think, seriously :)

-Andy

PS - the fkey settings in each INDIVIDUAL mac config will OVERRIDE any set in the templates. Also, on the Template Edit page, set Active to "1" to make a template active, and "0" to disable it.

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



dfwonsite
Posts: 53
Member Since:
2006-07-09
IMPORTANT UPDATE

My Apologies, but any downloads prior to 9:15 AM July 6, Central Time, are missing 2 Key files for this package to work. I have corrected the issue and updated the link in the original post above to point to the correct file. Please re-download and try again.. sorry guys i submitted the original late at night i was tired :) won't happen again LOL

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



Texas1
Posts: 49
Member Since:
2006-06-11
Is it possible to add 190s?

Is it possible to add 190s?



Texas1
Posts: 49
Member Since:
2006-06-11
Is it possible to add 190s?

Is it possible to add 190s?



dfwonsite
Posts: 53
Member Since:
2006-07-09
Never worked with them personally, but....

I have never worked with 190's personally, but it should be possible.

To add them you would login to the linux CLI as root (or su to root) and type the following commands:

ln -s /var/www/html/snom.htm /var/www/html/snom190.htm
chown asterisk.asterisk /var/www/html/snom190.htm

That should point your 190's at the correct php script, from there, it is just a question of if the configuration parameters are the same for the 190s as they are for the 300 series phones.

Are you using dhcp option 66 to point your phones to the trixbox machine or just manually entering the ip in the phone? just curious to see how this is being implemented

I don't think the firmware auto update portion will work though...

-Andy
PS - Let me know if this script is compatible with the 190s, would be very good to know, if it is i'll include symlinks in the next versions' install.sh script.

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



Texas1
Posts: 49
Member Since:
2006-06-11
I tried it and I can't get

I tried it and I can't get into the SQL database. I tried the default PW and the one I thought I changed it to, no luck.



dfwonsite
Posts: 53
Member Since:
2006-07-09
Make sure the password is correct in the following files -

I need to re-write this so it all pulls from one file, but for now -

there are mysql user/password combos in the following locations in the directory where you unarchived the install package :

in the very first line of install.sh - the line :

mysql --user=asteriskuser --password=amp109 --database=endpoints < ./sap-tables.sql

also in the file var_www_html/snom/db_conf.php the lines :

$snom_dbhost="localhost";
$snom_dbuser="asteriskuser";
$snom_dbpass="amp109";

and finally, in the file var_www_html_maint_modules_11_endpointcfg/db_conf.php, the same lines :

$snom_dbhost="localhost";
$snom_dbuser="asteriskuser";
$snom_dbpass="amp109";

and also, you edit var_www_html/snom.htm the line :

setting_server!: http://192.168.1.200/snom-ap.php?mac={mac}

replace 192.168.1.200 with the ip address of your trixbox machine.

and finally, to make the install script setup the symlink for the 190's,
in install.sh :

change the lines that read :

cp -R -v snom* /var/www/html
ln -s /var/www/html/snom.htm /var/www/html/snom300.htm

to read :

cp -R -v snom* /var/www/html
ln -s /var/www/html/snom.htm /var/www/html/snom190.htm
ln -s /var/www/html/snom.htm /var/www/html/snom300.htm

if that doesn't fix it, check your privledges table in phpmyadmin on the trixbox machine to make sure you have a user allowed from localhost with the proper permissions for the asterisk and endpoints databases.

and btw - are you providing the config ip to the phones via dhcp? (option 66?)

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



dfwonsite
Posts: 53
Member Since:
2006-07-09
Not much feedback?

I am assuming however rough this setup may be, that it must be working for ya'll, i've noticed quite a few downloads, and no feedback good or bad on here really...

To those that downloaded this script set, let me know how it's working out for you :)

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



brianmaas
Posts: 7
Member Since:
2007-05-10
I just set this up last week

I just set this up last week for an installation of 50 snom 360's. Thank you so much. This made life so much easier.

I think the interface is very easy to use. It would be nice to interface that snom script that reboots all the phones, so after a global setting change, they can all be updated.

I uploaded to the directory the beta version of the snom 360 firmware 6.5.12-beta. I put this text in the gui "6.5.12-beta" and it worked flawlessly. On the next boot all the phones were updated to that version.

BTW - the BLF pickup function with this new snom firmware works great. Finally call pickup with a blinking BLF button on the Snoms just like on the grandstreams.

Thank you, thank you, thank you.

- Brian



dfwonsite
Posts: 53
Member Since:
2006-07-09
Awesome!!

Thats great to hear, thanks for the reply, this set is pretty basic, but for me, was just the functionality i needed. I, too have to manage an ever growing network of Snom 300's, 320's, and 360's. On One server is our trixbox machine with these scripts on it, and the other server thats about to go live is a is a vicidial predictive dialer to be used for our PR campaigns in the Oil & Gas Industry. Currenty there are 47 Stations including the Vicidial seats. I do want to hear as much feedback as possible, and would even incorporate modifications made by end users to improve the overall functioning and design..

I would like to see if i could take this a step further to be able to manage the extensions for multiple TB servers from a "Master" endpoint manager.

-Andy

PS - are you giving the phones the server ip by dhcp option 66?

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
Fatal error

Thank you for the script!

After running script when I go to Endpoint Manager ->Snom Phones, I'm getting the following error:

Fatal error: Smarty error: [in endpoint_snom_list.tpl line 10]: [plugin] unknown tag - 'translation' (core.load_plugins.php, line 118) in /var/www/html/maint/modules/11_endpointcfg/libs/Smarty.class.php on line 1095

What can be wrong and how to fix it?



dfwonsite
Posts: 53
Member Since:
2006-07-09
What Trixbox version are you using?

What version of trixbox are you installing this on? I've only tested this on 2.2

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
2.2.4

I just downloaded 2.2.4 and decided to try your script



dfwonsite
Posts: 53
Member Since:
2006-07-09
Aha!

Thats probably it, i haven tested it on that version yet, I will download the iso and install it to a virtual machine and see what i can come up with. Stay Tuned. (Circa this weekend)

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
functions.php

Andy,
I've found description of similar message here:
http://www.trixbox.org/forums/trixbox-forums/trixbox-endpoints/ho...

After adding the lines into endpoint_snom.php and copying missing functions.php into
/usr/share/pear/include
the error message is gone, but I'm not sure if this is a correct fix.
Please check when you have time.
Vadim



dfwonsite
Posts: 53
Member Since:
2006-07-09
if you see...

If you see "Snom Templates" in the endpoint manager, then this fix worked. let me know. :)

Thanks!

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
yes, I can...

Yes, I was able to select templates in "Phone Type" drop down menu and was able to download different firwares. I guess the fix worked.

Thanks!



pwalker
Posts: 2
Member Since:
2007-05-14
firmware.php script

Hi dfwonsite/Andy,

I'm just trying out your version of the endpoint manager, Cool Stuff!
Do you already have an updated version of it?
and - my main question: Should the firmware.php script work? It doesn't really work for me... To me, it looks like there's something wrong with that "foreach" loop after splitting up the http user agent.

Thanks and best regards,
Philipp



dfwonsite
Posts: 53
Member Since:
2006-07-09
2.2.4 compatibility

I just did an install of TB 2.2.4 over the weekend, and installed the Snom auto provisioning scripts I posted above, and it does in fact appear to install and function on this version of TB.

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



trixbox-2412
Posts: 6
Member Since:
2007-07-09
I cannot seem to get it to

I cannot seem to get it to work, I manage the first part of the fix but this now comes up

Warning: main(include/functions.php): failed to open stream: No such file or directory in /var/www/html/maint/modules/11_endpointcfg/endpoint_snom.php on line 165

Warning: main(): Failed opening 'include/functions.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/maint/modules/11_endpointcfg/endpoint_snom.php on line 165

has anybody got the functions.php file or know where I can get one from.

this is killing my brain :-S



apple01
Posts: 138
Member Since:
2007-05-17
RE: I cannot seem to get it to

Please see my post above. Here is how did I fix it:

1) You need to add these lines to endpoint_snom.php ( in directory /var/www/html/maint/modules/11_endpointcfg
into the end of this file, but BEFORE line $smarty->display($template);
----------------------------------------------
if(isset($_GET['trixbox_Language'])){
$language = $_GET['trixbox_Language'];
}else{
$language = "english";
}
if(file_exists('language/'.$language.'.php')){
include('language/'.$language.'.php');
}
$smarty->assign("language", $language);
include_once('include/functions.php');
$smarty->register_function('translation', 'specialCharacterReplace');
----------------------------------------------

2) copy /var/www/html/maint/includes/functions/functions.php to
/usr/share/pear/include



trixbox-2412
Posts: 6
Member Since:
2007-07-09
functions

I don't have a functions folder in /maint



apple01
Posts: 138
Member Since:
2007-05-17
It should be there

I did clean install yesterday from ISO 2.2.4 and it was there. It should be in "includes", not in "maint". The full path is /var/www/html/maint/includes/functions/functions.php



trixbox-2412
Posts: 6
Member Since:
2007-07-09
yeah sorry sorry I was

yeah sorry sorry I was monging it, I missed out the include folder :-P

its working now thanks guys



dfwonsite
Posts: 53
Member Since:
2006-07-09
Perhaps this will help...

you can get those files here, they are from my 2.2 install, but i believe they should work... if not, let me know. Just follow apple01's instructions up there and you should be good to go....

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



dfwonsite
Posts: 53
Member Since:
2006-07-09
great!

okay, i was a minute or so late LOL - guys i need a list of parameters that installers think should be standard across all snom installs, i.e. volume(s) (handset, headset, speaker, ringer) etc, to try and eliminate having to add common parameters by name... perhaps a slider or drop down for the volumes, a specific spot for dialplan, etc.... shoot some ideas at me and we'll see what could be done to make this setup even better :)

-Andy
PS - trixbox-2412 - glad you got it working, let me know how it works out for you :)

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



trixbox-2412
Posts: 6
Member Since:
2007-07-09
being blonde again

trying to work out, how to make another template. it has 3 box's tamplate name firmware and active , I fill this in but how do I set perameters on the phone like language and time etc as it seems its still using phone defualt ???

ps Andy its working great thanks just need to iron out the few creases.



trixbox-2412
Posts: 6
Member Since:
2007-07-09
phone type

I just can seem to add a template to the phone type. the default works but I need to add langauge and time zone different to the default one.



dfwonsite
Posts: 53
Member Since:
2006-07-09
try scrolling down on the edit template screen

i seem to remember that the edit template link is hidden on the edit template page.....i will be going on lunch at noon, so if you want, feel free to call me on my mobile - 817-851-4723 and i'll see if i can't help over the phone....noon Central Time, btw....

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



dfwonsite
Posts: 53
Member Since:
2006-07-09
Walk through..

Ok, i'm going to see how well this works... going to try a screen shot walk through...

by clicking on Snom Templates, you should come to this screen -

Click on Create New Template - which should bring you here -

Fill out the name, firmware version, and put a "1" to make the template active, click submit.

you should be sitting at this screen after you submit -

Click Edit Template Settings - you should now be here -

and the lower half of that screen -

When done edit the individual settings, click the save button next to the edited setting, to create a new entry, fill out the blank spaces at the bottom with the parameter name, and the value for that parameter...when done editing the template completely, click the return link at the bottom of that page....

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



dfwonsite
Posts: 53
Member Since:
2006-07-09
Language & Time Zone

I;ve got the language and timezone settings in the default profile, should just need to update them to fit your need, they appear to be at the top of the list of parameters, in the default profile, so they should be in the same places in your newly created profiles.

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
no edit link for me ...

I don't see "Edit Template" link. Also, How to delete template?

Something is missing here ...



dfwonsite
Posts: 53
Member Since:
2006-07-09
Doh!!!

OMG!! this whole time i've never had to delete a template, but your absolutely right, there is no way to delete one short of just removing the data from mysql.... i'll have to fix that!! LOL

-Andy

Edit - I see what your referring to about the edit template... on the listing of the templates, you simply click on the template name, then in that screen, to edit the individual settings, click "Edit Template Settings"

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
"Edit Template Settings" is missing

For some reason I don't have "Edit Template Settings" link on "Edit Snom Template" page.
Unfortunately I can't post screenshot anywhere.
Is it possible that we download not the same version as you have?



dfwonsite
Posts: 53
Member Since:
2006-07-09
Check for scroll bar on right....

Check on the Edit Snom Template page and see if you can scroll down, i seem to remember on a windows machine that the link was below the visible area of the screen until you scroll down, on my MacBook it is fine though... and there is only one version out in the wild....although as soon as i have the time i plan on making many improvements and getting a version 0.03 out :) 0.01 was only up for download i want to say a day or 2 back in early july....

-Andy

Actually, if you have a minute, try ringing me @ 817-348-9881, Ext. 2007

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
You are 100% right :)

It is invisible and can't scroll down using the mouse. Had to click on the page and use arrow down key to find it!!!



dfwonsite
Posts: 53
Member Since:
2006-07-09
Good deal...

Thats awesome!! i was gonna say, i'm sure i didn't put something out there that was missing something that important! LOL

Sorry i haven't gotten around to adding still more features, but i work a normal M-F 9-5, so needless to say, being a full time IT Director for an Oil & Gas investment firm keeps my day busy, and by the time i get home, i don't even want to look at the computer, would rather spend my off time with my kiddo's :)

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
Thank you for your help

and check your PM



dfwonsite
Posts: 53
Member Since:
2006-07-09
got the PM

check your email :)

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



trixbox-2412
Posts: 6
Member Since:
2007-07-09
no edit template either

heres a screen shot of mine



apple01
Posts: 138
Member Since:
2007-05-17
RE: no edit template

Here is how to find it:

1) click on any free space on that screen you posted

2) use "arrow" key on the keyboard to scroll page down until you see the link.



dfwonsite
Posts: 53
Member Since:
2006-07-09
Going to have to.....

Going to have to address that problem in the next version, stay tuned kids...same bat time, same bat channel! :)

-Andy

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



peteradtel
Posts: 38
Member Since:
2007-07-23
any further development on this project

Just wondering if there is any further development planned and when might me c?



dfwonsite
Posts: 53
Member Since:
2006-07-09
SAP Trixbox 0.2.12 Available

Snom Auto-Provisioning w/ Templates v0.2.12

With a few user contributed fixes......

Thanks guys!

PS - for those already running this, there is a upgrade.sh file included that does NOT modify your mysql data.

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



networkjed
Posts: 1
Member Since:
2006-08-01
Just a heads up, Version 7.x

Just a heads up, Version 7.x of Snom's firmware is migrating from the older .html files to a newer .xml file config setup. While Version 7.x is backwards compatible there are some new enhancements to the dial plan that can ONLY be used if you are using the newer 7.x firmware on the phones.

Here is a link from the snom wiki outlining the changes. It's actually documented quite well compared to most snom documentation.

http://snom.com/download/massdeployment_v7.pdf



peteradtel
Posts: 38
Member Since:
2007-07-23
Link no work

http://www.coreexploration.net/download.php?f=sap-trixbox_0.2.12....
File does not exist. Make sure you specified correct file name.



Roy
Posts: 20
Member Since:
2007-01-12
Where's the file?

Hello Andy,

I've been reading up on your provisioning system and its looks great. But when trying to download nothing gives....

Any idea's?

Btw, will it work on tb 2.4.0?

Roy



dfwonsite
Posts: 53
Member Since:
2006-07-09
oops!! link fixed

sorry about that!! file wasn't uploaded to the server like it should have been.... fixed! and i have not tested it with 2.4.x yet, so i cannot guarantee it to work with that version.

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



csteven
Posts: 1
Member Since:
2008-01-27
Hi, I'd like to download and

Hi,

I'd like to download and use your snom provisioning tools but the link appears to be broken, is the code still available?

Cheers



queen
Posts: 1
Member Since:
2008-02-04
how to use this script

I am trying to figure out how to use this script and put different mac addresses and usernames, userpass. Can't find in which file this is done.

Any help will be greatly appreciated.

Queen



dfwonsite
Posts: 53
Member Since:
2006-07-09
Sorry for the broken link...fixed now.

Sorry for the broken link, i have since fixed it so this script can be downloaded, it needs to be updated for TB 2.6, but does work on 2.2 and 2.4 to my knowledge.

UPDATE - correction, i do not know if it works on 2.4, i realized my error, i've tested this up to 2.2.4 personally.

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



ariedel
Posts: 1
Member Since:
2008-03-13
Great Tool !

Great Tool, but little problems with TB 2.6

Here ist a patch for 0.2.12 for TB 2.6.0
http://paste-bin.com/13310



dfwonsite
Posts: 53
Member Since:
2006-07-09
Has anyone...

Has anyone with a 2.6 install had a chance to try this? i've been too busy myself...

-Andy

DFW Onsite Technology Group
(214) 644-1900

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



dfwonsite
Posts: 53
Member Since:
2006-07-09
A step further....

I would like to see what ppl think about taking this a step further, i've had the idea in my head for a while, i would like to see about the possibility of having the phones auto detected, and an extension within a pre-specified range automatically created in freepbx, and then the phone automatically rebooted and register as the new extension, this would make life EXTREMELY easy for installers, as well as end users who choose to install trixbox themselves, and i won't deny it, i would get some recognition, too :) anybody have any ideas on where i would start on such a concept? i'm open to even co-developing this with some other php developers.

--

-Andy

DFW Onsite Technology Group
(214) 644-1900



apple01
Posts: 138
Member Since:
2007-05-17
I like Aastra XML script

I like Aastra XML script approach where user can login into the phone with his/her number and voicemail password and then phone pulls all the necessary configuration from the server.

As for FreePBX, it will be helpful if I can enter just names and the rest of the settings is taken care of according to User's template where you can specify default options you need and the range of extensions.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.