From 01f2ab4e3d5694de81f6ebb594e0e852616ebbd9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 12:42:53 +0100 Subject: Added GsParameter model as a replacement for gemeinschaft_parameters.rb --- db/migrate/20130105093021_create_gs_parameters.rb | 12 +++ ...05093128_populate_gs_parameter_with_defaults.rb | 103 +++++++++++++++++++++ db/schema.rb | 11 ++- 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130105093021_create_gs_parameters.rb create mode 100644 db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb (limited to 'db') diff --git a/db/migrate/20130105093021_create_gs_parameters.rb b/db/migrate/20130105093021_create_gs_parameters.rb new file mode 100644 index 0000000..e1ea2b2 --- /dev/null +++ b/db/migrate/20130105093021_create_gs_parameters.rb @@ -0,0 +1,12 @@ +class CreateGsParameters < ActiveRecord::Migration + def change + create_table :gs_parameters do |t| + t.string :name + t.string :section + t.string :value + t.string :class_type + + t.timestamps + end + end +end diff --git a/db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb b/db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb new file mode 100644 index 0000000..a4c9358 --- /dev/null +++ b/db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb @@ -0,0 +1,103 @@ +class PopulateGsParameterWithDefaults < ActiveRecord::Migration + def up + # 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/schema.rb b/db/schema.rb index 12114dc..2a5c267 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20121230110747) do +ActiveRecord::Schema.define(:version => 20130105093128) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -526,6 +526,15 @@ ActiveRecord::Schema.define(:version => 20121230110747) do t.datetime "last_sync" end + create_table "gs_parameters", :force => true do |t| + t.string "name" + t.string "section" + t.string "value" + t.string "class_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "gui_function_memberships", :force => true do |t| t.integer "gui_function_id" t.integer "user_group_id" -- cgit v1.2.3 From e76890d5f4634d47514a592d501d9792ae2ff7bb Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 21:00:52 +0100 Subject: Different scaffold for GsParameter. --- db/migrate/20130105093021_create_gs_parameters.rb | 12 --- ...05093128_populate_gs_parameter_with_defaults.rb | 103 --------------------- db/migrate/20130105120126_create_gs_parameters.rb | 16 ++++ ...05120353_populate_gs_parameter_with_defaults.rb | 103 +++++++++++++++++++++ 4 files changed, 119 insertions(+), 115 deletions(-) delete mode 100644 db/migrate/20130105093021_create_gs_parameters.rb delete mode 100644 db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb create mode 100644 db/migrate/20130105120126_create_gs_parameters.rb create mode 100644 db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb (limited to 'db') diff --git a/db/migrate/20130105093021_create_gs_parameters.rb b/db/migrate/20130105093021_create_gs_parameters.rb deleted file mode 100644 index e1ea2b2..0000000 --- a/db/migrate/20130105093021_create_gs_parameters.rb +++ /dev/null @@ -1,12 +0,0 @@ -class CreateGsParameters < ActiveRecord::Migration - def change - create_table :gs_parameters do |t| - t.string :name - t.string :section - t.string :value - t.string :class_type - - t.timestamps - end - end -end diff --git a/db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb b/db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb deleted file mode 100644 index a4c9358..0000000 --- a/db/migrate/20130105093128_populate_gs_parameter_with_defaults.rb +++ /dev/null @@ -1,103 +0,0 @@ -class PopulateGsParameterWithDefaults < ActiveRecord::Migration - def up - # 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/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..a4c9358 --- /dev/null +++ b/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb @@ -0,0 +1,103 @@ +class PopulateGsParameterWithDefaults < ActiveRecord::Migration + def up + # 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 -- cgit v1.2.3 From ddb3dfa92ec0878240211cb2b7a8e125961b1360 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 23:01:16 +0100 Subject: Moved to GsParemeter.get and set defaults for a couple of validations. --- db/migrate/20120105120126_create_gs_parameters.rb | 16 ++++ ...05120353_populate_gs_parameter_with_defaults.rb | 103 +++++++++++++++++++++ db/migrate/20130105120126_create_gs_parameters.rb | 16 ---- ...05120353_populate_gs_parameter_with_defaults.rb | 103 --------------------- db/schema.rb | 9 +- .../20120119160732_emergency_numbers_germany.rb | 4 +- 6 files changed, 126 insertions(+), 125 deletions(-) create mode 100644 db/migrate/20120105120126_create_gs_parameters.rb create mode 100644 db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb delete mode 100644 db/migrate/20130105120126_create_gs_parameters.rb delete mode 100644 db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb (limited to 'db') diff --git a/db/migrate/20120105120126_create_gs_parameters.rb b/db/migrate/20120105120126_create_gs_parameters.rb new file mode 100644 index 0000000..b8b915b --- /dev/null +++ b/db/migrate/20120105120126_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/20120105120353_populate_gs_parameter_with_defaults.rb b/db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb new file mode 100644 index 0000000..a4c9358 --- /dev/null +++ b/db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb @@ -0,0 +1,103 @@ +class PopulateGsParameterWithDefaults < ActiveRecord::Migration + def up + # 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/20130105120126_create_gs_parameters.rb b/db/migrate/20130105120126_create_gs_parameters.rb deleted file mode 100644 index b8b915b..0000000 --- a/db/migrate/20130105120126_create_gs_parameters.rb +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index a4c9358..0000000 --- a/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb +++ /dev/null @@ -1,103 +0,0 @@ -class PopulateGsParameterWithDefaults < ActiveRecord::Migration - def up - # 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/schema.rb b/db/schema.rb index 2a5c267..832f001 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130105093128) do +ActiveRecord::Schema.define(:version => 20121230110747) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -529,10 +529,11 @@ ActiveRecord::Schema.define(:version => 20130105093128) do create_table "gs_parameters", :force => true do |t| t.string "name" t.string "section" - t.string "value" + t.text "value" t.string "class_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "gui_function_memberships", :force => true do |t| diff --git a/db/to-dos/20120119160732_emergency_numbers_germany.rb b/db/to-dos/20120119160732_emergency_numbers_germany.rb index 9dd9131..f0c02d9 100644 --- a/db/to-dos/20120119160732_emergency_numbers_germany.rb +++ b/db/to-dos/20120119160732_emergency_numbers_germany.rb @@ -11,7 +11,7 @@ class EmergencyNumbersGermany < ActiveRecord::Migration ################################################################ # Emergency numbers which shouldn't be used as extensions ################################################################ - notruf_nummern = germany.phone_number_ranges.find_or_create_by_name(SERVICE_NUMBERS) + notruf_nummern = germany.phone_number_ranges.find_or_create_by_name(GsParameter.get('SERVICE_NUMBERS')) notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Polizei', '110') notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Feuerwehr', '112') notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Zentrale Behördenrufnummer', '115') @@ -25,6 +25,6 @@ class EmergencyNumbersGermany < ActiveRecord::Migration def down germany = Country.find_by_name('Germany') - germany.phone_number_ranges.where(:name => SERVICE_NUMBERS).destroy_all + germany.phone_number_ranges.where(:name => GsParameter.get('SERVICE_NUMBERS')).destroy_all end end -- cgit v1.2.3 From 80e7a0bb9846fc99d9b0631689bab0004fa37527 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 23:05:53 +0100 Subject: Renamed migrations to the correct date. --- db/migrate/20120105120126_create_gs_parameters.rb | 16 ---- ...05120353_populate_gs_parameter_with_defaults.rb | 103 --------------------- db/migrate/20130105120126_create_gs_parameters.rb | 16 ++++ ...05120353_populate_gs_parameter_with_defaults.rb | 103 +++++++++++++++++++++ db/schema.rb | 2 +- 5 files changed, 120 insertions(+), 120 deletions(-) delete mode 100644 db/migrate/20120105120126_create_gs_parameters.rb delete mode 100644 db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb create mode 100644 db/migrate/20130105120126_create_gs_parameters.rb create mode 100644 db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb (limited to 'db') diff --git a/db/migrate/20120105120126_create_gs_parameters.rb b/db/migrate/20120105120126_create_gs_parameters.rb deleted file mode 100644 index b8b915b..0000000 --- a/db/migrate/20120105120126_create_gs_parameters.rb +++ /dev/null @@ -1,16 +0,0 @@ -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/20120105120353_populate_gs_parameter_with_defaults.rb b/db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb deleted file mode 100644 index a4c9358..0000000 --- a/db/migrate/20120105120353_populate_gs_parameter_with_defaults.rb +++ /dev/null @@ -1,103 +0,0 @@ -class PopulateGsParameterWithDefaults < ActiveRecord::Migration - def up - # 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/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..a4c9358 --- /dev/null +++ b/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb @@ -0,0 +1,103 @@ +class PopulateGsParameterWithDefaults < ActiveRecord::Migration + def up + # 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/schema.rb b/db/schema.rb index 832f001..e8b3c4a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20121230110747) do +ActiveRecord::Schema.define(:version => 20130105120353) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From 97e73758b2d61c90dc2d1bdbcfd61f7a80db21a8 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 7 Jan 2013 23:29:52 +0100 Subject: Added PROVISIONING_SET_HTTP_USER and PROVISIONING_SET_HTTP_PASSWORD. --- db/migrate/20130107222128_set_provisioning_set_http_user.rb | 13 +++++++++++++ db/schema.rb | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130107222128_set_provisioning_set_http_user.rb (limited to 'db') 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/schema.rb b/db/schema.rb index e8b3c4a..982c406 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130105120353) do +ActiveRecord::Schema.define(:version => 20130107222128) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From 35a981aa271196adc5a265f52a5ed8b902cfa2c7 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Tue, 8 Jan 2013 21:54:04 +0100 Subject: have Snom meetingPoint names the same as other Snom phones to have correct sort order --- db/migrate/20121230110747_snom_meetingpoint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db') 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 -- cgit v1.2.3 From af1a7678582e2e629ed4c8c06528b9a62bf62242 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 11:08:49 +0100 Subject: entity added to GsParameter --- db/migrate/20130109074326_add_entity_to_gs_parameter.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 db/migrate/20130109074326_add_entity_to_gs_parameter.rb (limited to 'db') 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..25091c9 --- /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 + + end +end -- cgit v1.2.3 From 1c9204491cf7d9539c31b465fc4590c188fbc01e Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 11:09:20 +0100 Subject: polulate GsParameter with dialplan parameters --- ...populate_gs_parameter_with_dialplan_defaults.rb | 116 +++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb (limited to 'db') 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..c03819a --- /dev/null +++ b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb @@ -0,0 +1,116 @@ +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') + + #sofia defaults + GsParameter.create(:entity => 'sofia', :section => 'profiles', :name => 'gemeinschaft', :value => 'true', :class_type => 'Boolean') + 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 => 'odbc-dsn', :value => 'gemeinschaft:gemeinschaft:gemeinschaft', :class_type => 'String') + + # event manager defaults + GsParameter.create(:entity => 'events', :section => 'modules', :name => 'cdr_save', :value => 'true', :class_type => 'Boolean') + GsParameter.create(:entity => 'events', :section => 'modules', :name => 'call_history_save', :value => 'true', :class_type => 'Boolean') + GsParameter.create(:entity => 'events', :section => 'modules', :name => 'presence_update', :value => 'true', :class_type => 'Boolean') + + # 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 -- cgit v1.2.3 From 0aedd396dde10c9cfa494cb3f825ae4409159954 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 11:54:53 +0100 Subject: profile number vs. boolean --- .../20130109090000_populate_gs_parameter_with_dialplan_defaults.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db') 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 c03819a..1883592 100644 --- a/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb +++ b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb @@ -7,7 +7,7 @@ class PopulateGsParameterWithDialplanDefaults < ActiveRecord::Migration GsParameter.create(:entity => 'sip_accounts', :section => 'parameters', :name => 'vm-mailto', :value => '', :class_type => 'String') #sofia defaults - GsParameter.create(:entity => 'sofia', :section => 'profiles', :name => 'gemeinschaft', :value => 'true', :class_type => 'Boolean') + 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') -- cgit v1.2.3 From 9ea7d243a26937325e55564182587be4747f9070 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 12:14:37 +0100 Subject: additional parameters --- .../20130109090000_populate_gs_parameter_with_dialplan_defaults.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'db') 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 1883592..2538c3a 100644 --- a/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb +++ b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb @@ -5,6 +5,7 @@ class PopulateGsParameterWithDialplanDefaults < ActiveRecord::Migration 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') @@ -54,6 +55,10 @@ class PopulateGsParameterWithDialplanDefaults < ActiveRecord::Migration 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 -- cgit v1.2.3 From 99f84f09539df465db987b11c7f6b40479e10125 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 13:48:32 +0100 Subject: order modules --- .../20130109090000_populate_gs_parameter_with_dialplan_defaults.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'db') 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 2538c3a..12ac63c 100644 --- a/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb +++ b/db/migrate/20130109090000_populate_gs_parameter_with_dialplan_defaults.rb @@ -62,9 +62,9 @@ class PopulateGsParameterWithDialplanDefaults < ActiveRecord::Migration 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 => 'true', :class_type => 'Boolean') - GsParameter.create(:entity => 'events', :section => 'modules', :name => 'call_history_save', :value => 'true', :class_type => 'Boolean') - GsParameter.create(:entity => 'events', :section => 'modules', :name => 'presence_update', :value => 'true', :class_type => 'Boolean') + 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') -- cgit v1.2.3 From 9c15b1dfd6057cbfde8c6a5c8d90a35073ec5dca Mon Sep 17 00:00:00 2001 From: Sascha Daniels Date: Wed, 9 Jan 2013 14:35:06 +0100 Subject: Fixed migration issue. closes #79 --- db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb | 1 + db/migrate/20130109074326_add_entity_to_gs_parameter.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'db') diff --git a/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb b/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb index a4c9358..a84e939 100644 --- a/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb +++ b/db/migrate/20130105120353_populate_gs_parameter_with_defaults.rb @@ -1,5 +1,6 @@ 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') diff --git a/db/migrate/20130109074326_add_entity_to_gs_parameter.rb b/db/migrate/20130109074326_add_entity_to_gs_parameter.rb index 25091c9..b1c0d4b 100644 --- a/db/migrate/20130109074326_add_entity_to_gs_parameter.rb +++ b/db/migrate/20130109074326_add_entity_to_gs_parameter.rb @@ -1,6 +1,6 @@ class AddEntityToGsParameter < ActiveRecord::Migration def change - add_column :gs_parameters, :entity, :string, :after => :id + add_column :gs_parameters, :entity, :string, :after => :id rescue puts "column already added" end end -- cgit v1.2.3 From b1fad77507c71402d25f085c048848462c2d52f1 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 9 Jan 2013 19:39:53 +0100 Subject: set odbc-dsn to default --- .../20130109182800_change_gs_parameter_odbc_defaults.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20130109182800_change_gs_parameter_odbc_defaults.rb (limited to 'db') 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 -- cgit v1.2.3 From 120b8b444b10b0d42c9ddc773a48f3210f316e59 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 10 Jan 2013 10:05:47 +0100 Subject: post_load_switch.conf parameters --- db/migrate/20130110085600_set_switch_parameters.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 db/migrate/20130110085600_set_switch_parameters.rb (limited to 'db') 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 -- cgit v1.2.3 From 70c436c52c76cf866b03fcab6bc43437c9490cd1 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 10:34:57 +0100 Subject: GsParameter :entity, :section and :name can't be changed in the GUI any more. --- db/schema.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'db') diff --git a/db/schema.rb b/db/schema.rb index 982c406..40326a6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130107222128) do +ActiveRecord::Schema.define(:version => 20130109182800) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -534,6 +534,7 @@ ActiveRecord::Schema.define(:version => 20130107222128) do t.string "description" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.string "entity" end create_table "gui_function_memberships", :force => true do |t| -- cgit v1.2.3 From c0dfdfce54b2e698580893d18ea101ecaab89aad Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 10 Jan 2013 14:23:18 +0100 Subject: conference controls --- .../20130110113500_set_conference_parameters.rb | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 db/migrate/20130110113500_set_conference_parameters.rb (limited to 'db') 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 -- cgit v1.2.3 From f34c48f4922faa4e433212747347ad7319942699 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 10 Jan 2013 16:33:49 +0100 Subject: whitespace --- ...populate_gs_parameter_with_dialplan_defaults.rb | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'db') 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') -- cgit v1.2.3 From 213eccb7678e74a5c06e6f9ff5ba3bad2dd90b3c Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 10 Jan 2013 16:41:53 +0100 Subject: voicemail configuration --- .../20130110133500_set_voicemail_parameters.rb | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 db/migrate/20130110133500_set_voicemail_parameters.rb (limited to 'db') 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 -- cgit v1.2.3 From 9f0034ff3c969c867258a90d1a9c6f76f392092a Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 21:58:18 +0100 Subject: Refactoring and adding some caching for tenant#view. --- .../20130110205056_add_number_of_shown_items_to_gs_parameter.rb | 9 +++++++++ db/schema.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130110205056_add_number_of_shown_items_to_gs_parameter.rb (limited to 'db') 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/schema.rb b/db/schema.rb index 40326a6..2c14be3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130109182800) do +ActiveRecord::Schema.define(:version => 20130110205056) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From a742a9038210691169b407c2897a38ded8618f84 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 11 Jan 2013 12:28:35 +0100 Subject: Generate a secret_token (for signed cookies). --- db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb | 10 ++++++++++ db/schema.rb | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130111111747_add_secret_token_to_gs_parameter.rb (limited to 'db') 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/schema.rb b/db/schema.rb index 2c14be3..bc7693b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130110205056) do +ActiveRecord::Schema.define(:version => 20130111111747) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From ce44ece18e64dc0bccee4cab680b965a38c0522d Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 12 Jan 2013 09:07:50 +0100 Subject: dialplan variables set --- db/migrate/20130112073300_set_dialplan_variables.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20130112073300_set_dialplan_variables.rb (limited to 'db') 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 -- cgit v1.2.3 From 0b9e91fd4654ac5c73072f9e77025abc3060c0c0 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 12 Jan 2013 09:08:06 +0100 Subject: ringback parameter removed --- db/migrate/20130112074800_remove_ringback_dialplan_parameter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130112074800_remove_ringback_dialplan_parameter.rb (limited to 'db') 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 -- cgit v1.2.3 From d8287a7dbcc287791ed069cfc14ca6b9db0e66a7 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 12 Jan 2013 10:28:49 +0100 Subject: Fixed a logic if/else bug. --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db') diff --git a/db/schema.rb b/db/schema.rb index bc7693b..cc5afcc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130111111747) do +ActiveRecord::Schema.define(:version => 20130112074800) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From ec342d3d91d2cfa8c210722354353cfe8a90a8bc Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 12 Jan 2013 11:53:21 +0100 Subject: Add PROVISIONING_KEY_LENGTH as a GsParameter value. #73 --- .../20130112103337_set_new_value_for_provisioning_key_length.rb | 9 +++++++++ db/schema.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130112103337_set_new_value_for_provisioning_key_length.rb (limited to 'db') 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/schema.rb b/db/schema.rb index cc5afcc..a6aae9b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130112074800) do +ActiveRecord::Schema.define(:version => 20130112103337) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From 9c3f6bfe2b5ae7d1dc05de432ce4fe202940d84d Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sun, 13 Jan 2013 16:40:43 +0000 Subject: gateway model migration --- db/migrate/20130113072126_create_gateways.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/migrate/20130113072126_create_gateways.rb (limited to 'db') 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 -- cgit v1.2.3 From 4cacd9a6ccc2caa0606a7cb6db0002c67dbae33b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sun, 13 Jan 2013 16:40:57 +0000 Subject: gateway settings model migration --- db/migrate/20130113073323_create_gateway_settings.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/migrate/20130113073323_create_gateway_settings.rb (limited to 'db') 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 -- cgit v1.2.3 From 2e8f2f2b51303ad1ad677a606e877b1fd3d7219b Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sun, 13 Jan 2013 16:41:13 +0000 Subject: gateway parameters model migration --- db/migrate/20130113090705_create_gateway_parameters.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/migrate/20130113090705_create_gateway_parameters.rb (limited to 'db') 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 -- cgit v1.2.3 From bfacc7b5de2f3a5a9d09a16683a9ba1fcf184d98 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 13 Jan 2013 22:11:11 +0100 Subject: Fixed some gateway stuff. --- db/schema.rb | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'db') diff --git a/db/schema.rb b/db/schema.rb index a6aae9b..bc51504 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130112103337) do +ActiveRecord::Schema.define(:version => 20130113090705) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -490,6 +490,36 @@ ActiveRecord::Schema.define(:version => 20130112103337) do t.integer "stop_time", :default => 0, :null => false end + create_table "gateway_parameters", :force => true do |t| + t.integer "gateway_id" + t.string "name" + t.string "value" + t.string "class_type" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "gateway_settings", :force => true do |t| + t.integer "gateway_id" + t.string "name" + t.string "value" + t.string "class_type" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "gateways", :force => true do |t| + t.string "name" + t.string "technology" + t.boolean "inbound" + t.boolean "outbound" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "gemeinschaft_setups", :force => true do |t| t.integer "user_id" t.integer "sip_domain_id" -- cgit v1.2.3 From 113e3c6c6117fbeca7b9bf1f0e6dc26b0db9c407 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 16 Jan 2013 08:33:45 -0500 Subject: call_routes added --- db/migrate/20130116133243_create_call_routes.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/migrate/20130116133243_create_call_routes.rb (limited to 'db') diff --git a/db/migrate/20130116133243_create_call_routes.rb b/db/migrate/20130116133243_create_call_routes.rb new file mode 100644 index 0000000..c2d3f45 --- /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 :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 -- cgit v1.2.3 From 8c83a89c6fbfdb31cae8ea6fcf2fd50c12c076a5 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 16 Jan 2013 08:37:56 -0500 Subject: route_elements added --- db/migrate/20130116133433_create_route_elements.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db/migrate/20130116133433_create_route_elements.rb (limited to 'db') 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 -- cgit v1.2.3 From be11e945ed0983c01b86ba2c598b035cb762f245 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 16 Jan 2013 16:04:46 +0100 Subject: set failover table --- db/migrate/20130116145500_set_routing_variables.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20130116145500_set_routing_variables.rb (limited to 'db') 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 -- cgit v1.2.3 From 0ee17f52f8ad337c1240b4c55dbd8f6c6c74dc90 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 16:32:59 +0100 Subject: Fixed routes and breadcrumbs. #106 --- db/schema.rb | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'db') diff --git a/db/schema.rb b/db/schema.rb index bc51504..898faac 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130113090705) do +ActiveRecord::Schema.define(:version => 20130116133433) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -176,6 +176,16 @@ ActiveRecord::Schema.define(:version => 20130113090705) do t.datetime "updated_at", :null => false end + create_table "call_routes", :force => true do |t| + t.string "table" + t.string "name" + t.string "endpoint_type" + t.integer "endpoint_id" + t.integer "position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "calls", :id => false, :force => true do |t| t.string "call_uuid" t.string "call_created", :limit => 128 @@ -806,6 +816,19 @@ ActiveRecord::Schema.define(:version => 20130113090705) do t.datetime "updated_at", :null => false end + create_table "route_elements", :force => true 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.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "sessions", :force => true do |t| t.string "session_id", :null => false t.text "data" -- cgit v1.2.3 From 7cdcbdc4b851b348bb21e0f2ff437138e8b9884b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 21:00:41 +0100 Subject: Added page caching for the gemeinschaft_setup#new page. --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db') diff --git a/db/schema.rb b/db/schema.rb index 898faac..bc4f737 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130116133433) do +ActiveRecord::Schema.define(:version => 20130116145500) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From ee9efa4e414e89a5dbc8df5b94b758055d8ee633 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 22:37:20 +0100 Subject: Set a new default for USER_NAME_PREFIX. --- db/migrate/20130116213312_change_user_name_prefix.rb | 5 +++++ db/schema.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130116213312_change_user_name_prefix.rb (limited to 'db') 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/schema.rb b/db/schema.rb index bc4f737..8416305 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130116145500) do +ActiveRecord::Schema.define(:version => 20130116213312) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From 8fd56dfe3d2bca6ccd9353031947ae4a8dca4528 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 16 Jan 2013 23:09:20 +0100 Subject: set prerouting table --- db/migrate/20130116203000_set_prerouting_table.rb | 99 +++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 db/migrate/20130116203000_set_prerouting_table.rb (limited to 'db') diff --git a/db/migrate/20130116203000_set_prerouting_table.rb b/db/migrate/20130116203000_set_prerouting_table.rb new file mode 100644 index 0000000..86137a0 --- /dev/null +++ b/db/migrate/20130116203000_set_prerouting_table.rb @@ -0,0 +1,99 @@ +class SetPreroutingTable < ActiveRecord::Migration + def up + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*0%*$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*$', :replacement => 'f-li', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*0%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*(%d+)#*$', :replacement => 'f-li-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*0%*(%d+)%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*(%d+)%*(%d+)#*$', :replacement => 'f-li-%1-%2', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#0#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#0#$', :replacement => 'f-lo', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*5%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*5%*(%d+)#$', :replacement => 'f-acdmtg-0-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*30#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*30#$', :replacement => 'f-clipon', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#30#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#30#$', :replacement => 'f-clipoff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*31#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*31#$', :replacement => 'f-cliroff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#31#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#31#$', :replacement => 'f-cliron', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*31#(%d+)$', :replacement => 'f-dcliroff-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#31#(%d+)$', :replacement => 'f-dcliron-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*43#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*43#$', :replacement => 'f-cwaon', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#43#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#43#$', :replacement => 'f-cwaoff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#002#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#002#$', :replacement => 'f-cfoff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^##002#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##002#$', :replacement => 'f-cfdel', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*21#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*21#$', :replacement => 'f-cfu', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*21%*(%d+)#$', :replacement => 'f-cfu-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*21%*(%d+)#$', :replacement => 'f-cfu-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#21#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#21#$', :replacement => 'f-cfuoff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^##21#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##21#$', :replacement => 'f-cfudel', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*61#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61#$', :replacement => 'f-cfn', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61%*(%d+)#$', :replacement => 'f-cfn-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*61%*(%d+)#$', :replacement => 'f-cfn-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61%*(%d+)%*(%d+)#$', :replacement => 'f-cfn-%1-%2', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*61%*(%d+)%*(%d+)#$', :replacement => 'f-cfn-%1-%2', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#61#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#61#$', :replacement => 'f-cfnoff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^##61#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##61#$', :replacement => 'f-cfndel', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*62#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*62#$', :replacement => 'f-cfo', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*62%*(%d+)#$', :replacement => 'f-cfo-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*62%*(%d+)#$', :replacement => 'f-cfo-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#62#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#62#$', :replacement => 'f-cfooff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^##62#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##62#$', :replacement => 'f-cfodel', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*67#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*67#$', :replacement => 'f-cfb', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*67%*(%d+)#$', :replacement => 'f-cfb-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*67%*(%d+)#$', :replacement => 'f-cfb-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^#67#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#67#$', :replacement => 'f-cfboff', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^##67#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##67#$', :replacement => 'f-cfbdel', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*66#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*66#$', :replacement => 'f-redial', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*98$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98$', :replacement => 'f-vmcheck', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*98#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98#$', :replacement => 'f-vmcheck', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*98%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98%*(%d+)#$', :replacement => 'f-vmcheck-%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*1337%*1%*1#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*1337%*1%*1#$', :replacement => 'f-loaon', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*1337%*1%*0#$', :endpoint_type => 'dialplanfunction').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*1337%*1%*0#$', :replacement => 'f-loaoff', :action => 'set_route_var', :mandatory => true) + + CallRoute.create(:table => 'prerouting', :name => 'international prefix', :endpoint_type => 'phonenumber').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^00(%d+)$', :replacement => '+%1', :action => 'set_route_var', :mandatory => true) + CallRoute.create(:table => 'prerouting', :name => 'national prefix', :endpoint_type => 'phonenumber').route_elements. + create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^0(%d+)$', :replacement => '+49%1', :action => 'set_route_var', :mandatory => true) + end + + def down + CallRoute.where(:table => "prerouting").destroy_all + end +end -- cgit v1.2.3 From a36e8ea2bf092a23530b0ad54504667caa94e788 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 17 Jan 2013 15:43:15 +0100 Subject: set match action in prerouting table --- db/migrate/20130117142600_change_action_prerouting_table.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 db/migrate/20130117142600_change_action_prerouting_table.rb (limited to 'db') 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 -- cgit v1.2.3 From b800f7c7ec5aa65f773d1c91c1418ca5edac0f2c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 17 Jan 2013 20:21:13 +0100 Subject: rename_column :call_routes, :table, :routing_table --- db/migrate/20130117191840_change_column_name_in_call_route.rb | 9 +++++++++ db/schema.rb | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20130117191840_change_column_name_in_call_route.rb (limited to 'db') 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..cad0f59 --- /dev/null +++ b/db/migrate/20130117191840_change_column_name_in_call_route.rb @@ -0,0 +1,9 @@ +class ChangeColumnNameInCallRoute < ActiveRecord::Migration + def up + rename_column :call_routes, :table, :routing_table + end + + def down + rename_column :call_routes, :routing_table, :table + end +end diff --git a/db/schema.rb b/db/schema.rb index 8416305..31fdaf7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130116213312) do +ActiveRecord::Schema.define(:version => 20130117191840) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -177,7 +177,7 @@ ActiveRecord::Schema.define(:version => 20130116213312) do end create_table "call_routes", :force => true do |t| - t.string "table" + t.string "routing_table" t.string "name" t.string "endpoint_type" t.integer "endpoint_id" -- cgit v1.2.3 From 73c9984510d572030329d967e44c6adb00d98613 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 18 Jan 2013 08:11:56 +0100 Subject: Clean up mess which was created by renaming :table to :routing_table. --- db/migrate/20130116133243_create_call_routes.rb | 2 +- db/migrate/20130116203000_set_prerouting_table.rb | 92 +++++++++++----------- ...30117191840_change_column_name_in_call_route.rb | 8 +- 3 files changed, 50 insertions(+), 52 deletions(-) (limited to 'db') diff --git a/db/migrate/20130116133243_create_call_routes.rb b/db/migrate/20130116133243_create_call_routes.rb index c2d3f45..c2feda8 100644 --- a/db/migrate/20130116133243_create_call_routes.rb +++ b/db/migrate/20130116133243_create_call_routes.rb @@ -1,7 +1,7 @@ class CreateCallRoutes < ActiveRecord::Migration def self.up create_table :call_routes do |t| - t.string :table + t.string :routing_table t.string :name t.string :endpoint_type t.integer :endpoint_id diff --git a/db/migrate/20130116203000_set_prerouting_table.rb b/db/migrate/20130116203000_set_prerouting_table.rb index 86137a0..8b0365f 100644 --- a/db/migrate/20130116203000_set_prerouting_table.rb +++ b/db/migrate/20130116203000_set_prerouting_table.rb @@ -1,99 +1,99 @@ class SetPreroutingTable < ActiveRecord::Migration def up - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*0%*$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*0%*$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*$', :replacement => 'f-li', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*0%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*0%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*(%d+)#*$', :replacement => 'f-li-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*0%*(%d+)%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*0%*(%d+)%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*(%d+)%*(%d+)#*$', :replacement => 'f-li-%1-%2', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#0#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#0#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#0#$', :replacement => 'f-lo', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*5%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*5%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*5%*(%d+)#$', :replacement => 'f-acdmtg-0-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*30#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*30#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*30#$', :replacement => 'f-clipon', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#30#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#30#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#30#$', :replacement => 'f-clipoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*31#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*31#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*31#$', :replacement => 'f-cliroff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#31#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#31#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#31#$', :replacement => 'f-cliron', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*31#(%d+)$', :replacement => 'f-dcliroff-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#31#(%d+)$', :replacement => 'f-dcliron-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*43#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*43#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*43#$', :replacement => 'f-cwaon', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#43#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#43#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#43#$', :replacement => 'f-cwaoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#002#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#002#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#002#$', :replacement => 'f-cfoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^##002#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##002#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##002#$', :replacement => 'f-cfdel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*21#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*21#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*21#$', :replacement => 'f-cfu', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*21%*(%d+)#$', :replacement => 'f-cfu-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*21%*(%d+)#$', :replacement => 'f-cfu-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#21#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#21#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#21#$', :replacement => 'f-cfuoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^##21#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##21#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##21#$', :replacement => 'f-cfudel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*61#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*61#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61#$', :replacement => 'f-cfn', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61%*(%d+)#$', :replacement => 'f-cfn-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*61%*(%d+)#$', :replacement => 'f-cfn-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61%*(%d+)%*(%d+)#$', :replacement => 'f-cfn-%1-%2', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*61%*(%d+)%*(%d+)#$', :replacement => 'f-cfn-%1-%2', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#61#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#61#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#61#$', :replacement => 'f-cfnoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^##61#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##61#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##61#$', :replacement => 'f-cfndel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*62#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*62#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*62#$', :replacement => 'f-cfo', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*62%*(%d+)#$', :replacement => 'f-cfo-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*62%*(%d+)#$', :replacement => 'f-cfo-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#62#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#62#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#62#$', :replacement => 'f-cfooff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^##62#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##62#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##62#$', :replacement => 'f-cfodel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*67#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*67#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*67#$', :replacement => 'f-cfb', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*67%*(%d+)#$', :replacement => 'f-cfb-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*67%*(%d+)#$', :replacement => 'f-cfb-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^#67#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#67#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#67#$', :replacement => 'f-cfboff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^##67#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##67#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##67#$', :replacement => 'f-cfbdel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*66#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*66#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*66#$', :replacement => 'f-redial', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*98$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*98$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98$', :replacement => 'f-vmcheck', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*98#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*98#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98#$', :replacement => 'f-vmcheck', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*98%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*98%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98%*(%d+)#$', :replacement => 'f-vmcheck-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*1337%*1%*1#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*1337%*1%*1#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*1337%*1%*1#$', :replacement => 'f-loaon', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'feature code ^%*1337%*1%*0#$', :endpoint_type => 'dialplanfunction').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*1337%*1%*0#$', :endpoint_type => 'dialplanfunction').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*1337%*1%*0#$', :replacement => 'f-loaoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'international prefix', :endpoint_type => 'phonenumber').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'international prefix', :endpoint_type => 'phonenumber').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^00(%d+)$', :replacement => '+%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:table => 'prerouting', :name => 'national prefix', :endpoint_type => 'phonenumber').route_elements. + CallRoute.create(:routing_table => 'prerouting', :name => 'national prefix', :endpoint_type => 'phonenumber').route_elements. create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^0(%d+)$', :replacement => '+49%1', :action => 'set_route_var', :mandatory => true) end def down - CallRoute.where(:table => "prerouting").destroy_all + CallRoute.where(:routing_table => "prerouting").destroy_all 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 index cad0f59..bbc4f28 100644 --- a/db/migrate/20130117191840_change_column_name_in_call_route.rb +++ b/db/migrate/20130117191840_change_column_name_in_call_route.rb @@ -1,9 +1,7 @@ class ChangeColumnNameInCallRoute < ActiveRecord::Migration def up - rename_column :call_routes, :table, :routing_table - end - - def down - rename_column :call_routes, :routing_table, :table + if column_exists?(:call_routes, :table) + rename_column :call_routes, :table, :routing_table + end end end -- cgit v1.2.3 From 86e94e36e52ff7a3dbc7219db5b3bea5a7f56711 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 14:09:38 +0100 Subject: factory_defaults_prerouting --- .../20130121123742_add_default_area_code_to_gemeinschaft_setup.rb | 5 +++++ db/schema.rb | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20130121123742_add_default_area_code_to_gemeinschaft_setup.rb (limited to 'db') 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/schema.rb b/db/schema.rb index 31fdaf7..1d91458 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130117191840) do +ActiveRecord::Schema.define(:version => 20130121123742) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -535,8 +535,9 @@ ActiveRecord::Schema.define(:version => 20130117191840) do t.integer "sip_domain_id" t.integer "country_id" t.integer "language_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "default_area_code" end create_table "gs_cluster_sync_log_entries", :force => true do |t| -- cgit v1.2.3 From b116d8c75368e4e5593d0bd46850ea04eace83a2 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 21 Jan 2013 15:53:29 +0100 Subject: migration removed --- db/migrate/20130116203000_set_prerouting_table.rb | 99 ----------------------- 1 file changed, 99 deletions(-) delete mode 100644 db/migrate/20130116203000_set_prerouting_table.rb (limited to 'db') diff --git a/db/migrate/20130116203000_set_prerouting_table.rb b/db/migrate/20130116203000_set_prerouting_table.rb deleted file mode 100644 index 8b0365f..0000000 --- a/db/migrate/20130116203000_set_prerouting_table.rb +++ /dev/null @@ -1,99 +0,0 @@ -class SetPreroutingTable < ActiveRecord::Migration - def up - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*0%*$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*$', :replacement => 'f-li', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*0%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*(%d+)#*$', :replacement => 'f-li-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*0%*(%d+)%*(%d+)#*$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*0%*(%d+)%*(%d+)#*$', :replacement => 'f-li-%1-%2', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#0#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#0#$', :replacement => 'f-lo', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*5%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*5%*(%d+)#$', :replacement => 'f-acdmtg-0-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*30#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*30#$', :replacement => 'f-clipon', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#30#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#30#$', :replacement => 'f-clipoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*31#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*31#$', :replacement => 'f-cliroff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#31#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#31#$', :replacement => 'f-cliron', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*31#(%d+)$', :replacement => 'f-dcliroff-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#31#(%d+)$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#31#(%d+)$', :replacement => 'f-dcliron-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*43#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*43#$', :replacement => 'f-cwaon', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#43#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#43#$', :replacement => 'f-cwaoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#002#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#002#$', :replacement => 'f-cfoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##002#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##002#$', :replacement => 'f-cfdel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*21#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*21#$', :replacement => 'f-cfu', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*21%*(%d+)#$', :replacement => 'f-cfu-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*21%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*21%*(%d+)#$', :replacement => 'f-cfu-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#21#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#21#$', :replacement => 'f-cfuoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##21#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##21#$', :replacement => 'f-cfudel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*61#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61#$', :replacement => 'f-cfn', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61%*(%d+)#$', :replacement => 'f-cfn-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*61%*(%d+)#$', :replacement => 'f-cfn-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*61%*(%d+)%*(%d+)#$', :replacement => 'f-cfn-%1-%2', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*61%*(%d+)%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*61%*(%d+)%*(%d+)#$', :replacement => 'f-cfn-%1-%2', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#61#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#61#$', :replacement => 'f-cfnoff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##61#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##61#$', :replacement => 'f-cfndel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*62#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*62#$', :replacement => 'f-cfo', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*62%*(%d+)#$', :replacement => 'f-cfo-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*62%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*62%*(%d+)#$', :replacement => 'f-cfo-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#62#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#62#$', :replacement => 'f-cfooff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##62#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##62#$', :replacement => 'f-cfodel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*67#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*67#$', :replacement => 'f-cfb', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*67%*(%d+)#$', :replacement => 'f-cfb-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*%*67%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*%*67%*(%d+)#$', :replacement => 'f-cfb-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^#67#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^#67#$', :replacement => 'f-cfboff', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^##67#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^##67#$', :replacement => 'f-cfbdel', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*66#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*66#$', :replacement => 'f-redial', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*98$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98$', :replacement => 'f-vmcheck', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*98#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98#$', :replacement => 'f-vmcheck', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*98%*(%d+)#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*98%*(%d+)#$', :replacement => 'f-vmcheck-%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*1337%*1%*1#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*1337%*1%*1#$', :replacement => 'f-loaon', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'feature code ^%*1337%*1%*0#$', :endpoint_type => 'dialplanfunction').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^%*1337%*1%*0#$', :replacement => 'f-loaoff', :action => 'set_route_var', :mandatory => true) - - CallRoute.create(:routing_table => 'prerouting', :name => 'international prefix', :endpoint_type => 'phonenumber').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^00(%d+)$', :replacement => '+%1', :action => 'set_route_var', :mandatory => true) - CallRoute.create(:routing_table => 'prerouting', :name => 'national prefix', :endpoint_type => 'phonenumber').route_elements. - create(:var_in => 'destination_number', :var_out => 'destination_number', :pattern => '^0(%d+)$', :replacement => '+49%1', :action => 'set_route_var', :mandatory => true) - end - - def down - CallRoute.where(:routing_table => "prerouting").destroy_all - end -end -- cgit v1.2.3 From 5d15c975b7d4509d786ab7b95ec61ed7ad166b14 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Tue, 22 Jan 2013 12:15:48 +0100 Subject: add GS_BUILDNAME as tooltip in the footer --- .../20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb (limited to 'db') 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 -- cgit v1.2.3 From 343f8028a226e2239207194a13890454c696cd38 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Tue, 22 Jan 2013 13:57:50 +0100 Subject: update db schema version to 20130122121100 --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db') diff --git a/db/schema.rb b/db/schema.rb index 1d91458..649e022 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130121123742) do +ActiveRecord::Schema.define(:version => 20130122121100) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3