Difference between revisions of "Phones"
(Added entry) |
|||
Line 1: | Line 1: | ||
This section of FusionPBX is used for automatic phone provisioning. | This section of FusionPBX is used for automatic phone provisioning. | ||
+ | |||
+ | What does provisioning do for you? | ||
+ | - it allows you to automatically configure phone functionality and set up the phone as a specific extension on your FusionPBX phone system | ||
Before going into detail about the functionality on this screen of the FusionPBX GUI it may be helpful to provide an overview of provisioning first. | Before going into detail about the functionality on this screen of the FusionPBX GUI it may be helpful to provide an overview of provisioning first. | ||
Line 9: | Line 12: | ||
4. add a rewrite rule to your web server so that http://fusionpbx/provisioning/yealink/001565aabbcc.cfg gets rewritten to the fusionpbx provisioning URL eg. The rewrite rule should forward the request to http://fusionpbx/mod/provision/index.php?mac=001565aabbcc.cfg. FusionPBX uses apache as a web server by default in the iso, but you might be using a different web server so you'll need to work this out for the server you are using. There are some Apache rewrite rule examples in the fpbx .htaccess file. An example for nginx and aastra phones is: | 4. add a rewrite rule to your web server so that http://fusionpbx/provisioning/yealink/001565aabbcc.cfg gets rewritten to the fusionpbx provisioning URL eg. The rewrite rule should forward the request to http://fusionpbx/mod/provision/index.php?mac=001565aabbcc.cfg. FusionPBX uses apache as a web server by default in the iso, but you might be using a different web server so you'll need to work this out for the server you are using. There are some Apache rewrite rule examples in the fpbx .htaccess file. An example for nginx and aastra phones is: | ||
location / { | location / { | ||
− | + | rewrite "^/provisioning/[a-z]+/([A-Fa-f0-9]{12})(\.(xml|cfg))$" /mod/provision/index.php?mac=$1 last; | |
} | } | ||
− | 5. when the phone requests that URL FusionPBX will add the MAC address of the phone to the database and it will show up in the phones database (and therefore on the phones screen in FusionPBX). | + | 5. when the phone requests that URL FusionPBX will add the MAC address of the phone to the database and it will show up in the phones database (and therefore on the phones screen in FusionPBX). However at this time it will not have a template assigned to it. So now you go to the phones screen and add an entry for the new phone's mac address and fill in the missing template, model and description values. Then apply your changes |
+ | 6. reboot the phone | ||
+ | 7. when the phone boots after the template has been set the http request to http://fusionpbx/mod/provision/index.php?mac=001565aabbcc should give the phone a real configuration file. Theoretically then the phone will re-configure itself from that config file and then register with freeswitch. | ||
+ | |||
+ | There are many things that can go wrong in automated provisioning. When you are first setting it up you might want to set your DHCP server to provide you with verbose logging so you can diagnose it. You also might want to set your phone to use verbose logging too. | ||
+ | |||
+ | As an example of what will happen when your phone makes a request to FusionPBX for provisioning you can try this URL (changing fusionpbx to the IP address of your server): http://fusionpbx/mod/provision/index.php?mac=00085daabbcc. You can then go to the phones page and you'll see a new phone with this mac address added. Press the X to delete it since it was just an experiment anyway! |
Revision as of 02:40, 25 October 2010
This section of FusionPBX is used for automatic phone provisioning.
What does provisioning do for you? - it allows you to automatically configure phone functionality and set up the phone as a specific extension on your FusionPBX phone system
Before going into detail about the functionality on this screen of the FusionPBX GUI it may be helpful to provide an overview of provisioning first.
Provisioning overview (untested) 1. setup a DHCP server where you can set options 66 and 43 to point to an HTTP or TFTP server (most phones capable of auto-provisioning support TFTP, but some also support HTTP) - dnsmasq is an example of a DHCP server that can do this 2. point the URL in option 66 and 43 to a directory on your FusionPBX server. An example using dnsmasq syntax and assumia yealink phone would be: dhcp-option=SPA,66,"http://fusionpbx/provisioning/yealink". Note that normally option 66 will only be a hostname or IP address, but it is possible that some phones might be smart enough to have a URL there and work out the server type from it. 3. the phone will theoretically then request two files from the server - one is a config file specific to the 4. add a rewrite rule to your web server so that http://fusionpbx/provisioning/yealink/001565aabbcc.cfg gets rewritten to the fusionpbx provisioning URL eg. The rewrite rule should forward the request to http://fusionpbx/mod/provision/index.php?mac=001565aabbcc.cfg. FusionPBX uses apache as a web server by default in the iso, but you might be using a different web server so you'll need to work this out for the server you are using. There are some Apache rewrite rule examples in the fpbx .htaccess file. An example for nginx and aastra phones is: location / { rewrite "^/provisioning/[a-z]+/([A-Fa-f0-9]{12})(\.(xml|cfg))$" /mod/provision/index.php?mac=$1 last; } 5. when the phone requests that URL FusionPBX will add the MAC address of the phone to the database and it will show up in the phones database (and therefore on the phones screen in FusionPBX). However at this time it will not have a template assigned to it. So now you go to the phones screen and add an entry for the new phone's mac address and fill in the missing template, model and description values. Then apply your changes 6. reboot the phone 7. when the phone boots after the template has been set the http request to http://fusionpbx/mod/provision/index.php?mac=001565aabbcc should give the phone a real configuration file. Theoretically then the phone will re-configure itself from that config file and then register with freeswitch.
There are many things that can go wrong in automated provisioning. When you are first setting it up you might want to set your DHCP server to provide you with verbose logging so you can diagnose it. You also might want to set your phone to use verbose logging too.
As an example of what will happen when your phone makes a request to FusionPBX for provisioning you can try this URL (changing fusionpbx to the IP address of your server): http://fusionpbx/mod/provision/index.php?mac=00085daabbcc. You can then go to the phones page and you'll see a new phone with this mac address added. Press the X to delete it since it was just an experiment anyway!