How are CEPM settings in snom870-.htm found by SNOM870

How are the contents of the CEPM generated configuration file /tftpboot/hold/snom870-.htm passed to the phone via http? Given that the phone request is:

192.168.6.112 - - [26/May/2017:18:38:08 -0400]
  "GET /snom870.htm HTTP/1.1" 200 224 "-" 
  "Mozilla/4.0 (compatible; snom870-SIP 8.7.5.35
   SPEAr300 SNOM 1.4 000413419A8A)" 

and that snom870.htm contains only this:

<!--# Created on 2017/05/26 16:17:50
#Configuration automatically generated via the EndPoint Module
#DO NOT HAND MODIFY THIS FILE!-->

<?xml version="1.0" encoding="utf-8"?>
<setting-files>
<file url=""/>
</setting-files>

That is 100% you to you and how you have your PBX setup and how you have your phone setup to find the PBX the first time.

These files are both generated by CEPM. The phone is factory programmed to look for snom870.htm.

Where is the setting in CEPM which tells it what filename to use when saving the configuration? Why does CEPM put the actual configuration in a file called snom870-.htm and also create essentially a dummy file that points nowhere called snom870.htm?

For that matter, why is a file called snom870-.htm created at all? It is not looked for by any snom870 I have seen configured. Why is the configuration not saved in snom870.htm?

So I go to the CEPM and I select basefile edit and I select model snom870 and push the model button on the basefile edit page and this is what I see:

<!--#Configuration automatically generated via the EndPoint Module
#DO NOT HAND MODIFY THIS FILE!

<?xml version="1.0" encoding="utf-8"?>
<functionKeys e="2">

I have no idea how to proceed at this point. My choice is to ‘Add Entry’ without the slightest indication what that entry should like beyond a general form of 'File/Permission/Parameter/Value. What file? Permission I assume can be left empty. What parameter? What value?

I expected to see the a phone configuration xml file not what I found.

In addition to the file snom870.htm EPM also generates the files:

snom870-<mac>-firmware.xml
snom870-<mac>.htm

It is these files which the phone looks for on boot and which contain the bulk the the necessary provisioning info.

That only applies if one sets a different basefile for each and every phone. This is not how I have had to provision phones in the past. And it is not how I wish to provision phones in the future. All I want is from CEPM is to produce a single .htm configuration file that actually configures the phones instead of this sideways back-reference disconnected complexity.

Why does CEPM create a provisioning file that the phone does not even look for? Why does it create the file the phone is looking for and yet leave it empty. How is this supposed to work?

The system, when set up correctly, should set up a “base” snom870.htm which your phones can (if set up to) pull and use for their configuration.

The next thing the phone will ask for is the snom-xxxxxxxxxxxx.htm file, which the system generates for every phone. This file includes all of the “specific” information for that phone (passwords, extensions, line configurations, etc.).

If you set up a specific phone without filling out a MAC address, your “line specific” files will look like the lines you are describing.

I’m not sure about your other experience. Every instrument in the network should have a set of basic settings that are all the same (Server IP, DNS, etc.) and at the very least, have a set of settings that are specific to each phone in the system (a different password to connect to the server, different extensions, and different labels).

This is how the “sideways back-referencing” system works - it’s the structure specified by the phone. The fact that the phone is looking for a file called “snom870-macmacmacmac.htm” should be straight forward enough to let you know that the system is working within the confines of what your chosen phone is doing.

Thank you. I appreciate the information very much. My problem likely is that I have limited understanding of how all this is supposed to work, which is why I selected FreePBX and the CEPM in the first place.

Our phones were originally provisioned using a mixture of manual configuration and provisioning files generated by an earlier version of CEPM. Under that regime all that was placed in the phone’s setting url was http://192.168.6.9:83. This proved sufficient and whatever files the original CEPM generated appeared to me to be found by each phone and used. It is possible that a similar problem existed even then and I simply worked around it using a symbolic link to the generated file. I can no-longer recall.

To date we have not used phone specific configurations. Other than the device number all of them are configured identically. This works for us and I have no great desire to increase the administrative burden by adding additional phone specific customisation.

However, I can find no clear reference as to how the ‘model’ configuration page in CEPM is supposed to work. When I go to that page all I see is what i wrote above:

<!--#Configuration automatically generated via the EndPoint Module
#DO NOT HAND MODIFY THIS FILE!

<?xml version="1.0" encoding="utf-8"?>
<functionKeys e="2">

It does not matter which model Snom phone model I pick, they all display the same xml template.

Looking at the Snom documentation (http://wiki.snom.com/Category:Auto_Provisioning:Configuration_Files and http://wiki.snom.com/Features/Mass_Deployment/Setting_Files/XML/Container#Setting_Files_Container) it appears that the contents of this page should have something like:

<?xml version="1.0" encoding="utf-8" ?>
 <setting-files>
  <file url="URL(1)" />
 </setting-files>

I infer that in my particular case I should have this:

<?xml version="1.0" encoding="utf-8" ?>
 <setting-files>
  <file url="http://192.168.8.9:83/snom870-.htm" />
 </setting-files>

I can add the file tag manually but the presence of the <functionKeys e="2"> in the page display mystifies me. Why is it there? Where are the <setting-files> tags.? Have I completely misunderstood how this is done?

The phone will pull down it’s Mac specific xml we generate. We generate those by your mappings in the extension mapping section of EPM where u define what extension maps to which MAC address and model. That is what under the covers generates the proper config file for each phone.

Thank you. I understand that approach. However, our setup basically uses a single model specific provisioning file. How do I set things up from within CEPM to accomplish this? I thought that the model.htm button would take me to a page that had a means to do this but what I see there I have reproduced below and it makes no sense to me.

<!--#Configuration automatically generated via the EndPoint Module
#DO NOT HAND MODIFY THIS FILE!

<?xml version="1.0" encoding="utf-8"?>
<functionKeys e="2">

Does it need to make sense to you? I would say your idea of provisioning multiple phones with a single model specific file makes no sense to me.

With EPM, the idea is that you fill out GUI fields, boot your phone and it works. There generally no need for users to know what settings are stored in what files for what purpose. If there’s a specific setting you want to push to phones that is not available in the GUI, EPM provides the basefile edit feature for advanced users. You use this to tweak minor changes to your phone config, there is no need to use it to build configs from scratch.

Is the purpose of this thread to gain understanding, or is there a specific goal you are striving to attain?

We do not use model specific files. We write out specific files for each phone as its required for all the username and password stuff. You are way over complicating this. Let EPM do the work for you as outlined above.

I am simply trying to understand how this is all meant to work because it has changed from what I previously experienced. We initially provisioned our phones by hand using the web admin i/F provided by each phone. Then we obtained the CEPM module to ease the administration of changes. With the initial version of CEPM that we used I do not recall ever running across the need to employ MAC addresses but my lack of recollection does not mean that that feature was not available. In any case we did not use it as our requirements for phone provisioning basically came down to simply setting the BLF labels and actions which were the same across all phones of the same model.

For that reason a single model specific configuration file was all that seemed necessary. A single universal provisioning file also seemed to me to be the simplest solution. So that is what we used, without difficulty. At least up until the AJAX rewrite of the CEPM. Since then I have been confused by the, to me, inexplicable behaviour of the revised version.

I understand the use case for device specific provisioning files and now that it is explained to me I can see where my assumptions led me astray. However, our employment of phones would not really benefit from this form of provisioning. It would simply result twenty or so identical provisioning files each tied to a MAC address.

In our earlier setup using the earlier version of CEPM when we added a phone we simply used the devices setup interface to set the Setting URL: field in the Advanced Settings tab to: http://192.168.6.9:83, pressed Apply followed by Reboot and the phone was provisioned. There was seldom, if ever, any need to go into CEPM to add a new phone. All that was required was entries in the Device and User modules.

That prior experience is what I have been attempting to duplicate. it seemed the simplest solution that met our needs when we first used CEPM.

However, it seems impossible to do this with the present version of CEPM. If I enter this in the model.htm page:

File:      setting-files
Perm:  
Parm:    file url="http://192.168.8.9:83/snom870-.htm"
Data:

Then this is what ends up in the /tftpboot/snom-870.htm file that is generated:

<!--# Created on 2017/05/30 10:53:29
#Configuration automatically generated via the EndPoint Module 
#DO NOT HAND MODIFY THIS FILE!--> 

<?xml version="1.0" encoding="utf-8"?>
<setting-files>
<file url="http://192.168.8.9:83/snom870-.htm" perm=""></file url="http://192.168.8.9:83/snom870-.htm">
</setting-files>

This appears to me to be invalid xml and the test phone evidently will not process it. However. when I hand modify the file to contain <file url="http://192.168.8.9:83/snom870.htm"/> instead then it seems that the test phone provisioning fails and the network and user account settings disappear.

It seems to me that the model.htm configuration method in CEPM simply does not work and cannot be made to do so by any action that I can apply through the module itself. I think this a bug but the comments I received regarding my chosen approach indicates that this may be the intended behaviour.

I can proceed from this point by either going down the MAC route of having separate provisioning files for each and every phone, all of which will be identical. This seems to be the way FreePBX is coercing me but which is contrary to the way we have done this to date. Or I can append a local file name to the provisioning address in each phone and logically link that file name to /tftpboot/snom870-.htm. I know that this works because I have tested it with the existing files and the test phone.

In any case I have learned a great deal from this experience.

EPM requires the MAC. Has from day one. That is the whole basis of how it works. You need to provide the MACs. It needs to know which MAC belongs to what extension as the phone needs the extension and SIP secret. You can not do it any other way. Just put int he MACs. Follow the wiki for EPM and it will work.

Somehow that little piece of knowledge escaped me. And yet it never seemed to matter until the new version of CEPM came out. Anyway, if that is the way it works then that is the way it works. The ridiculous thing about this is that the only thing that ever changes on the phones is the BLF labels.

I will load the MACs tomorrow and see where that leads.

You are not correct. The extension and SIP secret are unique to each and every phone. It has to write out a config for each Mac or the phone would never know where to register. This is how every single SIP phone works. Just think through the logic here please.

Recall that i had manually configured these phones before we purchased CEPM. I can only infer that the older version of CEPM did not overwrite the values set on the phone for we did indeed set the blf lables and colours via CEPM and this did not disable the phones.

In any case. I know better now.