dmcc-1.0.0.0: 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

data ConnectionType Source #

Constructors

Plain 
TLS 

Fields

startSession Source #

Arguments

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

Host and port of AES server.

-> ConnectionType

Use 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.

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

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