dmcc-1.1.0.2: AVAYA DMCC API bindings and WebSockets server for AVAYA

Safe HaskellNone
LanguageHaskell2010

DMCC

Description

DMCC XML API implementation for third party call control and monitoring.

Synopsis

Documentation

data Session Source #

Library API session.

Instances
Show Session Source # 
Instance details

Defined in DMCC.Session

startSession Source #

Arguments

:: (MonadUnliftIO m, MonadLoggerIO m, MonadBaseControl IO m, MonadCatch m) 
=> (String, PortNumber)

Host and port of AES server.

-> Maybe FilePath

AES CA certificates directory for TLS.

-> Text

DMCC API user.

-> Text

DMCC API password.

-> Maybe String

Web hook URL.

-> SessionOptions 
-> m Session 

stopSession :: (MonadUnliftIO m, MonadLoggerIO m, MonadBaseControl IO m, MonadCatch m) => Session -> m () Source #

TODO Agent releasing notice

controlAgent :: (MonadUnliftIO m, MonadLoggerIO m, MonadBaseControl IO m, MonadMask m) => SwitchName -> Extension -> Session -> m (Either AgentError AgentHandle) Source #

Enable an active agent to be monitored and controlled through DMCC API. If the agent has already been registered, return the old entry (it's safe to call this function with the same arguments multiple times).

releaseAgent :: (MonadUnliftIO m, MonadLoggerIO m, MonadBaseControl IO m, MonadCatch m) => AgentHandle -> m () Source #

Forget about an agent, releasing his device and monitors.

data Action Source #

Actions performable by a controlled agent.

Instances
Show Action Source # 
Instance details

Defined in DMCC.Agent

ToJSON Action Source # 
Instance details

Defined in DMCC.Agent

FromJSON Action Source # 
Instance details

Defined in DMCC.Agent

agentAction :: (MonadLoggerIO m, MonadCatch m) => Action -> AgentHandle -> m () Source #

Command an agent to do something.

Due to lack of global locking of the agents map an agent may be gone (released) by the time an action arrives to its actionChan. This is by design to avoid congestion during action processing.

data AgentEvent Source #

Events/errors are published to external clients of the agents and may be used by agent subscribers to provide information to user.

Constructors

TelephonyEvent

A telephony-related event, along with an updated snapshot.

StateChange

Arrives when an agent state change has been observed.

TelephonyEventError

An error caused by a telephony-related event.

Fields

RequestError

An error caused by a request from this agent.

Fields

data AgentSnapshot Source #

Constructors

AgentSnapshot 

Fields

handleEvents :: (MonadLoggerIO m, MonadThrow m) => AgentHandle -> (AgentEvent -> m ()) -> m ThreadId Source #

Attach an event handler to an agent. Exceptions are not handled.

module DMCC.Types