20180518000001_issue2029_sipgate_integration_enable.rb 806 B

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