.. _install-web-service-PBR:

Install Phone-based Registration (PBR) Web Service
----------------------------------------------------


.. index:: app;app install pbr
.. index:: app;app install list
.. index:: Flowchart;Install Phone Based Registration


.. _19.3.4#Revision 1#DOC-917:


Overview 
............

This section describes how to install phone-based registration (PBR) web service. Two options are described: 

* Install PBR Web Service on a Cluster
* Install PBR Web Service on a Standalone System


.. note:: 
   
   A full service restart is initiated on initial startup of the phone-based-registration 
   (PBR) web service on each VOSS Automate unified node.


The flowchart sets out the high level steps for the install task: 


.. include:: pbr-install-workflow.uml


.. rubric:: Related Topics

* :ref:`intro-PBR`
* :ref:`setup-CUCM-for-PBR`
* :ref:`configure-PBR-add-on`
* :ref:`high-level-overview-PBR`
* :ref:`expose-access-PBR`
* :ref:`create-restricted-API-role-user`




.. _prereq-PBR:

Prepare for PBR Installation
....................................


Before starting installation of PBR, you will need to prepare the following:  

* Network connectivity 
* Certificates for HTTPS


Network connectivity for PBR 
''''''''''''''''''''''''''''''

Phone-based registration (PBR) requires that auto-registered phones 
can connect to the VOSS Automate Proxy Nodes and Unified nodes.

================= ================================= =============== ==== =================
Source Node       Destination Node                  Transport       Port Protocol
================= ================================= =============== ==== =================
Phone             VOSS Automate Proxy Nodes         TCP             443  HTTPS
Phone             VOSS Automate Unified Nodes       TCP             8412 HTTP
================= ================================= =============== ==== =================

Table 1: PBR network ports

Note that either HTTP or HTTPS is used on a per-customer basis. The choice depends on:

*  Security requirements, for example, HTTPS only.
*  Device support (some older devices do not support HTTPS – refer to the Cisco
   IP Phone security guide for list of devices that support secure communications.


Certificates for HTTPS 
''''''''''''''''''''''''''

When using HTTPS for connectivity, the VOSS Automate certificate must be installed on
CUCMs that make use of the PBR service.

The VOSS Automate Platform certificate must be copied from the VOSS Automate server
and uploaded to CUCM.

1. Log in to VOSS Automate using Firefox or Chrome. 
2. In the URL, click on the 'Lock' symbol and choose to view the certificate. 
3. Find the 'Copy To' or 'Export' option, depending on your browser, and 
   save the certificate file to your PC.
#. Log in to VOSS Automate using the "Cisco Unified OS Administration" login.
#. Browse to **Security > Certificate Management** and upload the certificate with 
   "Certificate Purpose" set to 'tomcat-trust'. 
#. Restart the Cisco service as per the instructions.

.. note:: 
   
   The CUCM Hostname configured on CUCM under **System > Server** must be able to 
   resolve via DNS otherwise the phones will not authenticate. If the Hostname does 
   not resolve then change the hostname to the IP address instead.



Install PBR Web Service on a Cluster 
..........................................


1. On a *standard* topology, log in to *each node* serially and 
   run ``app install phone-based-registration``.
  
   On a *modular architecture* topology, log in to *each application node* serially and run ``app install phone-based-registration``.

#. Verify that the PBR service is running: ``app status``.
  
   The output should contain ``v21.1``, for example:

   ::

      phone-based-registration v21.1 (2021-01-11 07:46)
         |-nodeservice           running



Install PBR Web Service on a Standalone System
.....................................................


1. Log in to the unified node and run ``app install phone-based-registration``.

#. Verify that PBR is running: ``app status``.

   The output should contain ``v21.1``, for example:

   ::

      phone-based-registration v21.1 (2021-01-11 07:46)
         |-nodeservice           running
  


PBR Web Service - Web Weight Example Output 
................................................

The PBR web service is assigned the same web weights
as the ``selfservice`` and  ``voss-deviceapi`` service.
For example, when running **web weight list** from 
a web proxy, the output should be similar to the example 
below:


::

   platform@VOSS-WP-1:~$ web weight list
   Default service weights
    
     upstreamservers:
       phonebasedreg:
           phoneservices:
               192.168.100.10:443: 0
               192.168.100.3:443: 1
               192.168.100.4:443: 1
               192.168.100.5:443: 1
               192.168.100.6:443: 1
               192.168.100.9:443: 0
       voss-deviceapi:
           selfservice:
               192.168.100.10:443: 0
               192.168.100.3:443: 1
               192.168.100.4:443: 1
               192.168.100.5:443: 1
               192.168.100.6:443: 1
               192.168.100.9:443: 0
           voss-deviceapi: 
               192.168.100.10:443: 0
               192.168.100.3:443: 1
               192.168.100.4:443: 1
               192.168.100.5:443: 1
               192.168.100.6:443: 1
               192.168.100.9:443: 0


