项目作者: f-me

项目描述 :
Haskell bindings for AVAYA DMCC API and WebSockets server for AVAYA
高级语言: Haskell
项目地址: git://github.com/f-me/dmcc.git
创建时间: 2012-03-06T15:02:37Z
项目社区:https://github.com/f-me/dmcc

开源协议:BSD 3-Clause "New" or "Revised" License

下载


dmcc: AVAYA library for Haskell

Github 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

  1. 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:

  1. {"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:

  1. {
  2. "newSnapshot": {
  3. "state": ["Busy", ""],
  4. "calls": {
  5. "179": {
  6. "failed": false,
  7. "held": false,
  8. "ucid": "00001001791428242051",
  9. "interlocutors": [
  10. "989150603267:ADACs8300::0"
  11. ],
  12. "start": "2015-04-05T13:52:52.803Z",
  13. "direction": {
  14. "contents": [],
  15. "dir": "Out"
  16. },
  17. "answered": "2015-04-05T13:53:02.686Z"
  18. }
  19. }
  20. },
  21. "dmccEvent": {
  22. "callId": "179",
  23. "event": "EstablishedEvent"
  24. },
  25. "tag": "TelephonyEvent"
  26. }

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:

  1. stack install

Developing on macOS

On macOS with openssl installed via Homebrew, build with

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