Per-domain area code

Status
Not open for further replies.

alphard

New Member
Apr 1, 2020
7
0
1
33
Brazil
Hello, is there any sort of local area code variable that can be set to a domain/tenant?
I'd like to have this for translating numbers on tenants who are located in other cities or states.
 

mat1010

Member
Jun 8, 2019
56
13
8
Germany
Hello, is there any sort of local area code variable that can be set to a domain/tenant?
I'd like to have this for translating numbers on tenants who are located in other cities or states.
You should be able to achieve this with an additional outbound route. You just have to check for the length of the number and if it's in the range of a local number. If you local numbers are 7 digits long you would add ^(\d{7})$ to your Dialplan Expression and the area code e.g. 1234 to the Prefix field. Of course the expression depends heavily on how your numbers in the area have to be addressed. You can just use the same gateway as in your other outbound route(s). It might be required that you change your existing outbound route Dialplan Expression if it overlaps with the length check of the local outbound route.
 
Last edited:
Status
Not open for further replies.