Customizing using the html directory

Christian Stredicke
CEO of Vodia Networks

Some versions ago, we have added the possibility to include domains in the customization using the html directory. This becomes useful when modifications through the web interface are too clumsy.

The key for this is a setting in the pbx.xml called http_content. If it is set to all, then the PBX will attempt to read files for users and domains, if it is set to domain, then it will do it only for domains, and if it is set to none, it will not read any files from the file system.

Generally the path name for reading files from the file system is html/domain/user/filename for user-dependent files, html/domain/filename for domain-dependent files, and html/filename for global files. There are a few catches with it, for example if the domain name is the same like a filename. However because the file names usually end with file type suffixes, that case should be really exceptional.

The logo is a good example for this. By default, the path for the logo is html/img/logo.svg. Lets say you have a domain called abc.xyz, then you could put the logo for that specific domain into the path html/abc.xyz/img/logo.svg. You could even put a specific logo for one user, although that should be a unusual case, it would still be possible.

There are still some exceptions for files that will remain global. Those files are the pnp.xml, the ringtones.xml and the dialplans.xml. Those files are at this point simply global and it does not make sense to read them from a domain context.

The possibility to drop the logo in the domain and user directory will be available in versions after 56.0.

So for example for reading the logo, the PBX tries the following paths:

  1. User-level webpage customization
  2. Domain-level webpage customization
  3. System-level webpage customization
  4. File system: <pbx working dir>/html/<domain>/<user>/img/logo.svg (if htttp_content = "all")
  5. File system: <pbx working dir>/html/<domain>/img/logo.svg (if htttp_content = "all")
  6. File system: <pbx working dir>/pbxwebui/img/logo.svg (if htttp_content != "none")
  7. File system: <pbx working dir>/html/img/logo.svg (if htttp_content != "none")
  8. Builtin logo