Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating to LTS 15.15 #1

Merged
merged 60 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
461ed20
refactor: monad-logger, custom prelude, LTS-8
dzhus Jun 29, 2017
baf7486
fix: Extra type signatures (WIP)
dzhus Jun 30, 2017
9340eb0
chore: LTS-9.0
Aug 11, 2017
c35e543
refactor: Use monad-logger
Aug 12, 2017
018cacc
refactor: fix warnings
Aug 25, 2017
8ffdbe2
refactor: hlint
Aug 29, 2017
0490caa
fix: for Monad Logger and runstdout
Sep 7, 2017
e529aa8
chore: upped lts version to 9.21
unclechu Apr 16, 2018
4650795
refactor: Use classy-prelude more
dzhus Jan 31, 2018
43a2adb
docs: Use private email
dzhus Apr 17, 2018
6c7079e
docs: Wording
dzhus Apr 17, 2018
f0c036c
chore: Enable -Wcompat
dzhus Apr 17, 2018
60a8268
refactor: hlint
dzhus Apr 17, 2018
efc6b5a
refactor: removed redundant explicit extensions
unclechu Apr 17, 2018
9792e0f
chore: added .editorconfig
unclechu Apr 17, 2018
e916eba
docs: updated authors
unclechu Apr 17, 2018
f0f859f
docs: Fix authors
dzhus Apr 17, 2018
4b969e9
refactor: refactored logger in Main.hs
unclechu Apr 16, 2018
2191278
refactor: refactor of DMCC.XML.Response
unclechu Apr 24, 2018
adedf5e
refactor: some light cosmetics
unclechu Apr 24, 2018
d232970
refactor: some refactor
unclechu Apr 24, 2018
2822b6d
fix: fixed imcomplete pattern
unclechu Apr 24, 2018
eeaa9f0
refactor: cleanup of DMCC.Session
unclechu Apr 24, 2018
59d5ad9
refactor: cleanup for DMCC.Agent
unclechu Apr 24, 2018
943ee18
refactor: less liftIO
unclechu Apr 24, 2018
837f871
docs: Fix comment
unclechu Apr 24, 2018
28c1a97
refactor: ghc-options
unclechu Apr 24, 2018
8cbe62a
refactor: LTS-11.6
unclechu Apr 24, 2018
b76520d
fix: for haddock
unclechu Apr 24, 2018
e1f89fd
chore: Build with -Werror on CI
dzhus Apr 28, 2018
1b3a476
docs: Library features (#5)
dzhus Apr 28, 2018
4fd106c
stack lts minor update: 11.6->11.7
unclechu May 7, 2018
2251e25
Merge pull request #7 from f-me/feature/minor-stack-lts-update
unclechu May 7, 2018
42d5bb1
chore: Bump version in preparation for Hackage release
dzhus May 10, 2018
78cb75b
docs: README fixes
dzhus May 10, 2018
068a9e8
chore: --pvp-bounds=upper in stack.yaml
dzhus May 10, 2018
f1b9100
refactor: Remove redundant build-depends and imports
dzhus May 10, 2018
42ce779
chore: Bump Stackage for GHC 8.4.x
dzhus May 10, 2018
5a86c2f
refactor: Use readTVarIO
dzhus Jun 22, 2018
95bf769
chore: Cache more
dzhus Jul 30, 2018
26c4651
chore: Bump Stackage (GHC-8.6)
dzhus May 11, 2018
bac7751
refactor: Remove plain connection support
dzhus Oct 1, 2018
d211f05
docs: Update changelog
dzhus Oct 1, 2018
1545090
refactor: Remove ConnectionType
dzhus Oct 1, 2018
54cb119
chore: Bump version
dzhus Oct 1, 2018
68a6cff
chore: Bump Stackage
dzhus Oct 3, 2018
318c52d
chore: Build for previous GHC too
dzhus Oct 3, 2018
4897c7b
chore: Bump Stackage
dzhus Nov 4, 2018
e26861f
docs: README links
dzhus Nov 4, 2018
3787e84
docs: Changelog
dzhus Nov 4, 2018
3a8bfa7
chore: Bump Stackage (GHC 8.6.2)
dzhus Dec 12, 2018
e40da38
chore: Bump Stackage (GHC 8.6.3)
dzhus Feb 8, 2019
83469a8
chore: CHANGELOG
dzhus Feb 8, 2019
2978a6b
docs: build instructions
dzhus Feb 3, 2020
bd146aa
chore: bump Stackage
dzhus Feb 5, 2020
89af13a
refactor: hlint
dzhus Feb 5, 2020
d9d01ab
fix: do not break with GHC-8.6.x
dzhus Feb 5, 2020
bed90b6
Merge branch 'master' of github.com:f-me/dmcc
jorpic Jun 24, 2020
e0ceb2f
Replace deprecated forkPingThread
jorpic Jun 24, 2020
3d91805
Add .cabal file
jorpic Jun 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*.{hs,hs-boot,yml,yaml,md}]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100

[*.md]
trim_trailing_whitespace = false
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dist
dmcc.cabal
.cabal-sandbox
cabal.sandbox.config
.stack-work
20 changes: 13 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@ sudo: false

language: c

addons:
apt:
packages:
- libgmp-dev
matrix:
include:
- env: FLAGS="" ARGS=""
compiler: ": #stack default"
addons: {apt: {packages: [libgmp-dev]}}
- env: FLAGS="" ARGS="--stack-yaml=stack-previous.yaml"
compiler: ": #stack previous"
addons: {apt: {packages: [libgmp-dev]}}

before_install:
- unset CC
- mkdir -p ~/.local/bin
- mkdir -p $HOME/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- stack $ARGS --no-terminal setup

script:
- curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s .
- stack $ARGS --no-terminal test $FLAGS --haddock
- stack $ARGS --install-ghc --no-terminal build $FLAGS --pedantic --haddock --no-haddock-deps --test --bench

cache:
directories:
- $HOME/.stack
- $HOME/.ghc
- $HOME/.cabal
- .stack-work
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Changelog

## [1.1.0.2] - 2020-02-05

### Changed

- Dependencies bump

## [1.1.0.1] - 2019-02-08

### Changed

- Dependencies bump

## [1.1.0.0] - 2018-11-04

### Changed

- GHC 8.6.x support

### Removed

- Plain unencrypted (non-TLS) connections to AES server are no longer supported

## [1.0.0.1] - 2018-05-10

### Changed

- GHC 8.4.x support

## [1.0.0.0] - 2018-05-10

[1.1.0.2]: https://github.com/f-me/dmcc/compare/1.1.0.1...1.1.0.2
[1.1.0.1]: https://github.com/f-me/dmcc/compare/1.1.0.0...1.1.0.1
[1.1.0.0]: https://github.com/f-me/dmcc/compare/1.0.0.1...1.1.0.0
[1.0.0.1]: https://github.com/f-me/dmcc/compare/1.0.0.0...1.0.0.1
[1.0.0.0]: https://github.com/f-me/dmcc/tree/1.0.0.0
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Copyright (c) 2012, Max Taldykin, Timofey Cherganov
Copyright (c) 2014, 2015, Dmitry Dzhus
Copyright (c) 2014, 2015, 2016, 2017 Dmitry Dzhus
Copyright (c) 2018, Dmitry Dzhus, Viacheslav Lotsmanov

All rights reserved.

Expand Down
140 changes: 91 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,122 @@
# dmcc: AVAYA library for Haskell

[![Travis CI build status](https://travis-ci.org/f-me/dmcc.svg)](https://travis-ci.org/f-me/dmcc)
[![Hackage](https://img.shields.io/hackage/v/dmcc.svg?colorB=5e5184&style=flat)](https://hackage.haskell.org/package/dmcc)
[![Hackage deps](https://img.shields.io/hackage-deps/v/dmcc.svg)](http://packdeps.haskellers.com/feed?needle=dmcc)

This package contains a Haskell library which can 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 to connect using WebSockets and exchange JSON messages
with the server to control AVAYA agents and receive event
notifications and agent state updates.
This package contains a Haskell library which may be used to implement
computer telephony integration using [AVAYA DMCC XML API][dmcc-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. There's no
first-party call control support and no access to media streams.
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)
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.

# Installation-specific notes
## 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.

# Haskell library

Use Haddock to build docs.

# dmcc-ws server
## 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.

The server is invoked as `dmcc-ws dmcc-ws.cfg`. See example
configuration file at `dmcc-ws/example.cfg`.
Run the server as

```
dmcc-ws dmcc-ws.cfg
```

To start controlling an agent with extension XXX, connect to WebSocket
URL `http://host:port/XXX`. The server accepts client commands in
JSON:
See example configuration file at `dmcc-ws/example.cfg`.

{"action":"MakeCall","number":989150603267}
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:

Consult `DMCC.Action` documentation in Haddock docs for DMCC library
```json
{"action":"MakeCall", "number":"989150603267"}
```

Consult [`DMCC.Action`][dmcc-actions] 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"
```json
{
"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](https://www.haskellstack.org/) tool to build the
library and `dmcc-ws`:

```bash
stack install
```

### Developing on macOS

On macOS with `openssl` installed via Homebrew, build with

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

[dmcc-api]: https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/interfaces/dmcc/overview/index.gsp

[ecma-354]: http://www.ecma-international.org/publications/standards/Ecma-354.htm

Client applications may use events to update their interface or
process the whole state every time an event arrives.
[dmcc-actions]: https://hackage.haskell.org/package/dmcc/docs/DMCC-Agent.html#t:Action
Loading