2016-04-29 22:21:39 +00:00
|
|
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
|
|
|
class CtiController < ApplicationController
|
2016-08-12 16:39:09 +00:00
|
|
|
before_action { authentication_check(permission: 'cti.agent') }
|
2016-04-29 22:21:39 +00:00
|
|
|
|
|
|
|
# list current caller log
|
|
|
|
def index
|
|
|
|
backends = [
|
|
|
|
{
|
|
|
|
name: 'sipgate.io',
|
|
|
|
enabled: Setting.get('sipgate_integration'),
|
|
|
|
url: '#system/integration/sipgate',
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
result = Cti::Log.log
|
|
|
|
result[:backends] = backends
|
|
|
|
render json: result
|
|
|
|
end
|
|
|
|
|
|
|
|
# set caller log to done
|
|
|
|
def done
|
|
|
|
log = Cti::Log.find(params['id'])
|
|
|
|
log.done = params['done']
|
|
|
|
log.save
|
|
|
|
render json: {}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|