diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-01-28 14:17:52 +0100 |
commit | 8aa7de2636dcd22781b623d5c9270f5ecf8b85c2 (patch) | |
tree | 1bb5dc36fb28c96ad9be9a2357d380c2c24ee31e /app/controllers/voicemail_settings_controller.rb | |
parent | 39aa7132ceed3d4beab3a9b828e571bbfc67c07e (diff) | |
parent | 600574759573e48da9f5f82d4ff8a863b6830c95 (diff) |
Merge branch 'develop'5.1-beta2
Diffstat (limited to 'app/controllers/voicemail_settings_controller.rb')
-rw-r--r-- | app/controllers/voicemail_settings_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/voicemail_settings_controller.rb b/app/controllers/voicemail_settings_controller.rb index d31de8f..5de0c35 100644 --- a/app/controllers/voicemail_settings_controller.rb +++ b/app/controllers/voicemail_settings_controller.rb @@ -71,7 +71,8 @@ class VoicemailSettingsController < ApplicationController end def voicemail_defaults - path = "/opt/freeswitch/storage/voicemail/default/#{@sip_account.sip_domain.host}/#{@sip_account.auth_name}/" + storage_dir = GsParameter.where(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir').first.try(:value) + path = "#{storage_dir}/#{@sip_account.sip_domain.host}/#{@sip_account.auth_name}/" @greeting_files = Dir.glob("#{path}*greeting*.wav").collect {|r| [ File.basename(r), File.expand_path(r) ] } @name_files = Dir.glob("#{path}*name*.wav").collect {|r| [ File.basename(r), File.expand_path(r) ] } |