02. NoojeeProvision.xml settings

NoojeeProvision.xml

The following describes each of the settings in NoojeeProvision.xml and what they mean. 

Database

<NoojeeProvision.Database>

Specifies how Noojee Provision will connect to the Asterisk realtime database.

Type
The name of the database type (e.g. MySQL). Currently this can be any value.

Class
The JDBC class used to connect to the database. See your database provider for the appropriate name.

Server
The IP address of the database server

Name
The name of the database which contains the Asterisk realtime tables.

Username
The account used to connect to the database.

Password
The password used to connect to the database.

Services

Specifies what protocols are available for the handsets to download settings files. Currently HTTP and TFTP are supported. You can enable one or both, but at least one must be enabled.

KillPort
The IP port used by the Kill application to shutdown Noojee Provision.

The standard method to start/stop  NoojeeProvision is to use /etc/init.d/njprovision.

To stop the Noojee Provision service manually run:

java -cp NoojeeProvision.jar au.com.noojee.provision.AppKiller

ArpLookupEnabled

Controls if we use an Arp Lookup to obtain the handset's mac address. The preferred method is to leave this disabled and use the requested filename to derive the macaddress. Almost all handsets will request a configuration file which includes

their mac address in the filename. This technique is generally more reliable than Arp look up as it will work in an environment where the handsets are on a remote network. Arp Lookup will only work for handsets on the local network.

Once we have a mac address we cache the IP/Mac address mapping for 5 minutes.

TemplateRoot
The root of the directory where the settings file templates will be stored. This is normally set to 'filesystem/handsets' which maps to /opt/njprovision/filesystem/handsets

FileService

The FileService describes the set of files which can be served by either the HTTP or TFTP service on request.

The FileService differs from the Template Paths in that files are served without the need to identify the manufacturer. This can be used as a standard tftp file service. Files that have an extension of '.vm' are pre-processed via the Velocity template engine.

The FileService can also be used in an environment where IP to Mac address resolution does not works (although this is rare as Noojee Provision uses a number of techniques to ensure that we can obtain the Mac Address even in distributed environments).

The FileService can also be used to serve files to devices other than handsets. Some networks may require our TFTP service to serve up files to other devices such as PCs during boot. The file service can be used to accomplish this.

If a handset requests a file which has an identically named file for the handsets manufacturer and the file service then manufacturer's file will be transmitted. This of course assumes that the handsets manufacturer can be identified.

More than one FileService may also be specified if additional RootDirectories need to be added to the search path.

RootDirectory

The fully qualified path to the location of the files which are to be served by the File Service.  This should normally be set to 'filesystem/root'.

preprocessor

The 'preprocessor' attribute appears on the FilesService tag and defined what if any preprocessing of files is performed before the file is handed out.

Currently the following preprocess values are supported:

Null  -  no preprocessing is down. This is suitable for serving binary and text files.

Velocity - each file is preprocessed as a Velocity Template before been transmitted. 

 <FileService preprocessor="Null">
       <RootDirectory>config/fileservice</RootDirectory>
 </FileService>
 <!-- files in the fileservice-vm directory are pre-processed by velocity -->
 <FileService preprocessor="Velocity">
       <RootDirectory>config/fileservice-vm</RootDirectory>
 </FileService>

HTTP

Controls how the Noojee Provision HTTP service operates.

Enabled
Set the value to 'True' to enable the HTTP service and False to disable it.

IPAddress
The ip address the HTTP services listens for requests on. Leave blank to allow it to listen on all addresses.

Port
The port number the HTTP services listens for requests on. This should normally be set to the default value of 80. Note: make certain that you don't have another HTTP services running from the same IP address.

TFTP

Controls how the Noojee Provision TFTP services operates. Note TFTP is a UDP based protocol.

Enabled
Set the value to 'True' to enable the TFTP service and False to disable it.

IPAddress
The ip address the TFTP services listens for requests on. Leave blank to allow it to listen on all addresses.

Port
The port number the TFTP services listens for requests on. This should normally be set to the default value of 69. Note: make certain that you don't have another TFTP services running from the same IP address.

Modules

Modules can be added to Noojee Provision to extend the functionality of the system as well as defining a set of core functions.. This section provides settings for each module to be loaded into the system.

Module

Specifies the configuration details for a specific module.

Name
The name of the  module. Must match the simple class name of the module implementation.

Enabled
 Either True or False. When True the module is loaded and invoked otherwise the module is not used.

Other attributes may appear depending on the module. 

Builtin - Modules

SIP

The SIP module is a core module that defines defaults for how SIP extensions are to be configured.

The following control specific settings on the handset (sip_buddies).

OperatingContext - the context to place the handset into when provisioning the handset.
DTMFMode
Allow
Disallow
PickupGroup
CallGroup
Permit - semi-colon separated list of ip/subnet masks.
    e.g.10.0.0.0/255.0.0.0;172.16.0.0/255.255.0.0;192.168.0.0/255.255.0.0</Permit>
Deny- semi-colon separated list of ip/subnet masks.

Range02. NoojeeProvision.xml settings

The range of extensions to allocate to handsets for this manufacturer.

First

The first extension number to allocate

Last

The last extension number to allocate

Prefix

A prefix that is to be added to every extension number.

Suffix

A suffix that is to be added to every extension number.

The following settings are used whent the system is in bulk provisioning mode.                     

BulkProvisionContext - the context to place the handset into when the system is in bulk provisioning mode.

                        <ProvisionRange>
                                <!-- first extension in range -->
                                <First>700</First>
                                <!-- last extension in range -->
                                <Last>799</Last>
                        </ProvisionRange>

Exclusions

Exclusions allow specific devices to be excluded based on their mac address. When a device is excluded Noojee Provision will ignore any requests from that device.

Exclusions

Defines a list of 'Exclusion' tags.

Exclusion

The mac address of the device which is to be ignored

example:

<NoojeeProvision>

<Exclusions>

<Exclusion>00:21:5c:95:93:f9</Exclusion>

<Exclusion>00:21:5c:95:93:f8</Exclusion>

<Exclusions>

Manufacturers 

Provides settings for each manufacturer supported by Noojee Provision . Additional manufacturers can be added by adding another Manufacturer section with the appropriate settings. Noojee Provision has no specialized code for a manufacturer, all operations are controlled from the Noojee Provision .xml configuration file.

Manufacturer

Specifies the configuration details for a specific manufacturer.

Name
The name of the manufacturer. There is no real significance in this entry, it is only used as convenience to identify actions and problems associated with a specific manufactures settings and handsets.

MACPrefix
Allows the definition of one ore more MacPrefix elements. The prefix used by handsets manufactured by this manufacturer. This is generally the first 6 digits from the mac address found on the back of a handsets.

TemplatePath

The path, relative to the TemplateRoot where the settings files for this manufacturer can be found. This should normally be something like:
/snom/templates
Where name is the same name you used in the Name element above.

TemplateFiles 

Allows the definition of one or more TemplateFiles. Only file listed in the TemplateFiles section will be parsed and velocity called. All other files will be served up as is.

TemplateFile

    Name Name of the settings file used to configure handsets for this manufacturer.

    Pattern A regular expression that is used to match filenames. Any file name which matches is mapped to the above 'Name' and the Name'ed file is returned.

    Specifying a pattern can be important in networks were ARP doesn't work. Many phones request a filename which includes the Mac address. By specifying a pattern which matches the requested filename Noojee Provision can then extract the MAC address from the filename.
 

SIP

Controls how the Asterisk realtime SIP details are configured for each handset added to the Asterisk server.

Context
The Asterisk context for the SIP record.

DTMFmode
The DTMF mode

Allow
The set of codecs to allow for the handset.

Range

The range of extensions to allocate to handsets for this manufacturer.

First

The first extension number to allocate

Last

The last extension number to allocate

Prefix

A prefix that is to be added to every extension number.

Suffix

A suffix that is to be added to every extension number.

Exception

A list of extension ranges which are to be exlcuded from allocation. Exceptions allow you to remove specific extension numbers for the main range. An Exception is of the form

<Range>
<First>100</First>
<Last>200</Last>
<Exception>105-115</Exception>
<Exception>-102</Exception>
<Exception>190-</Exception>
</Range>

The following specifies a range of extensions from 100 to 200 inclusive with the following numbers excluded:

  • 105-115
  • 100-102
  • 190-200

Properties

Allows you to create a set of properties which can be used in the template file. You may choose any set of names and values and then reference them in the template file. The section just provides a simple way of defining values in a single location which may be used through out your handset settings template. To insert a property value in your settings template insert the string:

$PropertyName

where 'PropertyName' is the Name one of the properties you have defined in the NoojeeProvision.xml configuration file for the manufacturer.

Property
Denotes a user defined property.

Name
The name of the property

Value
The value of the property.