summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/dialplan
diff options
context:
space:
mode:
Diffstat (limited to 'misc/freeswitch/scripts/dialplan')
-rw-r--r--misc/freeswitch/scripts/dialplan/hunt_group.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/misc/freeswitch/scripts/dialplan/hunt_group.lua b/misc/freeswitch/scripts/dialplan/hunt_group.lua
index e66bf56..b1728c3 100644
--- a/misc/freeswitch/scripts/dialplan/hunt_group.lua
+++ b/misc/freeswitch/scripts/dialplan/hunt_group.lua
@@ -98,17 +98,16 @@ function HuntGroup.run(self, dialplan_object, caller, destination)
self.log:info('HUNTGROUP ', self.record.id, ' - name: ', self.record.name, ', strategy: ', self.record.strategy,', members: ', #hunt_group_members);
- local clip_no_screening = common.array.try(caller, 'account.record.clip_no_screening');
caller.caller_id_numbers = {}
- if not common.str.blank(clip_no_screening) then
- for index, number in ipairs(common.str.strip_to_a(clip_no_screening, ',')) do
- table.insert(caller.caller_id_numbers, number);
- end
- end
for index, number in ipairs(caller.caller_phone_numbers) do
table.insert(caller.caller_id_numbers, number);
end
+ local phone_numbers = common.phone_number.PhoneNumber:new{ log = self.log, database = self.database }:list_by_owner(self.id, self.class);
+ for index, number in ipairs(phone_numbers) do
+ table.insert(caller.caller_id_numbers, number);
+ end
+
self.log:debug('HUNTGROUP ', self.record.id, ' - auth: ', caller.auth_account.class, '=', caller.auth_account.id, '/', caller.auth_account.uuid, ', caller: ', caller.account.class, '=', caller.account.id, '/', caller.account.uuid);
self.log:info('HUNTGROUP ', self.record.id, ' - clir: ', caller.clir, ', caller_id_numbers: ', table.concat(caller.caller_id_numbers, ','));