From b432f1930851c3b583b223d773341f5e208046a7 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 12:47:00 +0100 Subject: Better user experience. One step setup. --- ...130124105613_add_default_company_name_to_gemeinschaft_setup.rb | 6 ++++++ db/schema.rb | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb (limited to 'db') diff --git a/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb new file mode 100644 index 0000000..46b4884 --- /dev/null +++ b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb @@ -0,0 +1,6 @@ +class AddDefaultCompanyNameToGemeinschaftSetup < ActiveRecord::Migration + def change + add_column :gemeinschaft_setups, :default_company_name, :string + add_column :gemeinschaft_setups, :default_system_email, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 649e022..17563b1 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 => 20130122121100) do +ActiveRecord::Schema.define(:version => 20130124105613) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -535,9 +535,11 @@ ActiveRecord::Schema.define(:version => 20130122121100) 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" + t.string "default_company_name" + t.string "default_system_email" end create_table "gs_cluster_sync_log_entries", :force => true do |t| -- cgit v1.2.3 From ea3df5a7eb079982a8fcda3df572a0d1433b7f52 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:49:44 +0100 Subject: Better UI on mobile phones. --- .../20130124123128_add_mobile_max_string_length_parameter.rb | 11 +++++++++++ db/schema.rb | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb (limited to 'db') diff --git a/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb new file mode 100644 index 0000000..6bbac04 --- /dev/null +++ b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb @@ -0,0 +1,11 @@ +class AddMobileMaxStringLengthParameter < ActiveRecord::Migration + def up + GsParameter.create(:name => 'MOBILE_MAX_STRING_LENGTH', :section => 'HTML', :value => '8', :class_type => 'Integer', :description => 'Max length of a string on a mobile devise.') + GsParameter.create(:name => 'DESKTOP_MAX_STRING_LENGTH', :section => 'HTML', :value => '30', :class_type => 'Integer', :description => 'Max length of a string on a desktop devise.') + end + + def down + GsParameter.where(:name => 'MOBILE_MAX_STRING_LENGTH').destroy_all + GsParameter.where(:name => 'DESKTOP_MAX_STRING_LENGTH').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 17563b1..6365e6d 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 => 20130124105613) do +ActiveRecord::Schema.define(:version => 20130124123128) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From e024c99b6ffeb725cf73ebf8b7b55957f36772f5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 14:09:31 +0100 Subject: A new user becomes a member of default UserGroups. --- .../20130124125238_add_default_user_groups_for_new_users.rb | 9 +++++++++ db/schema.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130124125238_add_default_user_groups_for_new_users.rb (limited to 'db') diff --git a/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb new file mode 100644 index 0000000..d2700d6 --- /dev/null +++ b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb @@ -0,0 +1,9 @@ +class AddDefaultUserGroupsForNewUsers < ActiveRecord::Migration + def up + GsParameter.create(:name => 'DEFAULT_USER_GROUPS_IDS', :section => 'New user defaults', :value => "---\n- 3\n", :class_type => 'YAML', :description => 'Default user group ids for a new user.') + end + + def down + GsParameter.where(:name => 'DEFAULT_USER_GROUPS_IDS').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 6365e6d..8258394 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 => 20130124123128) do +ActiveRecord::Schema.define(:version => 20130124125238) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From c09553494684447245238cbc2874ce65d4aaecee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 23:02:40 +0100 Subject: Autohelp config. --- db/migrate/20130124175109_show_admin_auto_online_help.rb | 9 +++++++++ db/schema.rb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130124175109_show_admin_auto_online_help.rb (limited to 'db') diff --git a/db/migrate/20130124175109_show_admin_auto_online_help.rb b/db/migrate/20130124175109_show_admin_auto_online_help.rb new file mode 100644 index 0000000..9c3f733 --- /dev/null +++ b/db/migrate/20130124175109_show_admin_auto_online_help.rb @@ -0,0 +1,9 @@ +class ShowAdminAutoOnlineHelp < ActiveRecord::Migration + def up + GsParameter.create(:name => 'AUTO_ADMIN_ONLINE_HELP', :section => 'Documentation', :value => 'true', :class_type => 'Boolean', :description => 'Gemeinschaft will include tips and help whenever it seems fit.') + end + + def down + GsParameter.where(:name => 'AUTO_ADMIN_ONLINE_HELP').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 8258394..73a1454 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 => 20130124125238) do +ActiveRecord::Schema.define(:version => 20130124175109) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From 8fdb195855ebb27491b48de5b4e0a567a784be50 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 11:56:26 +0100 Subject: added voicemail storage parameter --- db/migrate/20130125103500_add_voicemail_storage_parameter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130125103500_add_voicemail_storage_parameter.rb (limited to 'db') diff --git a/db/migrate/20130125103500_add_voicemail_storage_parameter.rb b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb new file mode 100644 index 0000000..35e56af --- /dev/null +++ b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb @@ -0,0 +1,9 @@ +class AddVoicemailStorageParameter < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir', :value => '/var/lib/freeswitch/voicemail', :class_type => 'String', :description => 'Directory where voicemail messages are stored.') + end + + def down + GsParameter.where(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir').destroy_all + end +end -- cgit v1.2.3 From 076e5b8cc14097efe96932e02fa7ccd7df538495 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 11:56:59 +0100 Subject: added dump_variables parameter --- db/migrate/20130125104000_add_dump_variables_parameter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130125104000_add_dump_variables_parameter.rb (limited to 'db') diff --git a/db/migrate/20130125104000_add_dump_variables_parameter.rb b/db/migrate/20130125104000_add_dump_variables_parameter.rb new file mode 100644 index 0000000..cbd85ef --- /dev/null +++ b/db/migrate/20130125104000_add_dump_variables_parameter.rb @@ -0,0 +1,9 @@ +class AddDumpVariablesParameter < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables', :value => 'false', :class_type => 'Boolean', :description => 'Log dialplan variables.') + end + + def down + GsParameter.where(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables').destroy_all + end +end -- cgit v1.2.3 From 45af07cb093eb0202967cf0d0fc058ca58f0b782 Mon Sep 17 00:00:00 2001 From: spag Date: Sun, 27 Jan 2013 10:17:21 +0100 Subject: added gateway technology --- db/migrate/20130127073800_add_dingaling_parameter.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 db/migrate/20130127073800_add_dingaling_parameter.rb (limited to 'db') diff --git a/db/migrate/20130127073800_add_dingaling_parameter.rb b/db/migrate/20130127073800_add_dingaling_parameter.rb new file mode 100644 index 0000000..ff5bd7c --- /dev/null +++ b/db/migrate/20130127073800_add_dingaling_parameter.rb @@ -0,0 +1,10 @@ +class AddDingalingParameter < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'dingaling', :section => 'parameters', :name => 'debug', :value => '0', :class_type => 'Integer', :description => 'Debug level.') + GsParameter.create(:entity => 'dingaling', :section => 'parameters', :name => 'codec-prefs', :value => 'PCMA,PCMU', :class_type => 'String', :description => 'Codec preferences.') + end + + def down + GsParameter.where(:entity => 'dingaling', :section => 'parameters').destroy_all + end +end -- cgit v1.2.3 From fd95d2c2fcc50418cdb23f34b21bcfe04d9cc1de Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 13:36:27 +0100 Subject: create_sip_registrations migration --- .../20130128121800_create_sip_registrations.rb | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 db/migrate/20130128121800_create_sip_registrations.rb (limited to 'db') diff --git a/db/migrate/20130128121800_create_sip_registrations.rb b/db/migrate/20130128121800_create_sip_registrations.rb new file mode 100644 index 0000000..4157b84 --- /dev/null +++ b/db/migrate/20130128121800_create_sip_registrations.rb @@ -0,0 +1,51 @@ +class CreateSipRegistrations < ActiveRecord::Migration + def self.up + create_table :sip_registrations, :id => false do |t| + t.string :call_id, :limit => '255' + t.string :sip_user, :limit => '255' + t.string :sip_host, :limit => '255' + t.string :presence_hosts, :limit => '255' + t.string :contact, :limit => '1024' + t.string :status, :limit => '255' + t.string :rpid, :limit => '255' + t.integer :expires + t.string :user_agent, :limit => '255' + t.string :server_user, :limit => '255' + t.string :server_host, :limit => '255' + t.string :profile_name, :limit => '255' + t.string :hostname, :limit => '255' + t.string :network_ip, :limit => '255' + t.string :network_port, :limit => '6' + t.string :sip_username, :limit => '255' + t.string :sip_realm, :limit => '255' + t.string :mwi_user, :limit => '255' + t.string :mwi_host, :limit => '255' + t.string :orig_server_host, :limit => '255' + t.string :orig_hostname, :limit => '255' + t.string :sub_host, :limit => '255' + end + + add_index :sip_registrations, [ :call_id ], :name => 'sr_call_id' + add_index :sip_registrations, [ :sip_user ], :name => 'sr_sip_user' + add_index :sip_registrations, [ :sip_host ], :name => 'sr_sip_host' + add_index :sip_registrations, [ :sub_host ], :name => 'sr_sub_host' + add_index :sip_registrations, [ :mwi_user ], :name => 'sr_mwi_user' + add_index :sip_registrations, [ :mwi_host ], :name => 'sr_mwi_host' + add_index :sip_registrations, [ :profile_name ], :name => 'sr_profile_name' + add_index :sip_registrations, [ :presence_hosts ], :name => 'sr_presence_hosts' + add_index :sip_registrations, [ :contact ], :name => 'sr_contact' + add_index :sip_registrations, [ :expires ], :name => 'sr_expires' + add_index :sip_registrations, [ :hostname ], :name => 'sr_hostname' + add_index :sip_registrations, [ :status ], :name => 'sr_status' + add_index :sip_registrations, [ :network_ip ], :name => 'sr_network_ip' + add_index :sip_registrations, [ :network_port ], :name => 'sr_network_port' + add_index :sip_registrations, [ :sip_username ], :name => 'sr_sip_username' + add_index :sip_registrations, [ :sip_realm ], :name => 'sr_sip_realm' + add_index :sip_registrations, [ :orig_server_host ], :name => 'sr_orig_server_host' + add_index :sip_registrations, [ :orig_hostname ], :name => 'sr_orig_hostname' + end + + def self.down + drop_table :sip_registrations + end +end -- cgit v1.2.3 From 600574759573e48da9f5f82d4ff8a863b6830c95 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 28 Jan 2013 13:44:21 +0100 Subject: Checks if the table already exists (could be generated by FreeSWITCH). #144 --- .../20130128121800_create_sip_registrations.rb | 86 +++++++++++----------- db/schema.rb | 46 +++++++++++- 2 files changed, 89 insertions(+), 43 deletions(-) (limited to 'db') diff --git a/db/migrate/20130128121800_create_sip_registrations.rb b/db/migrate/20130128121800_create_sip_registrations.rb index 4157b84..473418e 100644 --- a/db/migrate/20130128121800_create_sip_registrations.rb +++ b/db/migrate/20130128121800_create_sip_registrations.rb @@ -1,48 +1,50 @@ class CreateSipRegistrations < ActiveRecord::Migration def self.up - create_table :sip_registrations, :id => false do |t| - t.string :call_id, :limit => '255' - t.string :sip_user, :limit => '255' - t.string :sip_host, :limit => '255' - t.string :presence_hosts, :limit => '255' - t.string :contact, :limit => '1024' - t.string :status, :limit => '255' - t.string :rpid, :limit => '255' - t.integer :expires - t.string :user_agent, :limit => '255' - t.string :server_user, :limit => '255' - t.string :server_host, :limit => '255' - t.string :profile_name, :limit => '255' - t.string :hostname, :limit => '255' - t.string :network_ip, :limit => '255' - t.string :network_port, :limit => '6' - t.string :sip_username, :limit => '255' - t.string :sip_realm, :limit => '255' - t.string :mwi_user, :limit => '255' - t.string :mwi_host, :limit => '255' - t.string :orig_server_host, :limit => '255' - t.string :orig_hostname, :limit => '255' - t.string :sub_host, :limit => '255' - end + if !(ActiveRecord::Base.connection.table_exists? 'sip_registrations') + create_table :sip_registrations, :id => false do |t| + t.string :call_id, :limit => '255' + t.string :sip_user, :limit => '255' + t.string :sip_host, :limit => '255' + t.string :presence_hosts, :limit => '255' + t.string :contact, :limit => '1024' + t.string :status, :limit => '255' + t.string :rpid, :limit => '255' + t.integer :expires + t.string :user_agent, :limit => '255' + t.string :server_user, :limit => '255' + t.string :server_host, :limit => '255' + t.string :profile_name, :limit => '255' + t.string :hostname, :limit => '255' + t.string :network_ip, :limit => '255' + t.string :network_port, :limit => '6' + t.string :sip_username, :limit => '255' + t.string :sip_realm, :limit => '255' + t.string :mwi_user, :limit => '255' + t.string :mwi_host, :limit => '255' + t.string :orig_server_host, :limit => '255' + t.string :orig_hostname, :limit => '255' + t.string :sub_host, :limit => '255' + end - add_index :sip_registrations, [ :call_id ], :name => 'sr_call_id' - add_index :sip_registrations, [ :sip_user ], :name => 'sr_sip_user' - add_index :sip_registrations, [ :sip_host ], :name => 'sr_sip_host' - add_index :sip_registrations, [ :sub_host ], :name => 'sr_sub_host' - add_index :sip_registrations, [ :mwi_user ], :name => 'sr_mwi_user' - add_index :sip_registrations, [ :mwi_host ], :name => 'sr_mwi_host' - add_index :sip_registrations, [ :profile_name ], :name => 'sr_profile_name' - add_index :sip_registrations, [ :presence_hosts ], :name => 'sr_presence_hosts' - add_index :sip_registrations, [ :contact ], :name => 'sr_contact' - add_index :sip_registrations, [ :expires ], :name => 'sr_expires' - add_index :sip_registrations, [ :hostname ], :name => 'sr_hostname' - add_index :sip_registrations, [ :status ], :name => 'sr_status' - add_index :sip_registrations, [ :network_ip ], :name => 'sr_network_ip' - add_index :sip_registrations, [ :network_port ], :name => 'sr_network_port' - add_index :sip_registrations, [ :sip_username ], :name => 'sr_sip_username' - add_index :sip_registrations, [ :sip_realm ], :name => 'sr_sip_realm' - add_index :sip_registrations, [ :orig_server_host ], :name => 'sr_orig_server_host' - add_index :sip_registrations, [ :orig_hostname ], :name => 'sr_orig_hostname' + add_index :sip_registrations, [ :call_id ], :name => 'sr_call_id' + add_index :sip_registrations, [ :sip_user ], :name => 'sr_sip_user' + add_index :sip_registrations, [ :sip_host ], :name => 'sr_sip_host' + add_index :sip_registrations, [ :sub_host ], :name => 'sr_sub_host' + add_index :sip_registrations, [ :mwi_user ], :name => 'sr_mwi_user' + add_index :sip_registrations, [ :mwi_host ], :name => 'sr_mwi_host' + add_index :sip_registrations, [ :profile_name ], :name => 'sr_profile_name' + add_index :sip_registrations, [ :presence_hosts ], :name => 'sr_presence_hosts' + add_index :sip_registrations, [ :contact ], :name => 'sr_contact' + add_index :sip_registrations, [ :expires ], :name => 'sr_expires' + add_index :sip_registrations, [ :hostname ], :name => 'sr_hostname' + add_index :sip_registrations, [ :status ], :name => 'sr_status' + add_index :sip_registrations, [ :network_ip ], :name => 'sr_network_ip' + add_index :sip_registrations, [ :network_port ], :name => 'sr_network_port' + add_index :sip_registrations, [ :sip_username ], :name => 'sr_sip_username' + add_index :sip_registrations, [ :sip_realm ], :name => 'sr_sip_realm' + add_index :sip_registrations, [ :orig_server_host ], :name => 'sr_orig_server_host' + add_index :sip_registrations, [ :orig_hostname ], :name => 'sr_orig_hostname' + end end def self.down diff --git a/db/schema.rb b/db/schema.rb index 73a1454..7bae5fd 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 => 20130124175109) do +ActiveRecord::Schema.define(:version => 20130128121800) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -876,6 +876,50 @@ ActiveRecord::Schema.define(:version => 20130124175109) do t.datetime "updated_at", :null => false end + create_table "sip_registrations", :id => false, :force => true do |t| + t.string "call_id" + t.string "sip_user" + t.string "sip_host" + t.string "presence_hosts" + t.string "contact", :limit => 1024 + t.string "status" + t.string "rpid" + t.integer "expires" + t.string "user_agent" + t.string "server_user" + t.string "server_host" + t.string "profile_name" + t.string "hostname" + t.string "network_ip" + t.string "network_port", :limit => 6 + t.string "sip_username" + t.string "sip_realm" + t.string "mwi_user" + t.string "mwi_host" + t.string "orig_server_host" + t.string "orig_hostname" + t.string "sub_host" + end + + add_index "sip_registrations", ["call_id"], :name => "sr_call_id" + add_index "sip_registrations", ["contact"], :name => "sr_contact" + add_index "sip_registrations", ["expires"], :name => "sr_expires" + add_index "sip_registrations", ["hostname"], :name => "sr_hostname" + add_index "sip_registrations", ["mwi_host"], :name => "sr_mwi_host" + add_index "sip_registrations", ["mwi_user"], :name => "sr_mwi_user" + add_index "sip_registrations", ["network_ip"], :name => "sr_network_ip" + add_index "sip_registrations", ["network_port"], :name => "sr_network_port" + add_index "sip_registrations", ["orig_hostname"], :name => "sr_orig_hostname" + add_index "sip_registrations", ["orig_server_host"], :name => "sr_orig_server_host" + add_index "sip_registrations", ["presence_hosts"], :name => "sr_presence_hosts" + add_index "sip_registrations", ["profile_name"], :name => "sr_profile_name" + add_index "sip_registrations", ["sip_host"], :name => "sr_sip_host" + add_index "sip_registrations", ["sip_realm"], :name => "sr_sip_realm" + add_index "sip_registrations", ["sip_user"], :name => "sr_sip_user" + add_index "sip_registrations", ["sip_username"], :name => "sr_sip_username" + add_index "sip_registrations", ["status"], :name => "sr_status" + add_index "sip_registrations", ["sub_host"], :name => "sr_sub_host" + create_table "softkey_functions", :force => true do |t| t.string "name" t.datetime "created_at", :null => false -- cgit v1.2.3