To configure custom phone provisioning via HTTP

  1. Add "custom" to the "Provision models" setting under System » Configuration. If there is already a setting, add a ",custom" to the end - for example "snom,custom".
  2. Set the "SIP domain" custom setting for the system rate plan (normally called "Your own rate plan") to be the hostname or IP address that telephones should register to.
  3. Wait one minute for these setting to take effect.
  4. Go to Features » Provisioning, and click the New button.
  5. In the "Model" field select "Custom via HTTP". In the "Model name" field that appears enter a unique identifier for your phone type which follows the format "custom_<type>" where <type> is something unique. For example you could use "custom_phone".
  6. Fill out the rest of the provisioning template and save it.
  7. Code a custom web page in /etc/enswitch/www/provision/<custom_phone>/, which uses the provisioning/files/get JSON API call to retrieve the template and print it. The value for the "model" parameter on the API call should match the unique identifier you entered for "Model name" in the template, for example "custom_phone". A sample web page is available in your Enswitch installation under /opt/enswitch/current/samples/provision/index.pl.
  8. Edit a telephone line on the Enswitch web, and set the MAC address. If there are multiple lines on the same physical telephone, the accounts can be suffixed with "-1", "-2", etc. For example:
    00:11:22:33:44:55-1
    for the first line on physical telephone 00:11:22:33:44:55. In the "Provisioning template" field select your custom HTTP template (Automatic will not work). When done, save the telephone line.
  9. Point the telephone to "http://<web server>/local/provision/<custom_phone>/", adjusting as required to pass the MAC address to your custom web page.