summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb42
-rw-r--r--db/migrate/20130110133500_set_voicemail_parameters.rb45
2 files changed, 66 insertions, 21 deletions
diff --git a/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb
index 12ac63c..fe1cdae 100644
--- a/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb
+++ b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb
@@ -73,28 +73,28 @@ class PopulateGsParameterWithDialplanDefaults < ActiveRecord::Migration
GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'execute', :value => 'sudo /usr/local/bin/ban_ip.sh {ip_address}', :class_type => 'String')
# conferences defaults
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'caller-controls ', :value => 'speaker', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'caller-controls', :value => 'speaker', :class_type => 'String')
GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'moderator-controls', :value => 'moderator', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'max-members ', :value => 100, :class_type => 'Integer')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'rate ', :value => 16000, :class_type => 'Integer')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'interval ', :value => 20, :class_type => 'Integer')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'energy-level ', :value => 300, :class_type => 'Integer')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'sound-prefix ', :value => '/opt/freeswitch/sounds/en/us/callie', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'muted-sound ', :value => 'conference/conf-muted.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'unmuted-sound ', :value => 'conference/conf-unmuted.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'alone-sound ', :value => 'conference/conf-alone.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'moh-sound ', :value => 'local_stream://moh', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'enter-sound ', :value => 'tone_stream://%(200,0,500,600,700)', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'exit-sound ', :value => 'tone_stream://%(500,0,300,200,100,50,25)', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'kicked-sound ', :value => 'conference/conf-kicked.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'locked-sound ', :value => 'conference/conf-locked.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'is-locked-sound ', :value => 'conference/conf-is-locked.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'is-unlocked-sound ', :value => 'conference/conf-is-unlocked.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'pin-sound ', :value => 'conference/conf-pin.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'bad-pin-sound ', :value => 'conference/conf-bad-pin.wav', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'caller-id-name ', :value => 'Conference', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'caller-id-number ', :value => '', :class_type => 'String')
- GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'comfort-noise ', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'max-members', :value => 100, :class_type => 'Integer')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'rate', :value => 16000, :class_type => 'Integer')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'interval', :value => 20, :class_type => 'Integer')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'energy-level', :value => 300, :class_type => 'Integer')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'sound-prefix', :value => '/opt/freeswitch/sounds/en/us/callie', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'muted-sound', :value => 'conference/conf-muted.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'unmuted-sound', :value => 'conference/conf-unmuted.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'alone-sound', :value => 'conference/conf-alone.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'moh-sound', :value => 'local_stream://moh', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'enter-sound', :value => 'tone_stream://%(200,0,500,600,700)', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'exit-sound', :value => 'tone_stream://%(500,0,300,200,100,50,25)', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'kicked-sound', :value => 'conference/conf-kicked.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'locked-sound', :value => 'conference/conf-locked.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'is-locked-sound', :value => 'conference/conf-is-locked.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'is-unlocked-sound', :value => 'conference/conf-is-unlocked.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'pin-sound', :value => 'conference/conf-pin.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'bad-pin-sound', :value => 'conference/conf-bad-pin.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'caller-id-name', :value => 'Conference', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'caller-id-number', :value => '', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'parameters', :name => 'comfort-noise', :value => 'true', :class_type => 'Boolean')
#dialplan defaults
GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'node_id', :value => 1, :class_type => 'Integer')
diff --git a/db/migrate/20130110133500_set_voicemail_parameters.rb b/db/migrate/20130110133500_set_voicemail_parameters.rb
new file mode 100644
index 0000000..3e7c192
--- /dev/null
+++ b/db/migrate/20130110133500_set_voicemail_parameters.rb
@@ -0,0 +1,45 @@
+class SetVoicemailParameters < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'file-extension', :value => 'wav', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'terminator-key', :value => '#', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'max-login-attempts', :value => '3', :class_type => 'Integer')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'digit-timeout', :value => '10000', :class_type => 'Integer')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'min-record-len', :value => '3', :class_type => 'Integer')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'max-record-len', :value => '300', :class_type => 'Integer')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'max-retries', :value => '3', :class_type => 'Integer')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'tone-spec', :value => '%(1000, 0, 640)', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'callback-dialplan', :value => 'XML', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'callback-context', :value => 'default', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'play-new-messages-key', :value => '1', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'play-saved-messages-key', :value => '2', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'login-keys', :value => '0', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'main-menu-key', :value => '0', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'config-menu-key', :value => '5', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'record-greeting-key', :value => '1', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'choose-greeting-key', :value => '2', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'change-pass-key', :value => '6', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'record-name-key', :value => '3', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'record-file-key', :value => '3', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'listen-file-key', :value => '1', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'save-file-key', :value => '2', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'delete-file-key', :value => '7', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'undelete-file-key', :value => '8', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'email-key', :value => '4', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'pause-key', :value => '0', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'restart-key', :value => '1', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'ff-key', :value => '6', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'rew-key', :value => '4', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'skip-greet-key', :value => '#', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'record-silence-threshold', :value => '200', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'record-silence-hits', :value => '2', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'operator-extension', :value => 'operator XML default', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'operator-key', :value => '9', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'vmain-extension', :value => 'vmain XML default', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'vmain-key', :value => '*', :class_type => 'String')
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'odbc-dsn', :value => 'default', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:entity => 'voicemail', :section => 'parameters').destroy_all
+ end
+end