API Docs for: 2.6
Show:

QueueWaitingCaller Class

Module: ast_proxy

Abstraction of a queue waiting caller.

It can throw exception.

Constructor

QueueWaitingCaller

(
  • data
)
Object

Parameters:

  • data Object

    The caller information object

    • callerNum String

      The caller number

    • callerName String

      The caller name

    • position String

      The caller position in the queue

    • wait String

      The timestamp of the elapsed time in wht queue

Returns:

Object:

The queue waiting caller object.

Methods

getChannel

() String

Return the channel.

Returns:

String:

The channel.

getName

() String

Return the caller name.

Returns:

String:

The caller name.

getNumber

() String

Return the caller number.

Returns:

String:

The caller number

getPosition

() String

Return the position in the queue.

Returns:

String:

The position in the queue.

getQueue

() String

Return the queue in which the caller waiting.

Returns:

String:

The queue identifier

getWaiting

() String

Return the waiting timestamp.

Returns:

String:

The timestamp of value of the time waited.

toJSON

(
  • [privacyStr]
)
Object

Returns the JSON representation of the object.

{
    num:         "214",
    name:        "Alessandro",
    queue:       "401",
    channel:     "IAX2/214-2273",
    waiting:     18,              // the waiting time in seconds
    position:    "1",             // the position in the queue
    waitingTime: 1421245942957    // the timestamp of the starting waiting time
}

Parameters:

  • [privacyStr] String optional

    If it's specified, it hides the last digits of the phone number

Returns:

Object:

The JSON representation of the object.

toString

() String

Return the readable string description of the waiting caller.

Returns:

String:

The readable description of the waiting caller

updateWaiting

()

Update the waiting time in seconds.

Properties

channel

String private

The caller channel

name

String private

The caller name.

num

String private

The caller number.

position

Number private

The position in the queue.

queue

String private

The queue in which the caller waiting.

waiting

Number private

The waiting time in seconds.

waitingTime

Number private

The timestamp of the starting waiting time. It's necessary to update waiting time in seconds when necessary.