Default dial plan event triggers
--------------------------------

.. tip:: 

   :ref:`use-action-search-to-navigate-automate`


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

In Automate, you can use one of the default, pre-defined dial plan
events to trigger a custom workflow as part of your dial plan schema group.

The default events are located on the **Custom Workflow** tab of the **Dial Plan Schema Group** page.



Default dial plan event triggers for custom workflows 
..........................................................

.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|

+-----------------+---------------+------------------------------+
| Dial Plan Event | When          | Notes                        |
|                 | Triggered     |                              |
+=================+===============+==============================+
| preAddSite      | When a new    | For Type 1 to Type 4         |
|                 | site dial     | schemas, this triggers a     |
|                 | plan is       | Cisco UCM                    |
|                 | deployed,     | bootstrap workflow that:     |
|                 | before the    |                              |
|                 | Add Dial Plan |                              |
|                 | workflow is   |                              |
|                 | executed      | * Updates the CUCM           |
|                 |               |   clusterwide "Local Route   |
|                 |               |   Group for Redirected       |
|                 |               |   Calls" service parameter   |
|                 |               |   to the value "Local route  |
|                 |               |   group of calling party"    |
|                 |               |                              |
|                 |               | * Provisions the             |
|                 |               |   following clusterwide      |
|                 |               |   default local route        |
|                 |               |   group names to the         |
|                 |               |   CUC: SLRG-Emer, SLRG-FPHN, |
|                 |               |   SLRG-Intl, SLRG-Local,     |
|                 |               |   SLRG-Mobl, SLRG-Natl,      |
|                 |               |   SLRG-Oper, SLRG-PCSN,      |
|                 |               |   SLRG-PRSN, SLRG-Serv,      |
|                 |               |   SLRG-SRSN                  |
|                 |               |                              |
|                 |               | Items in the workflow are    |
|                 |               | executed at the hierarchy    |
|                 |               | node on which the target     |
+-----------------+---------------+------------------------------+
|                 |               | UCM cluster is added to the  |
|                 |               | Automate system.             |
|                 |               |                              |
|                 |               | Subsequent sites that are    |
|                 |               | added trigger this           |
|                 |               | workflow, but result in an   |
|                 |               | operation that does nothing  |
|                 |               | if these items have already  |
|                 |               | been applied to the target   |
|                 |               | CUCM cluster.                |
|                 |               |                              |
|                 |               | The target cluster for this  |
|                 |               | workflow is determined by    |
|                 |               | the CUCM instance that is    |
|                 |               | contained in the Network     |
+-----------------+---------------+------------------------------+
|                 |               | Device List Reference (NDLR) |
|                 |               | for the site on which this   |
|                 |               | event was triggered.         |
+-----------------+---------------+------------------------------+

.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|

+------------------------------------------+---------------+--------------------------------+
| Dial Plan Event                          | When          | Notes                          |
|                                          | Triggered     |                                |
+==========================================+===============+================================+
| addSite                                  | After the Add | For Type 1 to Type 4           |
|                                          | Site Dial     | schemas, this triggers a       |
|                                          | Plan workflow | workflow that adds a           |
|                                          | is executed   | default location, region,      |
|                                          | and the       | and device pool at the site    |
|                                          | context of    | hierarchy node on which        |
|                                          | the new site  | this event is triggered.       |
|                                          | dial plan is  |                                |
|                                          | passed        | The target cluster for this    |
|                                          |               | workflow is determined by      |
|                                          |               | the Cisco UCM                  |
|                                          |               | instance that is contained     |
|                                          |               | in the NDLR for the site on    |
|                                          |               | which this event was           |
|                                          |               | triggered.                     |
+------------------------------------------+---------------+--------------------------------+
| removeSite                               | Before the    | For Type 1 to Type 4           |
|                                          | Delete Site   | schemas, this triggers a       |
|                                          | dial plan     | workflow that removes the      |
|                                          | workflow is   | default location, region,      |
|                                          | executed and  | and device pool at the site    |
|                                          | the context   | hierarchy node on which        |
|                                          | of the site   | this event is triggered.       |
|                                          | dial plan is  |                                |
|                                          | passed        | The target cluster for this    |
|                                          |               | workflow is determined by      |
|                                          |               | the CUCM instance that is      |
|                                          |               | contained in the NDLR for the  |
|                                          |               | site on which this event was   |
|                                          |               | triggered.                     |
+------------------------------------------+---------------+--------------------------------+

.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|

+------------------------------------------+---------------+--------------------------------+
| Dial Plan Event                          | When          | Notes                          |
|                                          | Triggered     |                                |
+==========================================+===============+================================+
| addVoiceMailPilotNumber                  | When a new    | For Type 1 to Type 4           |
|                                          | voice mail    | schemas, this triggers a       |
|                                          | pilot number  | Cisco UCM                      |
|                                          | is added for  | bootstrap workflow that:       |
|                                          | a customer    |                                |
|                                          |               |                                |
|                                          |               | * Creates the voice mail       |
|                                          |               |   pilot on the target          |
|                                          |               |   CUCM cluster                 |
|                                          |               |                                |
|                                          |               | * Creates a voice mail         |
|                                          |               |   profile on the target        |
|                                          |               |   CUCM cluster                 |
|                                          |               |                                |
|                                          |               | * Deploys a custom CUC         |
|                                          |               |   schema                       |
|                                          |               |   to provision the             |
|                                          |               |   following on CUC:            |
|                                          |               |                                |
|                                          |               |                                |
|                                          |               |   * Direct routing rule and    |
|                                          |               |     forward routing rules      |
|                                          |               |     based on the new pilot     |
|                                          |               |     number                     |
|                                          |               |                                |
|                                          |               |   * The target CUC cluster     |
|                                          |               |     for                        |
|                                          |               |     this workflow is           |
|                                          |               |     determined by the CUM      |
|                                          |               |     instance                   |
|                                          |               |     contained in the NDLR for  |
|                                          |               |     the site on which this     |
|                                          |               |     event was triggered        |
|                                          |               |                                |
|                                          |               | The target cluster for this    |
|                                          |               | workflow is determined by      |
|                                          |               | the UCM instance that is       |
|                                          |               | contained in the NDLR for the  |
|                                          |               | site on which this event was   |
|                                          |               | triggered.                     |
+------------------------------------------+---------------+--------------------------------+
| removeVoiceMailPilotNumber               | When a voice  | The target cluster for this    |
|                                          | mail pilot    | workflow is determined by      |
|                                          | number is     | the UCM and CUC                |
|                                          | a customer    | instances that are             |
|                                          |               | contained in the NDLR for      |
|                                          |               | the site on which this         |
|                                          |               | event was triggered.           |
|                                          |               |                                |
|                                          |               | For Type 1 to Type 4           |
|                                          |               | schemas, this triggers a       |
|                                          |               | workflow that                  |
|                                          |               |                                |
|                                          |               | * Removes the voice mail       |
|                                          |               |   profile and pilot            |
|                                          |               |   number from CUCM             |
|                                          |               |                                |
|                                          |               | * Undeploys direct and         |
|                                          |               |   forward routing rules        |
|                                          |               |   on CUC                       |
+------------------------------------------+---------------+--------------------------------+


.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|


+-------------------------------------------+---------------+---------------------------------+
| Dial Plan Event                           | When          | Notes                           |
|                                           | Triggered     |                                 |
+===========================================+===============+=================================+
| associateVoiceMailServiceToCustomer       | When voice    | The target Cisco UCM            |
|                                           | mail service  | and CUC                         |
|                                           | is associated | cluster for this workflow       |
|                                           | to a customer | are determined                  |
|                                           |               | by the UCM and CUC              |
|                                           |               | instances that are contained    |
|                                           |               | in the NDLR for the site on     |
|                                           |               | which this event was triggered. |
+-------------------------------------------+---------------+---------------------------------+
|                                           |               |                                 |
|                                           |               | For Type 1 to Type 4            |
|                                           |               | schemas, this triggers a        |
|                                           |               | workflow that                   |
|                                           |               |                                 |
|                                           |               | * Deploys a SIP trunk to        |
|                                           |               |   CUCM if voice mail service    |
|                                           |               |   is partitioned or dedicated   |
|                                           |               | * Reset the SIP trunk           |
|                                           |               | * Deploys a route group         |
|                                           |               |   to CUCM if voice mail service |
|                                           |               |   is partitioned or             |
|                                           |               |   dedicated that contains       |
|                                           |               |   the SIP trunk created         |
|                                           |               |   in the previous step          |
|                                           |               | * Deploys a custom CUC          |
|                                           |               |   schema                        |
|                                           |               |   to provision the port         |
|                                           |               |   group, ports, route           |
|                                           |               |   partition, calling            |
|                                           |               |   search space (CSS), and       |
|                                           |               |   the user template for         |
|                                           |               |   voice mail service on         |
|                                           |               |   the CUC                       |
+-------------------------------------------+---------------+---------------------------------+
| disassociateVoiceMailServiceFromCustomer  | When voice    | The target UCM and CUC          |
|                                           | is            | clusters for                    |
|                                           | disassociated | this workflow are determined    |
|                                           | from a        | by the UCM and CUC              |
|                                           |               | instances that                  |
|                                           |               | are contained in the NDLR       |
|                                           |               | for the site on which this      |
|                                           |               | event was triggered.            |
|                                           |               |                                 |
|                                           |               | For Type 1 to Type 4            |
|                                           |               | schemas, this triggers a        |
|                                           |               | workflow that                   |
|                                           |               |                                 |
|                                           |               | * On CUCM, removes Voice Mail   |
|                                           |               |   service route group and       |
|                                           |               |   SIP trunk if dedicated        |
|                                           |               |   or partitioned voice          |
|                                           |               |   mail service                  |
|                                           |               | * On CUC,                       |
|                                           |               |   deletes customer-specific     |
|                                           |               |   route partition, css, user    |
|                                           |               |   template, ports, and port     |
|                                           |               |   group.                        |
+-------------------------------------------+---------------+---------------------------------+


.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|

+-----------------+---------------+---------------------------------+
| Dial Plan Event | When          | Notes                           |
|                 | Triggered     |                                 |
+=================+===============+=================================+
| addCustomer     | When a        | The target Cisco UCM            |
|                 | customer dial | and                             |
|                 | plan is added | CUC                             |
|                 |               | clusters for this workflow      |
|                 |               | are determined by the UCM       |
|                 |               | and CUC instances that          |
|                 |               | are contained in the NDLR       |
|                 |               | for the site on which this      |
|                 |               | event was triggered.            |
|                 |               |                                 |
|                 |               | Currently not used for Type     |
|                 |               | to Type 4 schemas               |
+-----------------+---------------+---------------------------------+
| removeCustomer  | When a        | The target UCM                  |
|                 | customer dial | and CUCM clusters               |
|                 | plan is       | for this                        |
|                 | removed       | workflow are determined by the  |
|                 |               | UCM and CUC instances that are  |
|                 |               | contained                       |
|                 |               | in the NDLR for the site on     |
|                 |               | which this event was triggered. |
|                 |               |                                 |
|                 |               | Currently not used for Type     |
|                 |               | 1 to Type 4 schemas             |
+-----------------+---------------+---------------------------------+
| updateCustomer  | When a        | The target Cisco UCM            |
|                 | customer dial | and                             |
|                 | plan is       | CUC                             |
|                 | updated       | clusters for this workflow      |
|                 |               | are determined by the UCM and   |
|                 |               | CUC instances that are          |
|                 |               | contained                       |
|                 |               | in the NDLR for the site on     |
|                 |               | which this event was triggered. |
|                 |               |                                 |
|                 |               | Currently not supported         |
|                 |               | because customer dial plan      |
|                 |               | updating is not supported       |
+-----------------+---------------+---------------------------------+
| updateSite      | When a site   | The target UCM                  |
|                 | dial plan is  | and                             |
|                 | updated       | CUC                             |
|                 |               | clusters for this workflow      |
|                 |               | are determined by the UCM and   |
|                 |               | CUC                             |
|                 |               | instances that are contained    |
|                 |               | in the NDLR for the site on     |
|                 |               | which this event was triggered. |
|                 |               |                                 |
|                 |               | Add the updateSite event        |
|                 |               | with the                        |
|                 |               | HcsDpUpdateSiteAreaCodesPWF     |
|                 |               | workflow to update the site     |
|                 |               | dial plan.                      |
|                 |               |                                 |
|                 |               | Currently not supported         |
|                 |               | because site dial plan          |
|                 |               | updating is not supported       |
+-----------------+---------------+---------------------------------+

.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|

+-----------------------+---------------+---------------------------------+
| Dial Plan Event       | When          | Notes                           |
|                       | Triggered     |                                 |
+=======================+===============+=================================+
| addDnInventory        | When an       | The target UCM                  |
|                       | administrator | cluster for this workflow       |
|                       | provisions    | is determined                   |
|                       | additional    | by the UCM                      |
|                       | specific site | instance contained in           |
|                       |               | the NDLR for the site on        |
|                       |               | which this event was triggered. |
|                       |               |                                 |
|                       |               | If a Type 1 or Type 3 dial      |
|                       |               | plan is provisioned, this       |
|                       |               | executes a workflow that        |
|                       |               | creates directory numbers       |
|                       |               | (DNs) where the extension       |
|                       |               | is prefixed with the Site       |
|                       |               | Location Code of the site       |
|                       |               | on which the event was          |
|                       |               | triggered.                      |
|                       |               |                                 |
|                       |               | If a Type 2 dial plan is        |
|                       |               | provisioned, this executes      |
|                       |               | a workflow that creates DNs     |
|                       |               | where the extension is          |
|                       |               | prefixed with the Intersite     |
|                       |               | Prefix + Site Location Code     |
|                       |               | of the site on which the        |
|                       |               | event was triggered.            |
|                       |               |                                 |
|                       |               | If a Type 4 dial plan is        |
|                       |               | provisioned, this executes      |
|                       |               | one of the following            |
|                       |               | workflows:                      |
|                       |               |                                 |
|                       |               | * Creates DNs where the         |
|                       |               |   extension is prefixed         |
|                       |               |   with *\+* if the              |
|                       |               |   extension entered by          |
|                       |               |   the administrator is          |
|                       |               |   prefixed with *+* on          |
|                       |               |   the site on which the         |
|                       |               |   event is triggered, OR        |
|                       |               | * Creates DN with no            |
|                       |               |   prefix; the extension         |
|                       |               |   on the site on which          |
|                       |               |   the event was triggered       |
|                       |               |   is used to create the DNs.    |
+-----------------------+---------------+---------------------------------+
| associateLboGateway   | When a local  | See associateLboGateway         |
|                       | gateway is    | Custom Workflow for             |
|                       | associated    | detailed information.           |
|                       | with a site.  |                                 |
+-----------------------+---------------+---------------------------------+
| unassociateLboGateway | When a local  | See unassociateLboGateway       |
|                       | gateway is    | Custom Workflow for             |
|                       | disassociated | detailed information.           |
|                       | from a site.  |                                 |
+-----------------------+---------------+---------------------------------+
