Fixed issue #2029 - Make sipgate.io integration working by just enable it.

This commit is contained in:
Martin Edenhofer 2018-05-18 08:48:39 +02:00
parent 74597ba566
commit 401923c738
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,24 @@
class Issue2029SipgateIntegrationEnable < ActiveRecord::Migration[5.1]
def change
# return if it's a new setup
return if !Setting.find_by(name: 'system_init_done')
return if Setting.get(name: 'sipgate_config').present?
Setting.create_or_update(
title: 'sipgate.io config',
name: 'sipgate_config',
area: 'Integration::Sipgate',
description: 'Defines the sipgate.io config.',
options: {},
state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
preferences: {
prio: 2,
permission: ['admin.integration'],
},
frontend: false,
)
end
end

View file

@ -3715,7 +3715,7 @@ Setting.create_if_not_exists(
area: 'Integration::Sipgate',
description: 'Defines the sipgate.io config.',
options: {},
state: {},
state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
preferences: {
prio: 2,
permission: ['admin.integration'],