summaryrefslogtreecommitdiff
path: root/app/controllers/sip_accounts_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/sip_accounts_controller.rb')
-rw-r--r--app/controllers/sip_accounts_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/sip_accounts_controller.rb b/app/controllers/sip_accounts_controller.rb
index 0d34109..8208a29 100644
--- a/app/controllers/sip_accounts_controller.rb
+++ b/app/controllers/sip_accounts_controller.rb
@@ -36,6 +36,7 @@ class SipAccountsController < ApplicationController
break unless SipAccount.exists?(:auth_name => @sip_account.auth_name)
end
@sip_account.password = SecureRandom.hex(GsParameter.get('DEFAULT_LENGTH_SIP_PASSWORD'))
+ possible_voicemail_accounts
end
def create
@@ -61,6 +62,7 @@ class SipAccountsController < ApplicationController
end
def edit
+ possible_voicemail_accounts
end
def update
@@ -101,4 +103,9 @@ class SipAccountsController < ApplicationController
end
end
+ def possible_voicemail_accounts
+ @possible_voicemail_accounts = @sip_account.voicemail_accounts
+ @possible_voicemail_accounts = @possible_voicemail_accounts + @sip_account.sip_accountable.voicemail_accounts
+ end
+
end