diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-17 06:57:26 -0400 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-17 06:57:26 -0400 |
commit | abc16da2c2afa636a928a031a540e677f4ac84f8 (patch) | |
tree | ab04f17b23e79f011443e1b481d7245d10ef20fa /misc/freeswitch/scripts | |
parent | e5cf06103f5d2256767530c9f3ddc2ae803926f8 (diff) |
add hunt group numbers to caller_id_numbers array
Diffstat (limited to 'misc/freeswitch/scripts')
-rw-r--r-- | misc/freeswitch/scripts/dialplan/hunt_group.lua | 11 |
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, ',')); |