summaryrefslogtreecommitdiff
path: root/app/models/voicemail_setting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/voicemail_setting.rb')
-rw-r--r--app/models/voicemail_setting.rb34
1 files changed, 26 insertions, 8 deletions
diff --git a/app/models/voicemail_setting.rb b/app/models/voicemail_setting.rb
index 4a9fbc9..0f34402 100644
--- a/app/models/voicemail_setting.rb
+++ b/app/models/voicemail_setting.rb
@@ -1,14 +1,32 @@
class VoicemailSetting < ActiveRecord::Base
CLASS_TYPES = ['String', 'Integer', 'Boolean']
VOICEMAIL_SETTINGS = {
- 'password' => { :type => 'String', :characters => /[^0-9]/, :input => :password },
- 'notify' => { :type => 'Boolean', :input => :boolean },
- 'attachment' => { :type => 'Boolean', :input => :boolean },
- 'mark_read' => { :type => 'Boolean', :input => :boolean },
- 'purge' => { :type => 'Boolean', :input => :boolean },
- 'record_length_max' => { :type => 'Integer', :input => :integer },
- 'record_length_min' => { :type => 'Integer', :input => :integer },
- 'records_max' => { :type => 'Integer', :input => :integer },
+ 'pin' => { :type => 'String', :characters => /[^0-9]/, :html => { maxlength: 8 } },
+ 'notify' => { :type => 'Boolean', :input => :boolean },
+ 'attachment' => { :type => 'Boolean', :input => :boolean },
+ 'mark_read' => { :type => 'Boolean', :input => :boolean },
+ 'purge' => { :type => 'Boolean', :input => :boolean },
+ 'record_length_max' => { :type => 'Integer', :input => :integer, :html => { min: 0, max: 100 } },
+ 'record_length_min' => { :type => 'Integer', :input => :integer, :html => { min: 0, max: 100 } },
+ 'records_max' => { :type => 'Integer', :input => :integer, :html => { min: 0, max: 100 } },
+ 'pin_length_max' => { :type => 'Integer', :input => :integer, :html => { min: 1, max: 10 } },
+ 'pin_length_min' => { :type => 'Integer', :input => :integer, :html => { min: 1, max: 8 } },
+ 'pin_timeout' => { :type => 'Integer', :input => :integer, :html => { min: 1, max: 10 } },
+ 'key_new_messages' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_saved_messages' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_config_menu' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_terminator' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_previous' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_next' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_delete' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_save' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'key_main_menu' => { :type => 'String', :characters => /[^0-9]\#\*/, :html => { maxlength: 1 } },
+ 'silence_lenght_abort' => { :type => 'Integer', :input => :integer, :html => { min: 0, max: 100 } },
+ 'silence_level' => { :type => 'Integer', :input => :integer, :html => { min: 0, max: 1000 } },
+ 'record_file_prefix' => { :type => 'String' },
+ 'record_file_suffix' => { :type => 'String' },
+ 'record_file_path' => { :type => 'String' },
+ 'record_repeat' => { :type => 'Integer', :input => :integer, :html => { min: 0, max: 10 } },
}
attr_accessible :voicemail_account_id, :name, :value, :class_type, :description