Company Directory list specific extensions only by DID dialed?

Status
Not open for further replies.

5280pbx

Member
Feb 4, 2019
68
1
8
39
Hi. I've got exts that comprise the same company but 3 different locations under the same domain. Each location has a DID and their own IVR. The issue is if I call Location A and use the company directory, I'll hear people from all locations. Can I put exts in a group and tie that group to an IVR or DID so they're the only ones that will show up in the directory?

Thanks!
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
The existing directory.lua does not have a way to limit the search beyond the domain level and "directory visible" option. The best way with current options is to give each location their own domain and setup inter-tenant dialing if needed.

I don't have the programming skills to provide a fully customized solution, but directory.lua could fairly easily be copied/modified to check extra fields in the search string.
Code:
    local sql = "SELECT * FROM v_extensions WHERE domain_uuid = :domain_uuid AND enabled = 'true' AND (directory_visible is null or directory_visible = 'true'); "
The above line would need to select from v_extension with an extra limiter such as "call_group" and the script would need a way to define which call_group etc via a dial plan variable. Once the script is modified, you would need a custom "directory" dial plan for each group/location with the group variable defined. Then the IVR's could be programmed to point to the appropriate new dial plan for the limited directory function.
 

5280pbx

Member
Feb 4, 2019
68
1
8
39
Thx for the input. I'll send the programming part to someone who's done some custom work in the past. If I decided to switch them to their own domains, is there a way to easily export selected exts, DID's, IVR, etc to new domain?
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
Easy depends on your skill levels with sql etc.
Some areas have an export and import function built in to Fusionpbx.

if there aren't too many items to move, you can simply change the "context"/"domain" for a given item. I use this method pretty often for floating temporary phone numbers, but anything more than a handful of extensions, numbers, etc I would just modify the database or export/import.
 
Status
Not open for further replies.