MyNixOS website logo
Description

AVAYA DMCC API bindings and WebSockets server for AVAYA.

Partial implementation of CSTA Phase III XML Protocol (ECMA-323) with AVAYA (DMCC 6.3) extensions.

dmcc: AVAYA library for Haskell

Travis CI build status Hackage Hackage deps

This package contains a Haskell library which may be used to implement computer telephony integration using AVAYA DMCC XML API. A simple server (dmcc-ws) built atop the library is also included. The server allows clients use JSON-over-WebSockets to control AVAYA agents, receive event notifications and agent state updates.

The package uses third-party call control functions of DMCC API. There's no first-party call control support and no access to media streams.

AVAYA DMCC XML API is largely based on ECMA-354 (CSTA Phase III) standard, so in theory the package can be used with other compliant telephony solutions.

Features

  • First-party interface for most of call control functions (making and answering calls, hold, conference call, transfer, barge in, state control).

  • State change events (implemented in the library using polling to compensate for the lack of a native implementation in DMCC 6.x).

  • Webhook support (the library can send HTTP requests in response to agent state change events).

Site-specific notes

One basic TSAPI license is consumed for every agent controlled by the library.

DMCC 6.x is supported. Consult your Avaya AES administration page to check for software versions and available licenses.

dmcc-ws server

The server exposes portions of Haskell library interface via WebSockets using JSON messages for client-server exchange. Its purpose is to provide a clean agent-centric interface to DMCC API suitable for usage from client applications running in a browser.

Run the server as

dmcc-ws dmcc-ws.cfg

See example configuration file at dmcc-ws/example.cfg.

With dmcc-ws running, you may start controlling an agent with extension XXX by connecting to WebSocket URL http://host:port/XXX. The server accepts client commands in JSON:

{"action":"MakeCall", "number":"989150603267"}

Consult DMCC.Action documentation in Haddock docs for DMCC library for supported commands.

The server reports telephony events along with updated agent snapshot:

{
  "newSnapshot": {
    "state": ["Busy", ""],
    "calls": {
      "179": {
        "failed": false,
        "held": false,
        "ucid": "00001001791428242051",
        "interlocutors": [
          "989150603267:ADACs8300::0"
        ],
        "start": "2015-04-05T13:52:52.803Z",
        "direction": {
          "contents": [],
          "dir": "Out"
        },
        "answered": "2015-04-05T13:53:02.686Z"
      }
    }
  },
  "dmccEvent": {
    "callId": "179",
    "event": "EstablishedEvent"
  },
  "tag": "TelephonyEvent"
}

Client applications may use events to update their UI incrementally or re-process the whole state every time an event arrives.

Build

Use Haskell Stack tool to build the library and dmcc-ws:

stack install

Developing on macOS

On macOS with openssl installed via Homebrew, build with

stack build --extra-include-dirs=/usr/local/opt/openssl/include/ --extra-lib-dirs=/usr/local/opt/openssl/lib/
Metadata

Version

1.1.0.2

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows