API Docs for:
Show:

Queue Class

Module: astproxy

Abstraction of a queue.

It can throw exception.

Constructor

Queue

(
  • queueNum
)
Object

Parameters:

  • queueNum String

    The queue number

Returns:

Object:

The queue object.

Methods

addMember

(
  • m
)

Adds the queue member to the private members object property. If the queue member already exists, it will be overwritten.

It can throw an Exception.

Parameters:

  • m Object

    A QueueMember object.

addWaitingCaller

(
  • wCaller
)

Adds the queue waiting caller to the private waitingCaller object property. If the waiting caller already exists, it will be overwritten.

It can throw an Exception.

Parameters:

  • wCaller Object

    A QueueWaitingCaller object.

getAbandonedCallsCount

() Number

Return the number of abandoned calls.

Returns:

Number:

The number of abandoned calls.

getAllMembers

() Object

Returns all the members.

Returns:

Object:

All the members.

getAllWaitingCallers

() Object

Returns all the waiting callers.

Returns:

Object:

All the waiting callers.

getAvgHoldTime

() String

Return the average hold time.

Returns:

String:

The average hold time.

getAvgTalkTime

() String

Return the average talk time.

Returns:

String:

The average talk time.

getCompletedCallsCount

() Number

Return the number of completed calls.

Returns:

Number:

The number of completed calls.

getMember

(
  • memberId
)
Object

Returns the specified member.

Parameters:

  • memberId String

    The member identifier

Returns:

Object:

The member.

getName

() String

Return the queue name.

Returns:

String:

The queue name.

getQueue

() String

Return the queue number.

Returns:

String:

The queue number

getWaitingCaller

(
  • id
)
Object

Return a waiting caller.

Parameters:

  • id String

    The waiting caller identifier

Returns:

Object:

A waiting caller or undefined.

getWaitingCounter

() Number

Return the number of waiting calls.

Returns:

Number:

The number of waiting calls.

removeAllWaitingCallers

()

Removes all the waiting callers from the private waitingCallers object property.

It can throw an Exception.

removeMember

(
  • m
)

Removes the queue member from the private members object property.

It can throw an Exception.

Parameters:

  • m String

    The queue member number identifier.

removeWaitingCaller

(
  • channel
)

Removes the waiting caller from the private waitingCallers object property.

It can throw an Exception.

Parameters:

  • channel String

    The channel identifier.

setAbandonedCallsCount

(
  • num
)

Set the number of abandoned calls.

Parameters:

  • num Number

    The number of abandoned calls.

setAvgHoldTime

(
  • time
)

Set the average hold time.

Parameters:

  • time String

    The time in seconds.

setAvgTalkTime

(
  • time
)

Set the average talk time.

Parameters:

  • time String

    The time in seconds.

setName

(
  • qName
)

Set the queue name.

Parameters:

  • qName String

    The queue name

setServiceLevelPercentage

(
  • percentage
)

Sets the service level percentage.

Parameters:

  • percentage String

    The service level percentage.

setServiceLevelTimePeriod

(
  • level
)

Sets the service level time period.

Parameters:

  • level String

    The service level time period.

toJSON

(
  • [privacyStr]
)
Object

Returns the JSON representation of the object.

{
    name:                   "Coda401",
    queue:                  "401",
    members:                { QueueMember.toJSON() } // the keys is the extension numbers
    avgHoldTime:            "37"
    avgTalkTime:            "590",
    waitingCallers:         { QueueWaitingCaller.toJSON() } // the keys is the channel identifier
    abandonedCallsCount:    "26",
    completedCallsCount:    "11"
    serviceLevelTimePeriod: "60"
    serviceLevelPercentage: "100.0"
}

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 queue.

Returns:

String:

The readable description of the extension

updateWaitingTimeOfWaitingCallers

()

Update the waiting time of all waiting callers of all queues.

waitingCallerExists

(
  • id
)
Boolean

Returns true if the waiting caller exists.

Parameters:

  • id String

    The waiting caller identifier

Returns:

Boolean:

True if the waiting caller exists.

Properties

abandonedCallsCount

Number private

The number of abandoned calls.

avgHoldTime

String private

The average hold time.

avgTalkTime

String private

The average talk time.

completedCallsCount

Number private

The number of completed calls.

members

Object private

The members of the queue. The key is the member number and the value is a QueueMember object.

name

String private

The queue name.

queue

String private

The queue number.

serviceLevelPercentage

String private

The service level percentage.

serviceLevelTimePeriod

String private

The service level time period.

waitingCallers

Object private

The waiting callers of the queue. The key is the channel and the value is a QueueWaitingCaller object.