# Putting it all together

Make sure that manager.conf has:

-     [general]
      enabled = yes
      webenabled = yes

and that http.conf has:

-     [general]
      enabled = yes
      bindaddr = 192.168.1.1 ; Your IP here ;-)
      bindport = 8088 ; Or port 80 if it is the only http server running on the machine

With phoneprov.conf and users.conf in place, start Astersik. From the CLI, type "http show status". An example output:

-     HTTP Server Status:
      Prefix: /asterisk
      Server Enabled and Bound to 192.168.1.1:8088

      Enabled URI's:
      /asterisk/httpstatus => Asterisk HTTP General Status
      /asterisk/phoneprov/... => Asterisk HTTP Phone Provisioning Tool
      /asterisk/manager => HTML Manager Event Interface
      /asterisk/rawman => Raw HTTP Manager Event Interface
      /asterisk/static/... => Asterisk HTTP Static Delivery
      /asterisk/mxml => XML Manager Event Interface

      Enabled Redirects:
        None.

      POST mappings:
      None.

There should be a phoneprov URI listed. Next, from the CLI, type "phoneprov show routes" and verify that the information there is correct. An example output for Polycom phones woud look like:

-     Static routes

      Relative URI                              Physical location
      sip.ver                                   configs/sip.ver
      sip.ld                                    configs/sip.ld
      bootrom.ver                               configs/bootrom.ver
      sip.cfg                                   configs/sip.cfg
      bootrom.ld                                configs/bootrom.ld
      custom.cfg                                configs/custom.cfg

      Dynamic routes

      Relative URI                              Template
      deadbeef4dad.cfg                          000000000000.cfg
      deadbeef4dad-directory.xml                000000000000-directory.xml
      deadbeef4dad-phone.cfg                    000000000000-phone.cfg
      config/deadbeef4dad                       polycom.xml

With the above examples, the phones would be pointed to `http://192.168.1.1:8080/asterisk/phoneprov` for pulling config files. Templates would all be placed in AST_DATA_DIR/phoneprov and static files would be placed in AST_DATA_DIR/phoneprov/configs. Examples of valid URIs would be:

- http://192.168.1.1:8080/asterisk/phoneprov/sip.cfg
- http://192.168.1.1:8080/asterisk/phoneprov/deadbeef4dad.cfg
- http://192.168.1.1:8080/asterisk/phoneprov/config/deadbeef4dad