Webex Calling cloud client for call-queue agent status.

Reads and updates GET/PUT /v1/telephony/config/people/me/settings/queues, asks CXAPI to sync with POST /v1/telephony/calls/sync/invoke, and keeps the local status current from Mercury telephony_agents events.

Example

const callQueue = createCallQueueClient(webex, logger, {
webexApiBaseUrl: 'https://webexapis.com',
});
const status = await callQueue.getCallQueueSettings();

Hierarchy

  • Eventing<CallQueueEventTypes>
    • CallQueueClient

Implements

Constructors

Methods

  • Reads the signed-in agent's ACD state and queue join list. Pass lineOwnerId to read a secondary line. Queue display names are filled from the queue catalog when settings omit them.

    Returns

    The current call queue settings or an error response.

    Example

    const result = await callQueue.getCallQueueSettings();
    

    Parameters

    • Optional lineOwnerId: string

      Optional secondary line owner ID; omit for the primary line.

    Returns Promise<CallQueueResponse>

  • Sets ACD state, queue join, or both. A queue with allowLogOffEnabled: false stays joined.

    Returns

    The updated call queue settings or an error response.

    Example

    await callQueue.updateCallQueueSettings({agentACDState: 'AVAILABLE'});
    

    Parameters

    • request: UpdateCallQueueSettingsRequest

      The agent state and/or queue membership updates.

    • Optional lineOwnerId: string

      Optional secondary line owner ID; omit for the primary line.

    Returns Promise<CallQueueResponse>

  • Asks the calling service to publish the current agent state on Mercury. Sends the registered WDM device URL. The queue list arrives on telephony_agents.sync.

    Returns

    The sync request result or an error response.

    Example

    await callQueue.syncTelephonyCalls();
    

    Returns Promise<CallQueueResponse>

  • Refresh backend readiness before reusing this client without issuing a request.

    Returns

    False if the client is disposed or its registered backend changed.

    Example

    const reusable = callQueue.prepareForReuse();
    

    Returns boolean

  • Unsubscribe this client from queue Mercury events and clear its local state.

    Returns

    Nothing.

    Example

    callQueue.dispose();
    

    Returns void

Events

  • Type Parameters

    • E extends CALL_QUEUE_UPDATED

    Parameters

    • event: E

      Event that is going ot be emitted.

    • Rest ...args: Parameters<CallQueueEventTypes[E]>

      Parameters that are emitted with the event.

    Returns boolean

  • .

    Type Parameters

    • E extends CALL_QUEUE_UPDATED

    Parameters

    • event: E

      Event to listen to.

    • listener: CallQueueEventTypes[E]

      Callback for event.

    Returns CallQueueClient

  • .

    Type Parameters

    • E extends CALL_QUEUE_UPDATED

    Parameters

    • event: E

      Event to remove listener on.

    • listener: CallQueueEventTypes[E]

      Callback for event.

    Returns CallQueueClient