API Docs for: 2.6
Show:

history Class

Module: history

Provides the history call functionalities.

Methods

deleteCallRecording

(
  • id
  • data
  • cb
)

Deletes the specified file of the recorded call. It deletes the file from the filesystem and updates the database entry of the call.

Parameters:

  • id String

    The identifier of the call

  • data Object
    • year String

      The creation year of the file

    • month String

      The creation month of the file

    • day String

      The creation day of the file

    • filename String

      The name of the file

  • cb Function

    The callback function

getCallRecordingContent

(
  • data
  • cb
)

Reads the specified file of the recorded call using base64 encoding and return the content in the callback.

Parameters:

  • data Object
    • year String

      The creation year of the file

    • month String

      The creation month of the file

    • day String

      The creation day of the file

    • filename String

      The name of the file

  • cb Function

    The callback function

getCallRecordingFileData

(
  • id
  • cb
)

Returns the data about call recording audio file.

Parameters:

  • id String

    The call identifier

  • cb Function

    The callback function

getHistoryCallInterval

(
  • data
  • cb
)

Get the history call of the specified extension into the interval time. It can be possible to filter the results.

Parameters:

  • data Object
    • endpoint String

      The endpoint involved in the research, e.g. the extension identifier

    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • recording Boolean

      True if the data about recording audio file must be returned

    • [filter] String optional

      The filter to be used

  • cb Function

    The callback function

getHistorySwitchCallInterval

(
  • data
  • cb
)

Get the switchboard history call of all endpoints into the interval time. It can be possible to filter the results.

Parameters:

  • data Object
    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • recording Boolean

      True if the data about recording audio file must be returned

    • [filter] String optional

      The filter to be used

    • [privacyStr] String optional

      The sequence to be used to hide the numbers to respect the privacy

  • cb Function

    The callback function

isAtLeastExtenInCallRecording

(
  • id
  • extensions
  • cb
)

Checks if at least one of the specified list of extensions is implied in the recorded call.

Parameters:

  • id String

    The call identifier

  • extensions Array

    The list of the extensions to check

  • cb Function

    The callback function

setCompAstProxy

(
  • comp
)

Sets the asterisk proxy architect component.

Parameters:

  • comp Object

    The asterisk proxy architect component.

setDbconn

(
  • dbConnMod
)

Set the module to be used for database functionalities.

Parameters:

  • dbConnMod Object

    The dbconn module.

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.

Properties

compAstProxy

Object private

The asterisk proxy architect component.

dbconn

Object private

The dbconn module.

IDLOG

String private final

The module identifier used by the logger.

Default: [history]

logger

Object private

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

Default: console