# Multiple Domains/Hosted PBXs

## Introduction

ProSBC Hosted PBX Example (see [ProSBC:Hosted PBX](#hosted-pbxs-example)) provides a step by step Hosted PBX Configuration of \[ProSBC] systems, using the Web Portal configuration tool. What will be discussed here, with guide for example configuration, is when there are multiple domains per PBX or several PBXs with different domains. This multiple domains/PBXs configuration is basically the extension of what is configured in single domain/hosted PBX, that including the setting of different domains, followed by specific routing for different domain destinations.

## Hosted PBXs Example

<figure><img src="https://3811773442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiK3TemJSDhHz3xNMOvvk%2Fuploads%2FQUd8813olMBZheM9UrRC%2Fimage.png?alt=media&#x26;token=e3acc5ea-bc4d-4689-a97c-e635cc64a417" alt=""><figcaption></figcaption></figure>

\
From above, there will be several Hosted PBXs like Hosted PBX1, Hosted PBX2, Hosted PBX3, etc. And each Hosted PBX will use its own domain like example1.com for PBX1, example2.com for PBX2, and so on. This multiple domain scenario can also be applied to single Hosted PBX with different several domains that will be using the similar configuration.

With external path over the WAN, different phones belonging to different Hosted PBXs register to domain corresponding to the PBX/Registrar the phone is subscribing to.

Prerequisites and below configuration sections need to be done as listed in [single Hosted PBX configuration](#hosted-pbxs-example) before proceeding:

* IP Network Configuration
* SIP Stack Configuration

## SIP NAP

A Network Access Point or NAP represents the entry point to another network or destination peer (e.g. SIP proxy, SIP trunk, etc)

### SIP NAP Configuration for Local Area Network

To create a new NAP:

1- Click NAPs in the navigation panel

<figure><img src="https://docs.telcobridges.com/w/images/3/38/NAP_NavigationMenu.png" alt=""><figcaption></figcaption></figure>

\
2- Click Create New NAP

<figure><img src="https://docs.telcobridges.com/w/images/2/26/Create_New_NAP_SIP.png" alt=""><figcaption></figcaption></figure>

\
3- Create the new NAP:

* Enter a name for the NAP
* Click Create

<figure><img src="https://docs.telcobridges.com/w/images/b/b4/SIP_Server_NAP_Create.png" alt=""><figcaption></figcaption></figure>

\
4- Verify that the NAP was successfully created message appears

<figure><img src="https://docs.telcobridges.com/w/images/f/f0/Create_New_NAP_SIP2.png" alt=""><figcaption></figcaption></figure>

5- Associate a SIP transport server with the new NAP:

* Select a SIP Transport Server from the Available list
* Click "<<" to associate the LAN\_SIP\_TS with the NAP

<figure><img src="https://docs.telcobridges.com/w/images/3/33/SIP_Server_NAP_Create_1.png" alt=""><figcaption></figcaption></figure>

6- Enter SIP Server proxy address:

<figure><img src="https://docs.telcobridges.com/w/images/6/65/SIP_Server_NAP_Create_2.png" alt=""><figcaption></figcaption></figure>

7- Associate a Port range with the new NAP:

* Select a port range from the Available list
* Click "<<" to associate LAN\_Vlan:0 Port range with the NAP

<figure><img src="https://docs.telcobridges.com/w/images/1/14/SIP_Server_NAP_Create_3.png" alt=""><figcaption></figcaption></figure>

9- Configure settings for the following parameter groups as required:

* Registration Parameters
* Authentication Parameters
* Network Address Translation
* SIP-I Parameters
* Advanced Parameters
* Click Save

<figure><img src="https://docs.telcobridges.com/w/images/1/12/SIP_Server_NAP_Create_4.png" alt=""><figcaption></figcaption></figure>

* Here, we need to repeat above steps and create NAP for every Hosted PBX, for example, NAP\_PBX1 (instead of SIP\_SERVER\_NAP) for PBX1 (192.168.1.10), NAP\_PBX2 for PBX2 (192.168.1.11), and NAP\_PBX3 for PBX3 (192.168.1.12) and so on if more.

### Access Control List

ProSBC will automatically create Access Control List for each NAP you created.

<figure><img src="https://docs.telcobridges.com/w/images/9/9f/Remote_Workers_Access_Control_List_1.png" alt=""><figcaption></figcaption></figure>

If you double-click one of the created ACL, you will see ProSBC only accept the calls if source IP matches. In this sample; the calls from 192.168.1.10, 192.168.1.11, 192.168.1.12 will be accepted only.

<figure><img src="https://docs.telcobridges.com/w/images/6/60/SIP_Access_Control_List_2.png" alt=""><figcaption></figcaption></figure>

Rules for NAP\_PBX1, NAP\_PBX2, NAP\_PBX3,.. will be created automatically in the ACL.

## SIP DOMAIN

A SIP domain represents a grouping of devices (or users) that can communicate with one another. You must configure SIP Registration Domain for your system. The first step in doing so is to create a SIP Domain:

### Create New SIP Registration Domain

1- Click SIP Domain in the navigation panel

<figure><img src="https://docs.telcobridges.com/w/images/b/bd/SIP_Domain_NavigationMenu.png" alt=""><figcaption></figcaption></figure>

\
2- Click Create New Domain

<figure><img src="https://docs.telcobridges.com/w/images/1/1e/Create_SIP_Domain.png" alt=""><figcaption></figcaption></figure>

\
3- Create the new Domain:

* Enter a configuration Name for this domain.
* Enter a Domain Name for the SIP Registration Domain (the domain can be an FQDN or an IP address)
* Set the number Maximum Registered Users for this domain
* Set the Expires value used by SBC when the remote device doesn't supply one (Default Contact Expire)
* Select Routing Method the system will use to route calls to registered users (if enabled in routing scripts).
  * Register source: Sends SIP Invite to the registering source IP address.
  * Contact: Sends SIP Invite to the 'contact' from the Register message.
* Set the Default Contact Expiration, this value will be used when no *Expires* value is supplied by the user agent.
* Set the Minimum Contact Expiration, this is the minimum *Expires* value that can be supplied by a user agent. Lower values will be rejected with a 423 'Interval too brief' response.
* Set the Maximum Contact Expiration, this is the maximum *Expires* value that can be supplied by a user agent. The higher value is replaced by this parameter.
* Forwarding Parameters:
  * Select the Registration Forwarding Mode to the registrar:
    * Contact Remapping: Changes the user and the IP address.
    * Contact Passthrough: Doesn't change anything. Enables devices to be contacted directly without going through the SBC.
  * Set Minimum Registrar Expiration, this is the minimum *Expires* value sent by the SBC to the registrar. If a user agent 'Expires' value is greater than this parameter, the SBC will do rate adaptation between the user agent and the Registrar.
  * Set Maximum Pending Register Forward, the maximum number of simultaneous pending register requests allowed for this domain. New REGISTER request is being refused passed this threshold.
  * Set Maximum Simultaneous Register Forward, the maximum number of simultaneous active register requests allowed for this domain. New REGISTER request is being refused passed this threshold.
* Click Create

<figure><img src="https://docs.telcobridges.com/w/images/0/06/Register_domain_1.png" alt=""><figcaption></figcaption></figure>

\
4- Verify that the Sip registration domain was successfully created message appears<br>

<figure><img src="https://docs.telcobridges.com/w/images/8/8f/Register_domain_2.png" alt=""><figcaption></figcaption></figure>

5- If your registrar has multiple domains, you need to create all the domains one by one.

\
6- Repeat above steps for every domain designated to every PBX, for example, example1.com for PBX1, example2.com for PBX2, and so on. This also applies to the case of multiple domains from the same PBX/Registrar as pointed out in step 5 above.

### Create New SIP Registration Registrar

A SIP registrar represents a SIP endpoint that provides a location service. You must configure SIP Registrar for your system. The first step in doing so is to select your SIP Domain:

<br>

1- Click on your domain in the SIP Domain List

<figure><img src="https://docs.telcobridges.com/w/images/2/2f/SIP_Domain_Select.png" alt=""><figcaption></figcaption></figure>

\
2- Click Create New SIP Registration Registrar

<figure><img src="https://docs.telcobridges.com/w/images/9/90/New_SIP_Registrar_Create.png" alt=""><figcaption></figcaption></figure>

\
3- Create the new SIP Registration Registrar

* Enter a Name for the SIP Registration Registrar
* Select pre defined SIP Proxy NAP from drop-down menu
* Click Create

<figure><img src="https://docs.telcobridges.com/w/images/c/c0/SIP_Registrar_Select.png" alt=""><figcaption></figcaption></figure>

\
4- Verify that the Sip registration registrar was successfully created message appears

<figure><img src="https://docs.telcobridges.com/w/images/7/75/Create_New_SIP_Registrar2.png" alt=""><figcaption></figcaption></figure>

\
5- Different Registrars need to be created, so do the above steps for SIP\_Registrar\_1 for example1.com and choose NAP\_PBX1 (192.168.1.10), SIP\_Registrar\_2 for example2.com and choose NAP\_PBX2 (192.168.1.11), and SIP\_Registrar\_3 for example3.com and choose NAP\_PBX3 (192.168.1.12).

### Associate a SIP Domain with the new NAP

Associate a SIP Domain with the new NAP. If you have more then 1 registrar domain using the same registrar you can associate all of them with the NAP:

* Select a sip domain from the Available list
* Click "<<" to associate the SIP Domain with the NAP

<figure><img src="https://docs.telcobridges.com/w/images/8/8c/Associate_SIP_NAP.png" alt=""><figcaption></figcaption></figure>

* For each domain, for example, example1.com, choose OPEN\_NAP and NAP\_PBX1, and for example2.com, choose OPEN\_NAP and NAP\_PBX2, and so on.

## Call Route

You must set up call routing for your system. [Call routing](https://docs.prosbc.com/appendices/appendix-a-glossary/glossary-call-routing) refers to the ability to route calls based on criteria such as origin, destination, time of day, service provider rates, and more.

<br>

### Route Configuration for Remote Phones to SIP Server

1- Click Routes in the navigation panel

<figure><img src="https://docs.telcobridges.com/w/images/b/b0/CreateCallRoute_0.png" alt=""><figcaption></figcaption></figure>

\
2- Click Create New Static Route

<figure><img src="https://docs.telcobridges.com/w/images/7/79/CreateCallRoute_1.png" alt=""><figcaption></figcaption></figure>

\
3- Create the new route:

* Enter a RoutesetName for the route
* Select SIP\_REMOTE, to match calls from Trunk NAP
* Select SIP\_SERVER\_NAP
* Click Create

<figure><img src="https://docs.telcobridges.com/w/images/3/39/Route_Remote_to_Server.png" alt=""><figcaption></figcaption></figure>

\
4- Verify that the " Route was successfully created" message appears and that the new route is listed in the Routeset list

<figure><img src="https://docs.telcobridges.com/w/images/6/64/Route_Remote_to_Server_1.png" alt=""><figcaption></figcaption></figure>

### Route Configuration for SIP Server to Remote Phones

1- Click Routes in the navigation panel

<figure><img src="https://docs.telcobridges.com/w/images/b/b0/CreateCallRoute_0.png" alt=""><figcaption></figcaption></figure>

\
2- Click Create New Static Route

<figure><img src="https://docs.telcobridges.com/w/images/7/79/CreateCallRoute_1.png" alt=""><figcaption></figcaption></figure>

\
3- Create the new route:

* Enter a RoutesetName for the route
* Select SIP\_SERVER\_NAP, to match calls from Trunk NAP
* Select (By registered user)
* Click Create

<figure><img src="https://docs.telcobridges.com/w/images/7/70/Route_Server_to_Remote_2.png" alt=""><figcaption></figcaption></figure>

\
4- Verify that the " Route was successfully created" message appears and that the new route is listed in the Routeset list

<figure><img src="https://docs.telcobridges.com/w/images/1/17/Route_Server_to_Remote_3.png" alt=""><figcaption></figcaption></figure>

5- Here, we are creating 3 pairs of route entry from above for 3 domains. In order for Registration/call to terminate correctly to the right NAP/PBX/Registrar, we need to set some condition to match specifically the registration/call

* for incoming call belonging to example1.com, on the route "called" field, can input /^(\[0-9]\*)@example1.com/
* for incoming call belonging to example2.com, on the route "called" field, can input /^(\[0-9]\*)@example2.com/
* for incoming call belonging to example2.com, on the route "called" field, can input /^(\[0-9]\*)@example2.com/

<figure><img src="https://docs.telcobridges.com/w/images/thumb/5/5d/Multiple_domains_routes.png/800px-Multiple_domains_routes.png" alt=""><figcaption></figcaption></figure>

## Activating the Configuration

Changes made to the configuration of the ProSBC units are stored in the OAM\&P Configuration and Logging database. In order for changes to be used by the system, they must first be activated. This is done at the system level and accessed from the Navigation panel.

Check the following link for activating the configuration;

[Toolpack:Activating\_the\_Configuration\_D](https://docs.prosbc.com/configuration-details/configuration-by-web-portal-category/system-settings/activating-the-configuration)
