20180518000001_issue2029_sipgate_integration_enable.rb 729 B

123456789101112131415161718192021222324
  1. class Issue2029SipgateIntegrationEnable < ActiveRecord::Migration[5.1]
  2. def change
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. return if Setting.get('sipgate_config').present?
  6. Setting.create_or_update(
  7. title: 'sipgate.io config',
  8. name: 'sipgate_config',
  9. area: 'Integration::Sipgate',
  10. description: 'Defines the sipgate.io config.',
  11. options: {},
  12. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  13. preferences: {
  14. prio: 2,
  15. permission: ['admin.integration'],
  16. },
  17. frontend: false,
  18. )
  19. end
  20. end