.. _associate_sip_local_gateway_to_site:

Associate a SIP Local Gateway to a Site
---------------------------------------

Before You Begin
................

These restrictions apply:

* The SIP Local Gateway and the target site must be in the same country.
* The SIP Local Gateway and the target site must have the same CUCM Publisher.
* The target site must have a site dial plan deployed.

Use this procedure to associate a SIP Local Gateway with a site.

.. note::

   * A SIP Local Gateway can be associated with multiple sites given the
     prerequisite conditions are met.
   * A site can be associated with multiple SIP Local Gateways given the
     prerequisite conditions are met.
   * If a SIP Local Gateway is deleted, all existing site associations are
     disassociated.
   * If a site is deleted through **Site Management > Delete Site** and at
     least \"Remove Dial Plan Items\" is selected, all SIP Local Gateway
     associations for that site are disassociated.
   * If a site dial plan is deleted, all SIP Local Gateway associations are
     disassociated.

Procedure
.........

1. Log in as provider, reseller, or customer administrator.
2. Set the hierarchy path to the site for which you want to associate a
   SIP Local Gateway.

   If you do not have the path set to a site, you are prompted to select
   the site.

3. Choose **Site Management > Associate SIP Local Gateway**.
4. Click **Add**.
5. Select the SIP Local Gateway you want to associate with the site from
   the menu.

   Only SIP Local Gateways that have the same country and CUCM Publisher
   configuration as the site are available to be selected.

6. Click **Save**.
   
   * The SIP Local Gateway appears in the **Associate SIP Local Gateway** list view.
   * The HcsSipLocalGwAddSitePstnEVT event is generated. If enabled, the IOS
     Command Builder generates the default IOS commands associated with the event.
   * For each Area Code defined on the target site's dial plan, the
     HcsSipLocalGwAddSiteAreaCodeEVT event is generated. If enabled, the
     IOS Command Builder generates the default IOS commands associated with
     the event.
   * If the site has an existing E.164 to DN Association (N to N), either
     the HcsSipLocalGwAddE164AssociationEVT (for N to N) or the
     HcsSipLocalGwAddMultiE164AssociationEVT event (for N to 1) is
     generated. If enabled, the IOS Command Builder generates the default
     IOS commands associated with the event.
   * If the site has an existing Voice Mail Pilot Number Association, the
     HcsSipLocalGwAddVoiceMailPilotNumberEVT event is generated. If
     enabled, the IOS Command Builder generates the default IOS commands
     associated with the event.
   * If the Dial Plan Schema Group that is associated with the customer
     dial plan has the associateLboGateway custom workflow provisioned, the
     associateLboGateway custom workflow is executed.
   * The Site association to the SIP Local Gateway creates a Route Group
     with the SIP Trunk created and associated to the SIP Local Gateway.