If you have an Asterisk server that is multi-tenant (multiple organization or departments on the same organization), you will need to limit events processed to those for your organization.

## General Procedure

1. Use the call sequence tool in the troubleshooting menu to see how the events come in.
2. Look at the channel variables and figure out which part is the extension, and which part is an organization identifier.
3. Set the regular extensions on the organization phone configuration section by expanding the advanced section. Refer to the examples below for what you’d set it to.

Authoring regex’s can be tricky. Reach out to us for help with this.
## Multi-Tenant Configurations Examples

### Example 1: SIP/9997007-000120ad

For this channel style: “`Channel: SIP/9997007-000120ad“`
The user’s extension is “`7007“`, we know this because we made the sequence calling from 7007.’
We then know that “`999“` is an identifier for this tenant.

Accordingly, you would set:

“`
onlyLogIfChannelMatch: ^sip/999
internalMatch: ^(sip/999(\d{3,6})-|Local)
dialinExtMatch: sip/999(\d{3,6})-|Local/(?:.*?)(\d{2,10})#?@
“`

*** Substitute 999 with the organization prefix assigned to your organization

### Example 2: SIP/ABC_7007-000120ad

This example is very similar to the one above but the organization or tenant identifier is seperated by a “`_“` (underscore).

Channel: SIP/ABC_7007-000120ad

“`
onlyLogIfChannelMatch: ^sip/ABC
internalMatch: ^(sip/ABC_(\d{3,6})-|Local)
dialinExtMatch: sip/ABC_(\d{3,6})-|Local/(?:.*?)(\d{2,10})#?@
“`

Comments are closed.

Do you need some help? Submit a Request