diff options
author | Peter Kozak <spag@golwen.net> | 2013-07-12 12:01:10 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-07-12 12:01:10 +0200 |
commit | e34dcbc160300d8b6974303675c233fecc592fe9 (patch) | |
tree | ac2b1cb042adffb2162abef905a83b6ca38cf5d6 /app/controllers/call_forwards_controller.rb | |
parent | ab8c251a06b81cbc700a0aa0bd16cb8089d3f611 (diff) |
list tenant's voicemail accounts
Diffstat (limited to 'app/controllers/call_forwards_controller.rb')
-rw-r--r-- | app/controllers/call_forwards_controller.rb | 12 |
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 |