API Docs for: 2.6
Show:

exec_script Class

Module: exec_script

Provides the functionalities to execute scripts.

Methods

config

(
  • path
)

Sets the configuration to be use to execute the scripts.

Parameters:

  • path String

    The file path of the JSON configuration file that contains the script paths and timeouts.

evtNewCdr

(
  • data
)

A new call detail records (cdr) has been logged into the call history. It executes an external script and it will kill the child process if it runs longer than timeout interval.

Parameters:

  • data Object
    • source String

      The calling party’s caller ID number

    • channel String

      The calling party’s channel

    • endtime String

      The end time of the call

    • duration String

      The number of seconds between the start and end times for the call

    • amaflags String

      The Automatic Message Accounting (AMA) flag associated with this call. This may be one of the following: OMIT, BILLING, DOCUMENTATION, or Unknown

    • uniqueid String

      The unique ID for the src channel

    • callerid String

      The full caller ID, including the name, of the calling party

    • starttime String

      The start time of the call

    • answertime String

      The answered time of the call

    • destination String

      The destination extension for the call

    • disposition String

      An indication of what happened to the call. This may be NO ANSWER, FAILED, BUSY, ANSWERED, or UNKNOWN

    • lastapplication String

      The last dialplan application that was executed

    • billableseconds String

      The number of seconds between the answer and end times for the call

    • destinationcontext String

      The destination context for the call

    • destinationchannel String

      The called party’s channel

setAstProxy

(
  • comp
)

Set the module to be used for asterisk proxy functionalities.

Parameters:

  • comp Object

    The asterisk proxy module.

setAstProxyListeners

() private

Sets the event listeners for the asterisk proxy 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.

start

()

Start the components.

Properties

compAstProxy

Object private

The asterisk proxy module.

configJSON

Object private

The configuration file content.

IDLOG

String private final

The module identifier used by the logger.

Default: [exec_script]

logger

Object private

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

Default: console