summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-07-12 12:01:10 +0200
committerPeter Kozak <spag@golwen.net>2013-07-12 12:01:10 +0200
commite34dcbc160300d8b6974303675c233fecc592fe9 (patch)
treeac2b1cb042adffb2162abef905a83b6ca38cf5d6 /app
parentab8c251a06b81cbc700a0aa0bd16cb8089d3f611 (diff)
list tenant's voicemail accounts
Diffstat (limited to 'app')
-rw-r--r--app/controllers/call_forwards_controller.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/call_forwards_controller.rb b/app/controllers/call_forwards_controller.rb
index f9d2faa..0e1141f 100644
--- a/app/controllers/call_forwards_controller.rb
+++ b/app/controllers/call_forwards_controller.rb
@@ -187,6 +187,18 @@ class CallForwardsController < ApplicationController
end
end
+ if @parent.class == HuntGroup && @parent.tenant
+ @parent.tenant.voicemail_accounts.each do |voicemail_account|
+ call_forwards_destination = CallForwardingDestination.new()
+ call_forwards_destination.id = "#{voicemail_account.id}:VoicemailAccount"
+ call_forwards_destination.label = "VoicemailAccount: #{voicemail_account.to_s}"
+ if !destinations_hash[call_forwards_destination.id]
+ destinations_hash[call_forwards_destination.id] = true
+ call_forwarding_destinations << call_forwards_destination
+ end
+ end
+ end
+
if @parent.class == PhoneNumber
if @parent.phone_numberable.class == SipAccount
sip_account = @parent.phone_numberable