API Docs for: 2.6
Show:

plugin_rest_cel Class

Module: plugins_rest
Parent Module: com_history_rest

REST plugin that provides switchboard history functions through the following REST API:

GET requests

  1. cel/calltrace/:linkedid
  2. cel/callinfo/:uniqueid

cel/calltrace/:linkedid

Returns a call trace of the given linkedid. If an error occurs an HTTP 500 response is returned.

Example JSON response:

[
    {
       eventtype: "CHAN_START"
       eventtime: "2014-01-20T11:51:14.000Z"
       context: "from-internal"
       channame: "SIP/209-0000001a"
       exten: "214"
       accountcode: "209"
       cid: "nome209 209"
    }
]

cel/callinfo/:uniqueid

Returns call information of the given uniqueid If an error occurs an HTTP 500 response is returned.

Example JSON response:

[
    {
       eventtype: "CHAN_START"
       eventtime: "2014-01-20T11:51:14.000Z"
       context: "from-internal"
       channame: "SIP/209-0000001a"
       exten: "214"
       accountcode: "209"
       cid: "nome209 209"
    }
]

Methods

callinfo

(
  • req
  • res
  • next
)

Returns call information of given uniqueid using the following REST api:

callinfo/:linkedid

Parameters:

  • req Object

    The client request

  • res Object

    The client response

  • next Function

    Function to run the next handler in the chain

calltrace

(
  • req
  • res
  • next
)

Returns a call trace of the given linkedid using the following REST api:

calltrace/:linkedid

Parameters:

  • req Object

    The client request

  • res Object

    The client response

  • next Function

    Function to run the next handler in the chain

setCompAuthorization

(
  • ca
)

Set authorization architect component used by history functions.

Parameters:

  • ca Object

    The authorization architect component.

setCompHistory

(
  • ch
)

Set cel architect component used by cel functions.

Parameters:

  • ch Object

    The history architect component.

setCompUtil

(
  • comp
)

Sets the utility architect component.

Parameters:

  • comp Object

    The utility architect component.

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

setPrivacy

(
  • str
)

Sets the string to be used to hide last digits of phone numbers in privacy mode.

Parameters:

  • str Object

    The string used to hide last digits of phone numbers.

Properties

compAuthorization

Object private

The architect component to be used for authorization.

compCel

Object private

The CEL architect component used for CEL functions.

compUtil

Object private

The utility architect component.

get

Array

REST API to be requested using HTTP GET request.

Sub-properties:

  • cel/calltrace/:linkedid String

    To get the call trace associated with the linkedid

  • cel/callinfo/:uniqueid String

    To get call information associated with the unqueid

IDLOG

String private final

The module identifier used by the logger.

Default: [plugins_rest/cel]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

privacyStrReplace

String private

The string used to hide phone numbers in privacy mode.

Default: "xxx"