summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20121230110747_snom_meetingpoint.rb2
-rw-r--r--db/migrate/20130105120126_create_gs_parameters.rb16
-rw-r--r--db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb104
-rw-r--r--db/migrate/20130107222128_set_provisioning_set_http_user.rb13
-rw-r--r--db/migrate/20130109074326_add_entity_to_gs_parameter.rb6
-rw-r--r--db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb121
-rw-r--r--db/migrate/20130109182800_change_gs_parameter_odbc_defaults.rb11
-rw-r--r--db/migrate/20130110085600_set_switch_parameters.rb21
-rw-r--r--db/migrate/20130110113500_set_conference_parameters.rb33
-rw-r--r--db/migrate/20130110133500_set_voicemail_parameters.rb45
-rw-r--r--db/migrate/20130110205056_add_number_of_shown_items_to_gs_parameter.rb9
-rw-r--r--db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb10
-rw-r--r--db/migrate/20130112073300_set_dialplan_variables.rb11
-rw-r--r--db/migrate/20130112074800_remove_ringback_dialplan_parameter.rb9
-rw-r--r--db/migrate/20130112103337_set_new_value_for_provisioning_key_length.rb9
-rw-r--r--db/migrate/20130113072126_create_gateways.rb16
-rw-r--r--db/migrate/20130113073323_create_gateway_settings.rb16
-rw-r--r--db/migrate/20130113090705_create_gateway_parameters.rb16
-rw-r--r--db/migrate/20130116133243_create_call_routes.rb16
-rw-r--r--db/migrate/20130116133433_create_route_elements.rb19
-rw-r--r--db/migrate/20130116145500_set_routing_variables.rb12
-rw-r--r--db/migrate/20130116213312_change_user_name_prefix.rb5
-rw-r--r--db/migrate/20130117142600_change_action_prerouting_table.rb13
-rw-r--r--db/migrate/20130117191840_change_column_name_in_call_route.rb7
-rw-r--r--db/migrate/20130121123742_add_default_area_code_to_gemeinschaft_setup.rb5
-rw-r--r--db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb9
26 files changed, 553 insertions, 1 deletions
diff --git a/db/migrate/20121230110747_snom_meetingpoint.rb b/db/migrate/20121230110747_snom_meetingpoint.rb
index 04ad450..0042979 100644
--- a/db/migrate/20121230110747_snom_meetingpoint.rb
+++ b/db/migrate/20121230110747_snom_meetingpoint.rb
@@ -2,7 +2,7 @@ class SnomMeetingpoint < ActiveRecord::Migration
def up
if Manufacturer.where(:ieee_name => 'SNOM Technology AG').any?
snom = Manufacturer.where(:ieee_name => 'SNOM Technology AG').first
- snom.phone_models.create(:name => 'snom MeetingPoint',
+ snom.phone_models.create(:name => 'Snom meetingPoint',
:product_homepage_url => 'http://www.snom.com/en/products/sip-conference-phone/snom-meetingpoint/',
:product_manual_homepage_url => 'http://wiki.snom.com/Snom_MeetingPoint/Documentation')
end
diff --git a/db/migrate/20130105120126_create_gs_parameters.rb b/db/migrate/20130105120126_create_gs_parameters.rb
new file mode 100644
index 0000000..b8b915b
--- /dev/null
+++ b/db/migrate/20130105120126_create_gs_parameters.rb
@@ -0,0 +1,16 @@
+class CreateGsParameters < ActiveRecord::Migration
+ def self.up
+ create_table :gs_parameters do |t|
+ t.string :name
+ t.string :section
+ t.text :value
+ t.string :class_type
+ t.string :description
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :gs_parameters
+ end
+end
diff --git a/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb b/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb
new file mode 100644
index 0000000..a84e939
--- /dev/null
+++ b/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb
@@ -0,0 +1,104 @@
+class PopulateGsParameterWithDefaults < ActiveRecord::Migration
+ def up
+ add_column :gs_parameters, :entity, :string, :after => :id
+ # Generic
+ #
+ GsParameter.create(:name => 'GEMEINSCHAFT_VERSION', :section => 'Generic', :value => '5.0.2-nightly-build', :class_type => 'String')
+ GsParameter.create(:name => 'SUPER_TENANT_NAME', :section => 'Generic', :value => 'Super-Tenant', :class_type => 'String')
+
+ # System defaults
+ #
+ GsParameter.create(:name => 'MINIMUM_PIN_LENGTH', :section => 'System defaults', :value => '4', :class_type => 'Integer')
+ GsParameter.create(:name => 'MAXIMUM_PIN_LENGTH', :section => 'System defaults', :value => '10', :class_type => 'Integer')
+
+ # GUI
+ #
+ GsParameter.create(:name => 'GUI_REDIRECT_HTTPS', :section => 'GUI', :value => 'false', :class_type => 'Boolean')
+
+ # Phone numbers
+ # Only touch this if you know what you are doing!
+ #
+ GsParameter.create(:name => 'STRICT_INTERNAL_EXTENSION_HANDLING', :section => 'Phone numbers', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:name => 'STRICT_DID_HANDLING', :section => 'Phone numbers', :value => 'false', :class_type => 'Boolean')
+
+ # SIP defaults
+ #
+ GsParameter.create(:name => 'DEFAULT_LENGTH_SIP_AUTH_NAME', :section => 'SIP Defaults', :value => '10', :class_type => 'Integer')
+ GsParameter.create(:name => 'DEFAULT_LENGTH_SIP_PASSWORD', :section => 'SIP Defaults', :value => '15', :class_type => 'Integer')
+ GsParameter.create(:name => 'CALL_WAITING', :section => 'SIP Defaults', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:name => 'DEFAULT_CLIR_SETTING', :section => 'SIP Defaults', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:name => 'DEFAULT_CLIP_SETTING', :section => 'SIP Defaults', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:name => 'TO_S_MAX_CALLER_NAME_LENGTH', :section => 'SIP Defaults', :value => '25', :class_type => 'Integer')
+ GsParameter.create(:name => 'TO_S_MAX_LENGTH_OF_AUTH_NAME', :section => 'SIP Defaults', :value => '6', :class_type => 'Integer')
+
+ # Pagination defaults
+ #
+ GsParameter.create(:name => 'DEFAULT_PAGINATION_ENTRIES_PER_PAGE', :section => 'Pagination defaults', :value => '50', :class_type => 'Integer')
+
+ # Conference defaults
+ #
+ GsParameter.create(:name => 'MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE', :section => 'Conference defaults', :value => '100', :class_type => 'Integer')
+ GsParameter.create(:name => 'DEFAULT_MAX_CONFERENCE_MEMBERS', :section => 'Conference defaults', :value => '10', :class_type => 'Integer')
+
+ # Misc defaults
+ #
+ GsParameter.create(:name => 'MAX_EXTENSION_LENGTH', :section => 'Misc defaults', :value => '6', :class_type => 'Integer')
+
+ # Fax defaults
+ #
+ GsParameter.create(:name => 'DEFAULT_NUMBER_OF_RETRIES', :section => 'Fax defaults', :value => '3', :class_type => 'Integer')
+ GsParameter.create(:name => 'DAYS_TILL_AUTO_DELETE', :section => 'Fax defaults', :value => '90', :class_type => 'Integer')
+
+ # Names of PhoneNumberRanges
+ #
+ GsParameter.create(:name => 'INTERNAL_EXTENSIONS', :section => 'PhoneNumberRanges defaults', :value => 'internal_extensions', :class_type => 'String')
+ GsParameter.create(:name => 'SERVICE_NUMBERS', :section => 'PhoneNumberRanges defaults', :value => 'service_numbers', :class_type => 'String')
+ GsParameter.create(:name => 'DIRECT_INWARD_DIALING_NUMBERS', :section => 'PhoneNumberRanges defaults', :value => 'direct_inward_dialing_numbers', :class_type => 'String')
+
+ # Callthrough defaults
+ #
+ GsParameter.create(:name => 'CALLTHROUGH_HAS_WHITELISTS', :section => 'Callthrough defaults', :value => 'true', :class_type => 'Boolean')
+
+ # Huntgroup defaults
+ #
+ GsParameter.create(:name => 'HUNT_GROUP_STRATEGIES', :section => 'Huntgroup defaults', :value => ['ring_all', 'ring_recursively'].to_yaml, :class_type => 'YAML')
+ GsParameter.create(:name => 'VALID_SECONDS_BETWEEN_JUMPS_VALUES', :section => 'Huntgroup defaults', :value => (1 .. 60).to_a.map{|x| x * 2}.to_yaml, :class_type => 'YAML')
+
+ # Callforward defaults
+ #
+ GsParameter.create(:name => 'DEFAULT_CALL_FORWARD_DEPTH', :section => 'Callforward defaults', :value => '1', :class_type => 'Integer')
+ GsParameter.create(:name => 'MAX_CALL_FORWARD_DEPTH', :section => 'Callforward defaults', :value => '40', :class_type => 'Integer')
+ GsParameter.create(:name => 'CALLFORWARD_DESTINATION_DEFAULT', :section => 'Callforward defaults', :value => '+49', :class_type => 'String')
+ GsParameter.create(:name => 'CALLFORWARD_RULES_ACT_PER_SIP_ACCOUNT_DEFAULT', :section => 'Callforward defaults', :value => 'true', :class_type => 'Boolean')
+
+ # Phone
+ #
+ GsParameter.create(:name => 'PROVISIONING_AUTO_ADD_PHONE', :section => 'Phone', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:name => 'PROVISIONING_AUTO_ADD_SIP_ACCOUNT', :section => 'Phone', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:name => 'PROVISIONING_AUTO_TENANT_ID', :section => 'Phone', :value => '2', :class_type => 'Integer')
+ GsParameter.create(:name => 'PROVISIONING_AUTO_SIP_ACCOUNT_CALLER_PREFIX', :section => 'Phone', :value => 'Gemeinschaft ', :class_type => 'String')
+ GsParameter.create(:name => 'PROVISIONING_IEEE8021X_EAP_USERNAME', :section => 'Phone', :value => '', :class_type => 'String')
+ GsParameter.create(:name => 'PROVISIONING_IEEE8021X_EAP_PASSWORD', :section => 'Phone', :value => '', :class_type => 'String')
+ GsParameter.create(:name => 'NIGHTLY_REBOOT_OF_PHONES', :section => 'Phone', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:name => 'SIEMENS_HISTORY_RELOAD_TIMES', :section => 'Phone', :value => {0..6 => 600, 7..20 => 40, 21..24 => 300}.to_yaml, :class_type => 'YAML')
+
+ # API configuration
+ #
+ GsParameter.create(:name => 'DEFAULT_API_TENANT_ID', :section => 'API configuration', :value => '2', :class_type => 'Integer')
+ GsParameter.create(:name => 'REMOTE_IP_ADDRESS_WHITELIST', :section => 'API configuration', :value => [].to_yaml, :class_type => 'YAML') # e.g. ['10.0.0.1']
+ GsParameter.create(:name => 'IMPORT_CSV_FILE', :section => 'API configuration', :value => '/var/tmp/ExampleVoipCsvExport.csv', :class_type => 'String')
+ GsParameter.create(:name => 'DOUBLE_CHECK_POSITIVE_USERS_CSV', :section => 'API configuration', :value => '/var/tmp/ExampleDoubleCheckVoipCsvExport.csv', :class_type => 'String')
+ GsParameter.create(:name => 'IMPORT_CSV_ENCODING', :section => 'API configuration', :value => 'UTF-8', :class_type => 'String')
+ GsParameter.create(:name => 'USER_NAME_PREFIX', :section => 'API configuration', :value => 'dtc', :class_type => 'String')
+ GsParameter.create(:name => 'CALLTHROUGH_NAME_TO_BE_USED_FOR_DEFAULT_ACTIVATION', :section => 'API configuration', :value => 'Callthrough for employees', :class_type => 'String')
+
+ # GS Cluster configuration
+ #
+ GsParameter.create(:name => 'WRITE_GS_CLUSTER_SYNC_LOG', :section => 'GS Cluster ', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:name => 'HOMEBASE_IP_ADDRESS', :section => 'GS Cluster ', :value => '0.0.0.0', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.destroy_all
+ end
+end
diff --git a/db/migrate/20130107222128_set_provisioning_set_http_user.rb b/db/migrate/20130107222128_set_provisioning_set_http_user.rb
new file mode 100644
index 0000000..8066fb9
--- /dev/null
+++ b/db/migrate/20130107222128_set_provisioning_set_http_user.rb
@@ -0,0 +1,13 @@
+class SetProvisioningSetHttpUser < ActiveRecord::Migration
+ def up
+ # Provisioning stuff
+ #
+ GsParameter.create(:name => 'PROVISIONING_SET_HTTP_USER', :section => 'Provisioning', :value => 'admin', :class_type => 'String')
+ GsParameter.create(:name => 'PROVISIONING_SET_HTTP_PASSWORD', :section => 'Provisioning', :value => '8', :class_type => 'Integer')
+ end
+
+ def down
+ GsParameter.where(:name => 'PROVISIONING_SET_HTTP_USER').destroy_all
+ GsParameter.where(:name => 'PROVISIONING_SET_HTTP_PASSWORD').destroy_all
+ end
+end
diff --git a/db/migrate/20130109074326_add_entity_to_gs_parameter.rb b/db/migrate/20130109074326_add_entity_to_gs_parameter.rb
new file mode 100644
index 0000000..b1c0d4b
--- /dev/null
+++ b/db/migrate/20130109074326_add_entity_to_gs_parameter.rb
@@ -0,0 +1,6 @@
+class AddEntityToGsParameter < ActiveRecord::Migration
+ def change
+ add_column :gs_parameters, :entity, :string, :after => :id rescue puts "column already added"
+
+ end
+end
diff --git a/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb
new file mode 100644
index 0000000..fe1cdae
--- /dev/null
+++ b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb
@@ -0,0 +1,121 @@
+class PopulateGsParameterWithDialplanDefaults < ActiveRecord::Migration
+ def up
+ # sip account defaults
+ GsParameter.create(:entity => 'sip_accounts', :section => 'parameters', :name => 'vm-enabled', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sip_accounts', :section => 'parameters', :name => 'vm-email-all-messages', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sip_accounts', :section => 'parameters', :name => 'vm-attach-file', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sip_accounts', :section => 'parameters', :name => 'vm-mailto', :value => '', :class_type => 'String')
+ GsParameter.create(:entity => 'sip_accounts', :section => 'parameters', :name => 'sip-force-contact', :value => '', :class_type => 'String')
+
+ #sofia defaults
+ GsParameter.create(:entity => 'sofia', :section => 'profiles', :name => 'gemeinschaft', :value => 1, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'parameters', :name => 'log-level', :value => 3, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'parameters', :name => 'debug-presence', :value => 0, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'user-agent-string', :value => 'Gemeinschaft5', :class_type => 'String')
+
+ # default profile
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'debug', :value => 0, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'sip-trace', :value => 'no', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'log-auth-failures', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'context', :value => 'default', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'rfc2833-pt', :value => 101, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'pass-rfc2833', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'sip-port', :value => 5060, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'dialplan', :value => 'XML', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'dtmf-duration', :value => 2000, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'rtp-timer-name', :value => 'soft', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'inbound-codec-prefs', :value => 'PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'outbound-codec-prefs', :value => 'PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'inbound-codec-negotiation', :value => 'greedy', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'ext-rtp-ip', :value => 'auto-nat', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'ext-sip-ip', :value => 'auto-nat', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'hold-music', :value => 'local_stream://moh', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'manage-presence', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'tls', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'tls-sip-port', :value => 5061, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'tls-cert-dir', :value => '/opt/freeswitch/conf/ssl', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'accept-blind-reg', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'accept-blind-auth', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'nonce-ttl', :value => 60, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'disable-transcoding', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'manual-redirect', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'disable-transfer', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'disable-register', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'auth-calls', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'inbound-reg-force-matching-username', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'auth-all-packets', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'rtp-timeout-sec', :value => 300, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'rtp-hold-timeout-sec', :value => 1800, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'force-subscription-expires', :value => 3600, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'sip-force-expires', :value => 3000, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'sip-expires-max-deviation', :value => 600, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'challenge-realm', :value => 'auto_from', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'rtp-rewrite-timestamps', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'inbound-use-callid-as-uuid', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'outbound-use-callid-as-uuid', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'context', :value => 'default', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'record-template', :value => '${user_name}_${uuid}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav', :class_type => 'String')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'all-reg-options-ping', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'mark-dead-on-options-fail', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'registration-thread-frequency', :value => 300, :class_type => 'Integer')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'NDLB-force-rport', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'odbc-dsn', :value => 'gemeinschaft:gemeinschaft:gemeinschaft', :class_type => 'String')
+
+ # event manager defaults
+ GsParameter.create(:entity => 'events', :section => 'modules', :name => 'cdr_save', :value => 1, :class_type => 'Integer')
+ GsParameter.create(:entity => 'events', :section => 'modules', :name => 'call_history_save', :value => 2, :class_type => 'Integer')
+ GsParameter.create(:entity => 'events', :section => 'modules', :name => 'presence_update', :value => 3, :class_type => 'Integer')
+
+ # perimeter defaults
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_count', :value => 20, :class_type => 'Integer')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_time_span', :value => 2, :class_type => 'Integer')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'ban_futile', :value => 5, :class_type => 'Integer')
+ 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 => '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')
+
+ #dialplan defaults
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'node_id', :value => 1, :class_type => 'Integer')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'dial_timeout', :value => '120', :class_type => 'Integer')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'max_loops', :value => '20', :class_type => 'Integer')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'default_ringtone', :value => '1', :class_type => 'Integer')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'default_language', :value => 'en', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'phone_book_entry_image_url', :value => 'http://192.168.0.150/uploads/phone_book_entry/image', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'user_image_url', :value => 'http://192.168.0.150/uploads/user/image', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'ringtone_url', :value => 'http://192.168.0.150', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'ringback', :value => '%(2000,4000,440.0,480.0)', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'tone_busy', :value => '%(500,500,480,620);loops=4', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'phonebook_number_lookup', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'geo_number_lookup', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'send_ringing_to_gateways', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'bypass_media_network', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'update_callee_display', :value => 'false', :class_type => 'Boolean')
+ end
+
+ def down
+ entities = ['sip_accounts', 'sofia', 'events', 'perimeter', 'conferences', 'dialplan']
+ GsParameter.where(:entity => entities).destroy_all
+ end
+end
diff --git a/db/migrate/20130109182800_change_gs_parameter_odbc_defaults.rb b/db/migrate/20130109182800_change_gs_parameter_odbc_defaults.rb
new file mode 100644
index 0000000..1958c44
--- /dev/null
+++ b/db/migrate/20130109182800_change_gs_parameter_odbc_defaults.rb
@@ -0,0 +1,11 @@
+class ChangeGsParameterOdbcDefaults < ActiveRecord::Migration
+ def up
+ GsParameter.where(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'odbc-dsn').destroy_all
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'odbc-dsn', :value => 'default', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'odbc-dsn').destroy_all
+ GsParameter.create(:entity => 'sofia', :section => 'profile:gemeinschaft', :name => 'odbc-dsn', :value => 'gemeinschaft:gemeinschaft:gemeinschaft', :class_type => 'String')
+ end
+end
diff --git a/db/migrate/20130110085600_set_switch_parameters.rb b/db/migrate/20130110085600_set_switch_parameters.rb
new file mode 100644
index 0000000..85c3d64
--- /dev/null
+++ b/db/migrate/20130110085600_set_switch_parameters.rb
@@ -0,0 +1,21 @@
+class SetSwitchParameters < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'post_load_switch', :section => 'settings', :name => 'loglevel', :value => 'debug', :class_type => 'String')
+ GsParameter.create(:entity => 'post_load_switch', :section => 'settings', :name => 'colorize-console', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'post_load_switch', :section => 'settings', :name => 'max-sessions', :value => 1000, :class_type => 'Integer')
+ GsParameter.create(:entity => 'post_load_switch', :section => 'settings', :name => 'sessions-per-second', :value => 30, :class_type => 'Integer')
+ GsParameter.create(:entity => 'post_load_switch', :section => 'settings', :name => 'rtp-enable-zrtp', :value => 'false', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'post_load_switch', :section => 'settings', :name => 'rtp-start-port', :value => 16384, :class_type => 'Integer')
+ GsParameter.create(:entity => 'post_load_switch', :section => 'settings', :name => 'rtp-end-port', :value => 32768, :class_type => 'Integer')
+ end
+
+ def down
+ GsParameter.where(:entity => 'post_load_switch', :section => 'settings', :name => 'loglevel').destroy_all
+ GsParameter.where(:entity => 'post_load_switch', :section => 'settings', :name => 'colorize-console').destroy_all
+ GsParameter.where(:entity => 'post_load_switch', :section => 'settings', :name => 'max-sessions').destroy_all
+ GsParameter.where(:entity => 'post_load_switch', :section => 'settings', :name => 'sessions-per-second').destroy_all
+ GsParameter.where(:entity => 'post_load_switch', :section => 'settings', :name => 'rtp-enable-zrtp').destroy_all
+ GsParameter.where(:entity => 'post_load_switch', :section => 'settings', :name => 'rtp-start-port').destroy_all
+ GsParameter.where(:entity => 'post_load_switch', :section => 'settings', :name => 'rtp-end-port').destroy_all
+ end
+end
diff --git a/db/migrate/20130110113500_set_conference_parameters.rb b/db/migrate/20130110113500_set_conference_parameters.rb
new file mode 100644
index 0000000..2de10c9
--- /dev/null
+++ b/db/migrate/20130110113500_set_conference_parameters.rb
@@ -0,0 +1,33 @@
+class SetConferenceParameters < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'mute', :value => '', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'deaf mute', :value => '*', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'energy up', :value => '9', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'energy equ', :value => '8', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'energy dn', :value => '7', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'vol talk up', :value => '3', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'vol talk zero', :value => '2', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'vol talk dn', :value => '1', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'vol listen up', :value => '6', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'vol listen zero', :value => '5', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'vol listen dn', :value => '4', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_speaker', :name => 'hangup', :value => '#', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'mute', :value => '0', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'deaf mute', :value => '*', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'energy up', :value => '9', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'energy equ', :value => '8', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'energy dn', :value => '7', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'vol talk up', :value => '3', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'vol talk zero', :value => '2', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'vol talk dn', :value => '1', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'vol listen up', :value => '6', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'vol listen zero', :value => '5', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'vol listen dn', :value => '4', :class_type => 'String')
+ GsParameter.create(:entity => 'conferences', :section => 'controls_moderator', :name => 'hangup', :value => '#', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:entity => 'conference', :section => 'controls_speaker').destroy_all
+ GsParameter.where(:entity => 'conference', :section => 'controls_moderator').destroy_all
+ end
+end
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
diff --git a/db/migrate/20130110205056_add_number_of_shown_items_to_gs_parameter.rb b/db/migrate/20130110205056_add_number_of_shown_items_to_gs_parameter.rb
new file mode 100644
index 0000000..72b477a
--- /dev/null
+++ b/db/migrate/20130110205056_add_number_of_shown_items_to_gs_parameter.rb
@@ -0,0 +1,9 @@
+class AddNumberOfShownItemsToGsParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'NUMBER_OF_SHOWN_ITEMS', :section => 'Views', :value => '10', :class_type => 'Integer')
+ end
+
+ def down
+ GsParameter.where(:name => 'NUMBER_OF_SHOWN_ITEMS').destroy_all
+ end
+end
diff --git a/db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb b/db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb
new file mode 100644
index 0000000..bb99ace
--- /dev/null
+++ b/db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb
@@ -0,0 +1,10 @@
+class AddSecretTokenToGsParameter < ActiveRecord::Migration
+ def up
+ require 'securerandom'
+ GsParameter.create(:name => 'SECRET_TOKEN', :section => 'Cookies', :value => SecureRandom.hex(64), :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:name => 'SECRET_TOKEN').destroy_all
+ end
+end
diff --git a/db/migrate/20130112073300_set_dialplan_variables.rb b/db/migrate/20130112073300_set_dialplan_variables.rb
new file mode 100644
index 0000000..3d538c0
--- /dev/null
+++ b/db/migrate/20130112073300_set_dialplan_variables.rb
@@ -0,0 +1,11 @@
+class SetDialplanVariables < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'dialplan', :section => 'variables', :name => 'ringback', :value => '%(2000,4000,440.0,480.0)', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'variables', :name => 'send_silence_when_idle', :value => 0, :class_type => 'Integer')
+ GsParameter.create(:entity => 'dialplan', :section => 'variables', :name => 'hold_music', :value => 'local_stream://moh', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:entity => 'dialplan', :section => 'variables').destroy_all
+ end
+end
diff --git a/db/migrate/20130112074800_remove_ringback_dialplan_parameter.rb b/db/migrate/20130112074800_remove_ringback_dialplan_parameter.rb
new file mode 100644
index 0000000..90b793d
--- /dev/null
+++ b/db/migrate/20130112074800_remove_ringback_dialplan_parameter.rb
@@ -0,0 +1,9 @@
+class RemoveRingbackDialplanParameter < ActiveRecord::Migration
+ def up
+ GsParameter.where(:entity => 'dialplan', :section => 'parameters', :name => 'ringback').destroy_all
+ end
+
+ def down
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'ringback', :value => '%(2000,4000,440.0,480.0)', :class_type => 'String')
+ end
+end
diff --git a/db/migrate/20130112103337_set_new_value_for_provisioning_key_length.rb b/db/migrate/20130112103337_set_new_value_for_provisioning_key_length.rb
new file mode 100644
index 0000000..06d0ee8
--- /dev/null
+++ b/db/migrate/20130112103337_set_new_value_for_provisioning_key_length.rb
@@ -0,0 +1,9 @@
+class SetNewValueForProvisioningKeyLength < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => nil, :section => 'Provisioning', :name => 'PROVISIONING_KEY_LENGTH', :value => '12', :class_type => 'Integer')
+ end
+
+ def down
+ GsParameter.where(:name => 'PROVISIONING_KEY_LENGTH').destroy_all
+ end
+end
diff --git a/db/migrate/20130113072126_create_gateways.rb b/db/migrate/20130113072126_create_gateways.rb
new file mode 100644
index 0000000..e6c3f77
--- /dev/null
+++ b/db/migrate/20130113072126_create_gateways.rb
@@ -0,0 +1,16 @@
+class CreateGateways < ActiveRecord::Migration
+ def self.up
+ create_table :gateways do |t|
+ t.string :name
+ t.string :technology
+ t.boolean :inbound
+ t.boolean :outbound
+ t.string :description
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :gateways
+ end
+end
diff --git a/db/migrate/20130113073323_create_gateway_settings.rb b/db/migrate/20130113073323_create_gateway_settings.rb
new file mode 100644
index 0000000..0200ae7
--- /dev/null
+++ b/db/migrate/20130113073323_create_gateway_settings.rb
@@ -0,0 +1,16 @@
+class CreateGatewaySettings < ActiveRecord::Migration
+ def self.up
+ create_table :gateway_settings do |t|
+ t.integer :gateway_id
+ t.string :name
+ t.string :value
+ t.string :class_type
+ t.string :description
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :gateway_settings
+ end
+end
diff --git a/db/migrate/20130113090705_create_gateway_parameters.rb b/db/migrate/20130113090705_create_gateway_parameters.rb
new file mode 100644
index 0000000..bbf5f54
--- /dev/null
+++ b/db/migrate/20130113090705_create_gateway_parameters.rb
@@ -0,0 +1,16 @@
+class CreateGatewayParameters < ActiveRecord::Migration
+ def self.up
+ create_table :gateway_parameters do |t|
+ t.integer :gateway_id
+ t.string :name
+ t.string :value
+ t.string :class_type
+ t.string :description
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :gateway_parameters
+ end
+end
diff --git a/db/migrate/20130116133243_create_call_routes.rb b/db/migrate/20130116133243_create_call_routes.rb
new file mode 100644
index 0000000..c2feda8
--- /dev/null
+++ b/db/migrate/20130116133243_create_call_routes.rb
@@ -0,0 +1,16 @@
+class CreateCallRoutes < ActiveRecord::Migration
+ def self.up
+ create_table :call_routes do |t|
+ t.string :routing_table
+ t.string :name
+ t.string :endpoint_type
+ t.integer :endpoint_id
+ t.integer :position
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :call_routes
+ end
+end
diff --git a/db/migrate/20130116133433_create_route_elements.rb b/db/migrate/20130116133433_create_route_elements.rb
new file mode 100644
index 0000000..72f6894
--- /dev/null
+++ b/db/migrate/20130116133433_create_route_elements.rb
@@ -0,0 +1,19 @@
+class CreateRouteElements < ActiveRecord::Migration
+ def self.up
+ create_table :route_elements do |t|
+ t.integer :call_route_id
+ t.string :var_in
+ t.string :var_out
+ t.string :pattern
+ t.string :replacement
+ t.string :action
+ t.boolean :mandatory
+ t.integer :position
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :route_elements
+ end
+end
diff --git a/db/migrate/20130116145500_set_routing_variables.rb b/db/migrate/20130116145500_set_routing_variables.rb
new file mode 100644
index 0000000..abd8fa6
--- /dev/null
+++ b/db/migrate/20130116145500_set_routing_variables.rb
@@ -0,0 +1,12 @@
+class SetRoutingVariables < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'call_route', :section => 'failover', :name => '603', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'call_route', :section => 'failover', :name => '480', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'call_route', :section => 'failover', :name => 'UNALLOCATED_NUMBER', :value => 'true', :class_type => 'Boolean')
+ GsParameter.create(:entity => 'call_route', :section => 'failover', :name => 'NORMAL_TEMPORARY_FAILURE', :value => 'true', :class_type => 'Boolean')
+ end
+
+ def down
+ GsParameter.where(:entity => 'call_route', :section => 'failover').destroy_all
+ end
+end
diff --git a/db/migrate/20130116213312_change_user_name_prefix.rb b/db/migrate/20130116213312_change_user_name_prefix.rb
new file mode 100644
index 0000000..1e6aa59
--- /dev/null
+++ b/db/migrate/20130116213312_change_user_name_prefix.rb
@@ -0,0 +1,5 @@
+class ChangeUserNamePrefix < ActiveRecord::Migration
+ def up
+ GsParameter.where(:name => 'USER_NAME_PREFIX').first.update_attributes(:value => "xyz")
+ end
+end
diff --git a/db/migrate/20130117142600_change_action_prerouting_table.rb b/db/migrate/20130117142600_change_action_prerouting_table.rb
new file mode 100644
index 0000000..8b57ca6
--- /dev/null
+++ b/db/migrate/20130117142600_change_action_prerouting_table.rb
@@ -0,0 +1,13 @@
+class ChangeActionPreroutingTable < ActiveRecord::Migration
+ def up
+ RouteElement.where(:action => 'set_route_var', :mandatory => true).each do |route|
+ route.update_attributes(:action => 'match')
+ end
+ end
+
+ def down
+ RouteElement.where(:action => 'match', :mandatory => true).each do |route|
+ route.update_attributes(:action => 'set_route_var')
+ end
+ end
+end
diff --git a/db/migrate/20130117191840_change_column_name_in_call_route.rb b/db/migrate/20130117191840_change_column_name_in_call_route.rb
new file mode 100644
index 0000000..bbc4f28
--- /dev/null
+++ b/db/migrate/20130117191840_change_column_name_in_call_route.rb
@@ -0,0 +1,7 @@
+class ChangeColumnNameInCallRoute < ActiveRecord::Migration
+ def up
+ if column_exists?(:call_routes, :table)
+ rename_column :call_routes, :table, :routing_table
+ end
+ end
+end
diff --git a/db/migrate/20130121123742_add_default_area_code_to_gemeinschaft_setup.rb b/db/migrate/20130121123742_add_default_area_code_to_gemeinschaft_setup.rb
new file mode 100644
index 0000000..63a9fd1
--- /dev/null
+++ b/db/migrate/20130121123742_add_default_area_code_to_gemeinschaft_setup.rb
@@ -0,0 +1,5 @@
+class AddDefaultAreaCodeToGemeinschaftSetup < ActiveRecord::Migration
+ def change
+ add_column :gemeinschaft_setups, :default_area_code, :string
+ end
+end
diff --git a/db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb b/db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb
new file mode 100644
index 0000000..d4cd660
--- /dev/null
+++ b/db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb
@@ -0,0 +1,9 @@
+class AddGemeinschaftBuildnameToGsParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'GEMEINSCHAFT_BUILDNAME', :section => 'Generic', :value => '', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:name => 'GEMEINSCHAFT_BUILDNAME').destroy_all
+ end
+end