summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-25 13:51:30 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-25 13:51:30 +0100
commit5d3c52dad03a9898e1dc15ca54b322f267c3e108 (patch)
treee9b64448b60ce6268cc23ab64b3e5c6085eaee31
parentf9b94562dafeae11224f2112d82e0aef17e1a94f (diff)
parent25c8fd5f00df857c24ce61b0290f67fb5006ffb2 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
-rw-r--r--app/controllers/voicemail_settings_controller.rb3
-rw-r--r--db/migrate/20130125103500_add_voicemail_storage_parameter.rb9
-rw-r--r--db/migrate/20130125104000_add_dump_variables_parameter.rb9
-rw-r--r--misc/freeswitch/conf/freeswitch.xml2
4 files changed, 21 insertions, 2 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) ] }
diff --git a/db/migrate/20130125103500_add_voicemail_storage_parameter.rb b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb
new file mode 100644
index 0000000..35e56af
--- /dev/null
+++ b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb
@@ -0,0 +1,9 @@
+class AddVoicemailStorageParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir', :value => '/var/lib/freeswitch/voicemail', :class_type => 'String', :description => 'Directory where voicemail messages are stored.')
+ end
+
+ def down
+ GsParameter.where(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir').destroy_all
+ end
+end
diff --git a/db/migrate/20130125104000_add_dump_variables_parameter.rb b/db/migrate/20130125104000_add_dump_variables_parameter.rb
new file mode 100644
index 0000000..cbd85ef
--- /dev/null
+++ b/db/migrate/20130125104000_add_dump_variables_parameter.rb
@@ -0,0 +1,9 @@
+class AddDumpVariablesParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables', :value => 'false', :class_type => 'Boolean', :description => 'Log dialplan variables.')
+ end
+
+ def down
+ GsParameter.where(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables').destroy_all
+ end
+end
diff --git a/misc/freeswitch/conf/freeswitch.xml b/misc/freeswitch/conf/freeswitch.xml
index 09f36d1..33a743e 100644
--- a/misc/freeswitch/conf/freeswitch.xml
+++ b/misc/freeswitch/conf/freeswitch.xml
@@ -638,7 +638,7 @@
</configuration>
<configuration name="lua.conf" description="LUA Configuration">
<settings>
- <param name="script-directory" value="$${base_dir}/scripts/?.lua"/>
+ <param name="script-directory" value="/usr/share/freeswitch/scripts/?.lua;/usr/share/lua/5.1/?.lua;"/>
<param name="xml-handler-script" value="configuration.lua"/>
<param name="xml-handler-bindings" value="directory|configuration"/>
<param name="startup-script" value="fax_daemon.lua"/>