From 3833ac1506fb336cd617ec41d25e35c34e74064e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Mar 2013 15:51:35 +0100 Subject: voicemail refactored --- db/migrate/20130322081621_create_voicemail_accounts.rb | 17 +++++++++++++++++ ...22102533_add_voicemail_account_id_to_sip_accounts.rb | 5 +++++ db/migrate/20130326064557_create_voicemail_settings.rb | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 db/migrate/20130322081621_create_voicemail_accounts.rb create mode 100644 db/migrate/20130322102533_add_voicemail_account_id_to_sip_accounts.rb create mode 100644 db/migrate/20130326064557_create_voicemail_settings.rb (limited to 'db/migrate') diff --git a/db/migrate/20130322081621_create_voicemail_accounts.rb b/db/migrate/20130322081621_create_voicemail_accounts.rb new file mode 100644 index 0000000..8567adb --- /dev/null +++ b/db/migrate/20130322081621_create_voicemail_accounts.rb @@ -0,0 +1,17 @@ +class CreateVoicemailAccounts < ActiveRecord::Migration + def self.up + create_table :voicemail_accounts do |t| + t.string :uuid + t.string :name + t.boolean :active + t.integer :gs_node_id + t.string :voicemail_accountable_type + t.integer :voicemail_accountable_id + t.timestamps + end + end + + def self.down + drop_table :voicemail_accounts + end +end diff --git a/db/migrate/20130322102533_add_voicemail_account_id_to_sip_accounts.rb b/db/migrate/20130322102533_add_voicemail_account_id_to_sip_accounts.rb new file mode 100644 index 0000000..60f5883 --- /dev/null +++ b/db/migrate/20130322102533_add_voicemail_account_id_to_sip_accounts.rb @@ -0,0 +1,5 @@ +class AddVoicemailAccountIdToSipAccounts < ActiveRecord::Migration + def change + add_column :sip_accounts, :voicemail_account_id, :integer + end +end diff --git a/db/migrate/20130326064557_create_voicemail_settings.rb b/db/migrate/20130326064557_create_voicemail_settings.rb new file mode 100644 index 0000000..45b6573 --- /dev/null +++ b/db/migrate/20130326064557_create_voicemail_settings.rb @@ -0,0 +1,16 @@ +class CreateVoicemailSettings < ActiveRecord::Migration + def self.up + create_table :voicemail_settings do |t| + t.integer :voicemail_account_id + t.string :name + t.string :value + t.string :class_type + t.string :description + t.timestamps + end + end + + def self.down + drop_table :voicemail_settings + end +end -- cgit v1.2.3 From 64653a9149eca977c16233abb0a472730b94a464 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Mar 2013 16:55:08 +0100 Subject: Store reload interval in the Switchboard table. --- db/migrate/20130326143653_add_reload_timer_to_switchboard.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/migrate/20130326143653_add_reload_timer_to_switchboard.rb (limited to 'db/migrate') diff --git a/db/migrate/20130326143653_add_reload_timer_to_switchboard.rb b/db/migrate/20130326143653_add_reload_timer_to_switchboard.rb new file mode 100644 index 0000000..8689c5f --- /dev/null +++ b/db/migrate/20130326143653_add_reload_timer_to_switchboard.rb @@ -0,0 +1,7 @@ +class AddReloadTimerToSwitchboard < ActiveRecord::Migration + def change + add_column :switchboards, :reload_interval, :integer + add_column :switchboards, :show_avatars, :boolean + add_column :switchboards, :entry_width, :integer + end +end -- cgit v1.2.3 From cea2cc3c1cc1e48fc4600c698d52dfda2bde4505 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 3 Apr 2013 22:08:19 +0200 Subject: Massive changes to the switchboard. --- db/migrate/20130326143653_add_reload_timer_to_switchboard.rb | 7 ------- db/migrate/20130403200754_add_reload_timer_to_switchboard.rb | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 db/migrate/20130326143653_add_reload_timer_to_switchboard.rb create mode 100644 db/migrate/20130403200754_add_reload_timer_to_switchboard.rb (limited to 'db/migrate') diff --git a/db/migrate/20130326143653_add_reload_timer_to_switchboard.rb b/db/migrate/20130326143653_add_reload_timer_to_switchboard.rb deleted file mode 100644 index 8689c5f..0000000 --- a/db/migrate/20130326143653_add_reload_timer_to_switchboard.rb +++ /dev/null @@ -1,7 +0,0 @@ -class AddReloadTimerToSwitchboard < ActiveRecord::Migration - def change - add_column :switchboards, :reload_interval, :integer - add_column :switchboards, :show_avatars, :boolean - add_column :switchboards, :entry_width, :integer - end -end diff --git a/db/migrate/20130403200754_add_reload_timer_to_switchboard.rb b/db/migrate/20130403200754_add_reload_timer_to_switchboard.rb new file mode 100644 index 0000000..8689c5f --- /dev/null +++ b/db/migrate/20130403200754_add_reload_timer_to_switchboard.rb @@ -0,0 +1,7 @@ +class AddReloadTimerToSwitchboard < ActiveRecord::Migration + def change + add_column :switchboards, :reload_interval, :integer + add_column :switchboards, :show_avatars, :boolean + add_column :switchboards, :entry_width, :integer + end +end -- cgit v1.2.3 From d6a733440eee34dab3daf25089d40aed91018a49 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 4 Apr 2013 12:04:34 +0200 Subject: Limit the amount of displayed phone_numbers in a switchboard_entry --- ..._amount_of_displayed_phone_numbers_to_switchboard.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 db/migrate/20130404094648_add_amount_of_displayed_phone_numbers_to_switchboard.rb (limited to 'db/migrate') diff --git a/db/migrate/20130404094648_add_amount_of_displayed_phone_numbers_to_switchboard.rb b/db/migrate/20130404094648_add_amount_of_displayed_phone_numbers_to_switchboard.rb new file mode 100644 index 0000000..2f88ad4 --- /dev/null +++ b/db/migrate/20130404094648_add_amount_of_displayed_phone_numbers_to_switchboard.rb @@ -0,0 +1,17 @@ +class AddAmountOfDisplayedPhoneNumbersToSwitchboard < ActiveRecord::Migration + def up + add_column :switchboards, :amount_of_displayed_phone_numbers, :integer + + # Set a default for existing entries of + # 1 for amount_of_displayed_phone_numbers + # + Switchboard.all.each do |switchboard| + switchboard.amount_of_displayed_phone_numbers = 1 + switchboard.save + end + end + + def down + remove_column :switchboards, :amount_of_displayed_phone_numbers, :integer + end +end -- cgit v1.2.3 From 8e501cb021c8977b21653d7050e8cde27b5c3546 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Fri, 5 Apr 2013 13:03:53 +0200 Subject: minor corrections to DTAG and o2 --- db/migrate/20120119154952_area_codes_germany.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'db/migrate') diff --git a/db/migrate/20120119154952_area_codes_germany.rb b/db/migrate/20120119154952_area_codes_germany.rb index 6a4ce56..567734f 100644 --- a/db/migrate/20120119154952_area_codes_germany.rb +++ b/db/migrate/20120119154952_area_codes_germany.rb @@ -5214,7 +5214,7 @@ class AreaCodesGermany < ActiveRecord::Migration # Mobilfunknetze # '01511, 01512, 01514, 01515, 0160, 0170, 0171, 0175'.gsub(/[^0-9\,]/,'').split(/,/).each do |area_code| - AreaCode.create(:country => germany, :name => "D1 Mobilfunknetz (Telekom)", :area_code => area_code.gsub(/^0/,'')) + AreaCode.create(:country => germany, :name => "Telekom Mobilfunknetz", :area_code => area_code.gsub(/^0/,'')) end '01520, 01522, 01525, 0162, 0172, 0173, 0174'.gsub(/[^0-9\,]/,'').split(/,/).each do |area_code| @@ -5226,7 +5226,7 @@ class AreaCodesGermany < ActiveRecord::Migration end '0176, 0179, 0159, 01505'.gsub(/[^0-9\,]/,'').split(/,/).each do |area_code| - AreaCode.create(:country => germany, :name => "O2 Mobilfunknetz", :area_code => area_code.gsub(/^0/,'')) + AreaCode.create(:country => germany, :name => "o2 Mobilfunknetz", :area_code => area_code.gsub(/^0/,'')) end # Sondervorwahlen -- cgit v1.2.3 From 78ea4bcd397a4d8f39ad3c08066fe918a8fc89ad Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 11 Apr 2013 10:51:28 +0200 Subject: file uploader --- db/migrate/20130410123523_create_generic_files.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 db/migrate/20130410123523_create_generic_files.rb (limited to 'db/migrate') diff --git a/db/migrate/20130410123523_create_generic_files.rb b/db/migrate/20130410123523_create_generic_files.rb new file mode 100644 index 0000000..a91f341 --- /dev/null +++ b/db/migrate/20130410123523_create_generic_files.rb @@ -0,0 +1,17 @@ +class CreateGenericFiles < ActiveRecord::Migration + def self.up + create_table :generic_files do |t| + t.string :name + t.string :file + t.string :file_type + t.string :category + t.integer :owner_id + t.string :owner_type + t.timestamps + end + end + + def self.down + drop_table :generic_files + end +end -- cgit v1.2.3 From 12dc5e76ea0499f7f3e7ff67a37d77e0e9d35e5e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 12 Apr 2013 11:45:05 +0200 Subject: presence permission added --- .../20130411151900_add_presence_permission_to_groups.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/20130411151900_add_presence_permission_to_groups.rb (limited to 'db/migrate') diff --git a/db/migrate/20130411151900_add_presence_permission_to_groups.rb b/db/migrate/20130411151900_add_presence_permission_to_groups.rb new file mode 100644 index 0000000..277eaee --- /dev/null +++ b/db/migrate/20130411151900_add_presence_permission_to_groups.rb @@ -0,0 +1,11 @@ +class AddInitialGroups < ActiveRecord::Migration + def up + user_sip_accounts = Group.where(:name => 'user_sip_accounts').first + if user_sip_accounts + user_sip_accounts.group_permissions.create(:permission => 'presence', :target_group_id => user_sip_accounts.id) + end + end + + def down + end +end -- cgit v1.2.3 From 10532632e210acd375263eddd185ddf4d40f2ace Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 15 Apr 2013 10:57:34 +0200 Subject: migration name fixed --- db/migrate/20130411151900_add_presence_permission_to_groups.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/migrate') diff --git a/db/migrate/20130411151900_add_presence_permission_to_groups.rb b/db/migrate/20130411151900_add_presence_permission_to_groups.rb index 277eaee..84f021d 100644 --- a/db/migrate/20130411151900_add_presence_permission_to_groups.rb +++ b/db/migrate/20130411151900_add_presence_permission_to_groups.rb @@ -1,4 +1,4 @@ -class AddInitialGroups < ActiveRecord::Migration +class AddPresencePermissionToGroups < ActiveRecord::Migration def up user_sip_accounts = Group.where(:name => 'user_sip_accounts').first if user_sip_accounts -- cgit v1.2.3 From 728e2689e74288ecd44f5f96b255ce3f1fe944d6 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 7 May 2013 12:59:23 +0200 Subject: phones display parameters added --- db/migrate/20130506093400_add_idle_text_gs_parameters.rb | 9 +++++++++ .../20130507095000_add_display_id_unicode_gs_parameters.rb | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 db/migrate/20130506093400_add_idle_text_gs_parameters.rb create mode 100644 db/migrate/20130507095000_add_display_id_unicode_gs_parameters.rb (limited to 'db/migrate') diff --git a/db/migrate/20130506093400_add_idle_text_gs_parameters.rb b/db/migrate/20130506093400_add_idle_text_gs_parameters.rb new file mode 100644 index 0000000..72416d5 --- /dev/null +++ b/db/migrate/20130506093400_add_idle_text_gs_parameters.rb @@ -0,0 +1,9 @@ +class AddIdleTextGsParameters < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'phones', :section => 'snom', :name => 'user_idle_text', :value => '{caller_name}', :class_type => 'String', :description => 'Name shown on the idle screen') + end + + def down + GsParameter.where(:entity => 'phones', :section => 'snom', :name => 'user_idle_text').destroy_all + end +end diff --git a/db/migrate/20130507095000_add_display_id_unicode_gs_parameters.rb b/db/migrate/20130507095000_add_display_id_unicode_gs_parameters.rb new file mode 100644 index 0000000..9b6ec66 --- /dev/null +++ b/db/migrate/20130507095000_add_display_id_unicode_gs_parameters.rb @@ -0,0 +1,9 @@ +class AddDisplayIdUnicodeGsParameters < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'phones', :section => 'siemens', :name => 'display-id-unicode', :value => '{caller_name}', :class_type => 'String', :description => 'Name shown on the idle screen') + end + + def down + GsParameter.where(:entity => 'phones', :section => 'siemens', :name => 'display-id-unicode').destroy_all + end +end -- cgit v1.2.3 From b5c3872e40440d05ac56f6608f3da51d5b8cbed7 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 21 May 2013 09:11:43 +0200 Subject: presence added --- db/migrate/20130224091700_add_initial_groups.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'db/migrate') diff --git a/db/migrate/20130224091700_add_initial_groups.rb b/db/migrate/20130224091700_add_initial_groups.rb index f680fb6..90fbcdb 100644 --- a/db/migrate/20130224091700_add_initial_groups.rb +++ b/db/migrate/20130224091700_add_initial_groups.rb @@ -6,6 +6,7 @@ class AddInitialGroups < ActiveRecord::Migration user_sip_accounts = Group.create(:name => 'user_sip_accounts', :active => true, :comment => 'SIP accounts owned by user accounts') user_sip_accounts.group_permissions.create(:permission => 'pickup', :target_group_id => user_sip_accounts.id) + user_sip_accounts.group_permissions.create(:permission => 'presence', :target_group_id => user_sip_accounts.id) Group.create(:name => 'international_calls', :active => true, :comment => 'International calls permitted') Group.create(:name => 'national_calls', :active => true, :comment => 'National calls permitted') -- cgit v1.2.3 From ffd1deac7e54df6892a1d6393dda1919b571c919 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 24 May 2013 16:44:37 +0200 Subject: switchable flag added --- db/migrate/20130524140600_add_switchable_to_switchboard_entry.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20130524140600_add_switchable_to_switchboard_entry.rb (limited to 'db/migrate') diff --git a/db/migrate/20130524140600_add_switchable_to_switchboard_entry.rb b/db/migrate/20130524140600_add_switchable_to_switchboard_entry.rb new file mode 100644 index 0000000..2e5e46d --- /dev/null +++ b/db/migrate/20130524140600_add_switchable_to_switchboard_entry.rb @@ -0,0 +1,5 @@ +class AddSwitchableToSwitchboardEntry < ActiveRecord::Migration + def change + add_column :switchboard_entries, :switchable, :boolean + end +end -- cgit v1.2.3 From 136651e0795a6e8523af1102e20cbdd76c59d7a1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 31 May 2013 14:33:30 +0200 Subject: geo_ip_country model added --- db/migrate/20130531063549_create_geo_ip_countries.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20130531063549_create_geo_ip_countries.rb (limited to 'db/migrate') diff --git a/db/migrate/20130531063549_create_geo_ip_countries.rb b/db/migrate/20130531063549_create_geo_ip_countries.rb new file mode 100644 index 0000000..9124756 --- /dev/null +++ b/db/migrate/20130531063549_create_geo_ip_countries.rb @@ -0,0 +1,15 @@ +class CreateGeoIpCountries < ActiveRecord::Migration + def change + create_table :geo_ip_countries do |t| + t.string :from, :limit => '15' + t.string :to, :limit => '15' + t.integer :n_from + t.integer :n_to + t.integer :country_id + t.string :country_code, :limit => '2' + t.string :country_name, :limit => '64' + + t.timestamps + end + end +end -- cgit v1.2.3 From cc6b71ffef4d781890cf7eef64ded71abb099a7f Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 31 May 2013 14:38:46 +0200 Subject: report_url added --- db/migrate/20130530123600_add_perimeter_report_url.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130530123600_add_perimeter_report_url.rb (limited to 'db/migrate') diff --git a/db/migrate/20130530123600_add_perimeter_report_url.rb b/db/migrate/20130530123600_add_perimeter_report_url.rb new file mode 100644 index 0000000..4b51b00 --- /dev/null +++ b/db/migrate/20130530123600_add_perimeter_report_url.rb @@ -0,0 +1,9 @@ +class AddPerimeterReportUrl < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'report_url', :value => 'http://fire-support.herokuapp.com/intruders/{received_ip}/report.xml?serial={serial}&blacklisted={blacklisted}&suspicious=true', :class_type => 'String', :description => '') + end + + def down + GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'report_url').destroy_all + end +end -- cgit v1.2.3 From 21995072fb0e57c8209460936c0e5b322a1547c3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 3 Jun 2013 17:09:57 +0200 Subject: PagerGroup stuff --- db/migrate/20130603150455_create_pager_groups.rb | 13 +++++++++++++ .../20130603150603_create_pager_group_destinations.rb | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 db/migrate/20130603150455_create_pager_groups.rb create mode 100644 db/migrate/20130603150603_create_pager_group_destinations.rb (limited to 'db/migrate') diff --git a/db/migrate/20130603150455_create_pager_groups.rb b/db/migrate/20130603150455_create_pager_groups.rb new file mode 100644 index 0000000..c8b2e46 --- /dev/null +++ b/db/migrate/20130603150455_create_pager_groups.rb @@ -0,0 +1,13 @@ +class CreatePagerGroups < ActiveRecord::Migration + def self.up + create_table :pager_groups do |t| + t.integer :sip_account_id + t.string :callback_url + t.timestamps + end + end + + def self.down + drop_table :pager_groups + end +end diff --git a/db/migrate/20130603150603_create_pager_group_destinations.rb b/db/migrate/20130603150603_create_pager_group_destinations.rb new file mode 100644 index 0000000..427dba0 --- /dev/null +++ b/db/migrate/20130603150603_create_pager_group_destinations.rb @@ -0,0 +1,13 @@ +class CreatePagerGroupDestinations < ActiveRecord::Migration + def self.up + create_table :pager_group_destinations do |t| + t.integer :pager_group_id + t.integer :sip_account_id + t.timestamps + end + end + + def self.down + drop_table :pager_group_destinations + end +end -- cgit v1.2.3 From 5a85c623f2526e9ab9c9bfa307370c2f3e302967 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 12 Jun 2013 14:22:44 +0200 Subject: gateway default settings added --- db/migrate/20130612120200_add_gateway_defaults.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20130612120200_add_gateway_defaults.rb (limited to 'db/migrate') diff --git a/db/migrate/20130612120200_add_gateway_defaults.rb b/db/migrate/20130612120200_add_gateway_defaults.rb new file mode 100644 index 0000000..eddba9d --- /dev/null +++ b/db/migrate/20130612120200_add_gateway_defaults.rb @@ -0,0 +1,15 @@ +class AddGatewayDefaults < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'domain', :value => '192.168.1.1', :class_type => 'String') + GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'auth_source', :value => 'sip_received_ip', :class_type => 'String') + GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'auth_pattern', :value => '^192.168.1.1$', :class_type => 'String') + GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'from', :value => '"{caller_id_name}" ', :class_type => 'String') + GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'from_clir', :value => '"Anonymous" ', :class_type => 'String') + GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'asserted_identity', :value => '"{caller_id_name}" ', :class_type => 'String') + GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'asserted_identity_clir', :value => '"Anonymous" ', :class_type => 'String') + end + + def down + GsParameter.where(:entity => 'sip_gateways', :section => 'settings').destroy_all + end +end -- cgit v1.2.3