.. _alternate-routing-dr:

Call Redirection Routing Plan for Disaster Recovery 
----------------------------------------------------


.. _21.4-PB2|VOSS-1167:


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

VOSS Automate provides a set of tools to configure and enable alternate
call routing for disaster recovery (DR) from the failure of
back-end services. This allows business continuity for end-customers, without service provider engagement.

.. note:: 

   This feature only supports Oracle SBCs (Session Border Controller) and will provision the 
   required redirection routing entries in the Local Route Table (LRT) of the Oracle SBC.

The feature provides the following:

* An interface to manage DR routing plans
* An interface to enable/disable DR routing plans
* Email notifications to addressees or groups of enabled and disabled DR routing plans

High level administrators with required permissions can expose the necessary interfaces
for the models of this feature on menu layouts and ensure user access profiles are updated accordingly:

* ``relation/dr_routing_plan_rel``: manage call redirection routing plans
* ``view/dr_routing_plan_view``: enable/disable call redirection routing plans

The instance of ``data/EmailHtmlTemplate`` called ``DR Activation`` is the email
notification template that by default contains variables:

* ``{{ pwf.EMAIL.status }}``: activated/deactivated
* ``{{ pwf.EMAIL.plans }}``: list of DR plans


The following macro is used when creating the redirection entry 
and will need to be cloned down and customized to set the value after the @ symbol, as required: 

* ``dr_routing_OracleSBC_NewLine``


.. image:: /src/images/disaster-recovery-macro.png 




Manage Call Redirection Routing Plans
........................................

If this model interface is available to an administrator,
the list of plans is available to manage.

.. note::
  
   The input form provides an interface to add *individual numbers*
   per plan. A separate plan is required for each number to be redirected.
   (This feature is typically used on a small scale.)

To add or modify a plan:

1. Add or update the **DR Plan name** and **Description**.
2. Add the **Destination Number** in E164 Format
3. Add or update the **Network Device List** that contains the
   session-based controller (SBC - ``device/oraclesbc/``) that
   holds the local routing table configuration. This routing configuration
   on the SBC is then of a higher priority than any other routing.

   See: :ref:`configure-network-device-list`.
4. Choose to enter individual **Email Addresses** and select an 
   **Email Group Name** from the drop-down list to receive an email
   notification when a redirection routing plan is activated or deactivated.

   This feature requires the setup of:
   
   * an SMTP server - see: :ref:`SMTP-server`
   * if used, email groups - see: :ref:`email-groups`.

5. Select an **Incoming Number** from the drop-down list that requires redirection.

The **Current Activation Status** will show if the current plan has been activated or not.


Enable or Disable Call Redirection Routing Plans
.................................................

If this model interface is available to an administrator,
a set of transfer boxes is available to activate or deactivate
selected plans that have been created.

1. Choose the operation to be carried out on the selected
   plans: **Enable selected DR plans** or **Disable selected DR plans**
2. In the **Plans** transfer box, move created plans according to the selected 
   required enable or disable operation.
3. When the operation is saved:
   
   * Individual updates are made to the SBC available in the
     NDL: an update per selected plan.
   * If email messaging has been set up, target addressees and groups
     are sent an email notification of the operations.
   * The **Current Activation Status** of a redirection routing plan is updated accordingly.


