wxc_sdk.telephony.callqueue package

class wxc_sdk.telephony.callqueue.CallBounce(*, callBounceEnabled: bool | None = None, callBounceMaxRings: int | None = None, agentUnavailableEnabled: bool | None = None, alertAgentEnabled: bool | None = None, alertAgentMaxSeconds: int | None = None, callBounceOnHoldEnabled: bool | None = None, callBounceOnHoldMaxSeconds: int | None = None)[source]

Bases: ApiModel

Settings for when the call into the call queue is not answered.

enabled: bool | None

If enabled, bounce calls after the set number of rings.

max_rings: int | None

Number of rings after which to bounce call, if call bounce is enabled.

agent_unavailable_enabled: bool | None

Bounce if agent becomes unavailable.

alert_agent_enabled: bool | None

Alert agent if call on hold more than alert_agent_max_seconds.

alert_agent_max_seconds: int | None

Number of second after which to alert agent if alertAgentEnabled.

on_hold_enabled: bool | None

Bounce if call on hold more than on_hold_max_seconds

on_hold_max_seconds: int | None

Number of second after which to bounce if on_hold_enabled.

static default() CallBounce[source]
class wxc_sdk.telephony.callqueue.DistinctiveRing(*, enabled: bool, ringPattern: RingPattern | None = None)[source]

Bases: ApiModel

Whether or not the call queue has the distinctive ring option enabled.

enabled: bool

Whether or not the distinctive ring is enabled.

ring_pattern: RingPattern | None

Ring pattern for when this callqueue is called. Only available when distinctiveRing is enabled for the call queue.

static default() DistinctiveRing[source]

Default DistinctiveRing

class wxc_sdk.telephony.callqueue.CallQueueCallPolicies(*, routingType: CQRoutingType | None = None, policy: Policy | None = None, callBounce: CallBounce | None = None, distinctiveRing: DistinctiveRing | None = None)[source]

Bases: ApiModel

Policy controlling how calls are routed to agents.

routing_type: CQRoutingType | None

Call routing type to use to dispatch calls to agents.

policy: Policy | None

Call routing policy to use to dispatch calls to agents.

call_bounce: CallBounce | None

Settings for when the call into the call queue is not answered.

distinctive_ring: DistinctiveRing | None

Whether or not the call queue has the distinctive ring option enabled.

static default() CallQueueCallPolicies[source]

Default CallPolicies

static simple() CallQueueCallPolicies[source]
class wxc_sdk.telephony.callqueue.OverflowAction(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

How to handle new calls when the queue is full.

perform_busy_treatment = 'PERFORM_BUSY_TREATMENT'

The caller hears a fast-busy tone.

transfer_to_phone_number = 'TRANSFER_TO_PHONE_NUMBER'

Enter the number where you want to transfer overflow calls.

play_ringing_until_caller_hangs_up = 'PLAY_RINGING_UNTIL_CALLER_HANGS_UP'

The caller hears ringing until they disconnect.

class wxc_sdk.telephony.callqueue.OverflowSetting(*, action: OverflowAction | None = None, sendToVoicemail: bool | None = None, transferNumber: str | None = None, isTransferNumberSet: bool | None = None, overflowAfterWaitEnabled: bool | None = None, overflowAfterWaitTime: int | None = None, playOverflowGreetingEnabled: bool | None = None, greeting: Greeting | None = None, audioAnnouncementFiles: list[AnnAudioFile] | None = None)[source]

Bases: ApiModel

Settings for incoming calls exceed queueSize.

action: OverflowAction | None

How to handle new calls when the queue is full.

send_to_voicemail: bool | None

When true, forward all calls to a voicemail service of an internal number. This option is ignored when an external transfer_number is entered.

transfer_number: str | None

Destination number for overflow calls when action is set to TRANSFER_TO_PHONE_NUMBER.

is_transfer_number_set: bool | None

transfer number is set

Type:

True

overflow_after_wait_enabled: bool | None

After calls wait for the configured number of seconds and no agent is available, the overflow treatment is triggered.

overflow_after_wait_time: int | None

Number of seconds to wait before the overflow treatment is triggered when no agent is available.

play_overflow_greeting_enabled: bool | None

Indicate overflow audio to be played, otherwise callers will hear the hold music until the call is answered by a user.

greeting: Greeting | None

How to handle new calls when the queue is full.

audio_announcement_files: list[AnnAudioFile] | None

Array of announcement files to be played as overflow greetings. These files are from the list of announcement files associated with this call queue. For CUSTOM announcement, a minimum of 1 file is mandatory, and the maximum is 4.

static default() OverflowSetting[source]
class wxc_sdk.telephony.callqueue.WaitMode(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

An enumeration.

time = 'TIME'

Announce the waiting time.

position = 'POSITION'

Announce queue position.

class wxc_sdk.telephony.callqueue.WaitMessageSetting(*, enabled: bool | None = None, waitMode: WaitMode | None = None, handlingTime: int | None = None, defaultHandlingTime: int | None = None, queuePosition: int | None = None, highVolumeMessageEnabled: bool | None = None, estimatedWaitingTime: int | None = None, callbackOptionEnabled: bool | None = None, minimumEstimatedCallbackTime: int | None = None, internationalCallbackEnabled: bool | None = None, playUpdatedEstimatedWaitMessage: bool | None = None)[source]

Bases: ApiModel

enabled: bool | None

If enabled play Wait Message.

wait_mode: WaitMode | None

Estimated wait message operating mode. Supported values TIME and POSITION.

handling_time: int | None

The number of minutes for which the estimated wait is played. The minimum time is 10 minutes. The maximum time is 100 minutes.

default_handling_time: int | None

The default number of call handling minutes. The minimum time is 1 minutes, The maximum time is 100 minutes.

queue_position: int | None

The number of the position for which the estimated wait is played. The minimum positions are 10, The maximum positions are 100.

high_volume_message_enabled: bool | None

Play time / Play position High Volume.

estimated_waiting_time: int | None

The number of estimated waiting times in seconds. The minimum time is 10 seconds. The maximum time is 600 seconds.

callback_option_enabled: bool | None

Callback options enabled/disabled. Default value is false.

minimum_estimated_callback_time: int | None

The minimum estimated callback times in minutes. The default value is 30.

international_callback_enabled: bool | None

The international numbers for callback is enabled/disabled. The default value is false.

play_updated_estimated_wait_message: bool | None

Play updated estimated wait message.

static default()[source]
class wxc_sdk.telephony.callqueue.AudioSource(*, enabled: bool = True, greeting: ~wxc_sdk.common.Greeting = <Greeting.default: 'DEFAULT'>, audioAnnouncementFiles: list[~wxc_sdk.common.AnnAudioFile] = None)[source]

Bases: ApiModel

enabled: bool
greeting: Greeting
audio_announcement_files: list[AnnAudioFile]
class wxc_sdk.telephony.callqueue.WelcomeMessageSetting(*, enabled: bool = True, greeting: ~wxc_sdk.common.Greeting = <Greeting.default: 'DEFAULT'>, audioAnnouncementFiles: list[~wxc_sdk.common.AnnAudioFile] = None, alwaysEnabled: bool = False)[source]

Bases: AudioSource

always_enabled: bool
class wxc_sdk.telephony.callqueue.ComfortMessageSetting(*, enabled: bool = True, greeting: ~wxc_sdk.common.Greeting = <Greeting.default: 'DEFAULT'>, audioAnnouncementFiles: list[~wxc_sdk.common.AnnAudioFile] = None, timeBetweenMessages: int = 10)[source]

Bases: AudioSource

time_between_messages: int

The interval in seconds between each repetition of the comfort message played to queued users. The minimum time is 10 seconds.The maximum time is 600 seconds.

static default() ComfortMessageSetting[source]
class wxc_sdk.telephony.callqueue.MohMessageSetting(*, normalSource: AudioSource, alternateSource: AudioSource)[source]

Bases: ApiModel

normal_source: AudioSource
alternate_source: AudioSource
static default() MohMessageSetting[source]
class wxc_sdk.telephony.callqueue.ComfortMessageBypass(*, enabled: bool = True, greeting: ~wxc_sdk.common.Greeting = <Greeting.default: 'DEFAULT'>, audioAnnouncementFiles: list[~wxc_sdk.common.AnnAudioFile] = None, callWaitingAgeThreshold: int = 30, playAnnouncementAfterRinging: bool = False, ringTimeBeforePlayingAnnouncement: int = 10)[source]

Bases: AudioSource

Comfort message bypass settings

call_waiting_age_threshold: int
play_announcement_after_ringing: bool
ring_time_before_playing_announcement: int
class wxc_sdk.telephony.callqueue.QueueSettings(*, queueSize: int, callOfferToneEnabled: bool | None = None, resetCallStatisticsEnabled: bool | None = None, overflow: OverflowSetting | None = None, waitMessage: WaitMessageSetting | None = None, welcomeMessage: WelcomeMessageSetting | None = None, comfortMessage: ComfortMessageSetting | None = None, mohMessage: MohMessageSetting | None = None, comfortMessageBypass: ComfortMessageBypass | None = None, whisperMessage: AudioSource | None = None)[source]

Bases: ApiModel

Overall call queue settings.

queue_size: int
call_offer_tone_enabled: bool | None

Play ringing tone to callers when their call is set to an available agent.

reset_call_statistics_enabled: bool | None

Reset caller statistics upon queue entry.

overflow: OverflowSetting | None

Settings for incoming calls exceed queue_size.

wait_message: WaitMessageSetting | None

Notify the caller with either their estimated wait time or position in the queue. If this option is enabled, it plays after the welcome message and before the comfort message. By default, it is not enabled.

welcome_message: WelcomeMessageSetting | None

Play a message when callers first reach the queue. For example, “Thank you for calling. An agent will be with you shortly.” It can be set as mandatory. If the mandatory option is not selected and a caller reaches the call queue while there is an available agent, the caller will not hear this announcement and is transferred to an agent. The welcome message feature is enabled by default.

comfort_message: ComfortMessageSetting | None

Play a message after the welcome message and before hold music. This is typically a CUSTOM announcement that plays information, such as current promotions or information about products and services.

moh_message: MohMessageSetting | None

Play music after the comforting message in a repetitive loop.

comfort_message_bypass: ComfortMessageBypass | None

Comfort message bypass settings

whisper_message: AudioSource | None

whisper message to identify the queue for incoming calls.

static default(*, queue_size: int) QueueSettings[source]

Simple queue settings

Parameters:

queue_size (int) – queue size

class wxc_sdk.telephony.callqueue.CallQueue(*, name: str | None = None, id: str | None = None, locationName: str | None = None, locationId: str | None = None, phoneNumber: str | None = None, extension: str | None = None, routingPrefix: str | None = None, esn: str | None = None, callingLineIdPolicy: CallingLineIdPolicy | None = None, callingLineIdPhoneNumber: str | None = None, alternateNumberSettings: AlternateNumberSettings | None = None, enabled: bool | None = None, tollFreeNumber: bool | None = None, language: str | None = None, languageCode: str | None = None, firstName: str | None = None, lastName: str | None = None, timeZone: str | None = None, agents: list[Agent] | None = None, callPolicies: CallQueueCallPolicies | None = None, queueSettings: QueueSettings | None = None, allowCallWaitingForAgentsEnabled: bool | None = None, allowAgentJoinEnabled: bool | None = None, phoneNumberForOutgoingCallsEnabled: bool | None = None, department: IdAndName | None = None)[source]

Bases: HGandCQ

Call queue details

call_policies: CallQueueCallPolicies | None

Policy controlling how calls are routed to agents.

queue_settings: QueueSettings | None

Overall call queue settings.

allow_call_waiting_for_agents_enabled: bool | None

whether ot not call waiting for agents is enabled

allow_agent_join_enabled: bool | None

Whether or not to allow agents to join or unjoin a queue

phone_number_for_outgoing_calls_enabled: bool | None

Allow queue phone number for outgoing calls

department: IdAndName | None

Specifies the department information.

static create(*, name: str, agents: list[Agent], queue_size: int | None = None, enabled: bool | None = None, language_code: str | None = None, first_name: str | None = None, last_name: str | None = None, time_zone: str | None = None, phone_number: str | None = None, extension: str | None = None, department_id: str | None = None, call_policies: CallQueueCallPolicies | None = None, queue_settings: QueueSettings | None = None, allow_call_waiting_for_agents_enabled: bool | None = None, allow_agent_join_enabled: bool | None = None, phone_number_for_outgoing_calls_enabled: bool | None = None) CallQueue[source]

Get an instance which can be uses for a create() call. Allows simplified creation of default queue settings based on queue_size

Parameters:
  • name

  • agents

  • queue_size

  • enabled

  • language_code

  • first_name

  • last_name

  • time_zone

  • phone_number

  • extension

  • department_id

  • call_policies

  • queue_settings

  • allow_call_waiting_for_agents_enabled

  • allow_agent_join_enabled

  • phone_number_for_outgoing_calls_enabled

Returns:

class wxc_sdk.telephony.callqueue.CallQueueApi(session: RestSession)[source]

Bases: object

Call Queue APÍ

forwarding: ForwardingApi
announcement: AnnouncementApi
policy: CQPolicyApi
list(location_id: str | None = None, name: str | None = None, phone_number: str | None = None, department_id: str | None = None, department_name: str | None = None, org_id: str | None = None, **params) Generator[CallQueue, None, None][source]

Read the List of Call Queues List all Call Queues for the organization.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Only return call queues with matching location ID.

  • name (str) – Only return call queues with the matching name.

  • phone_number (str) – Only return call queues with matching primary phone number or extension.

  • department_id (str) – Return only call queues with the matching departmentId.

  • department_name (str) – Return only call queues with the matching departmentName.

  • org_id (str) – List call queues for this organization

  • params (dict) – dict of additional parameters passed directly to endpoint

Returns:

yields CallQueue objects

by_name(name: str, location_id: str | None = None, org_id: str | None = None) CallQueue | None[source]

Get queue info by name

Parameters:
  • location_id

  • name

  • org_id

Returns:

create(location_id: str, settings: CallQueue, org_id: str | None = None) str[source]

Create a Call Queue Create new Call Queues for the given location.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Creating a call queue requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Create the call queue for this location.

  • settings (CallQueue) – parameters for queue creation.

  • org_id (str) – Create the call queue for this organization.

Returns:

queue id

Return type:

str

Example

settings = CallQueue(name=new_name,
                     extension=extension,
                     call_policies=CallQueueCallPolicies.default(),
                     queue_settings=QueueSettings.default(queue_size=10),
                     agents=[Agent(agent_id=user.person_id) for user in members])

# create new queue
queue_id = api.telephony.callqueue.create(location_id=target_location.location_id,
                                          settings=settings)
delete_queue(location_id: str, queue_id: str, org_id: str | None = None)[source]

Delete a Call Queue Delete the designated Call Queue.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Deleting a call queue requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Location from which to delete a call queue.

  • queue_id (str) – Delete the call queue with the matching ID.

  • org_id (str) – Delete the call queue from this organization.

details(location_id: str, queue_id: str, org_id: str | None = None) CallQueue[source]

Get Details for a Call Queue Retrieve Call Queue details.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned anvinternal extension, which can be dialed internally to reach users assigned to the call queue.

Retrieving call queue details requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.

Parameters:
  • location_id (str) – Retrieve settings for a call queue in this location

  • queue_id (str) – Retrieve settings for the call queue with this identifier.

  • org_id (str) – Retrieve call queue settings from this organization.

Returns:

call queue details

Return type:

CallQueue

update(location_id: str, queue_id: str, update: CallQueue, org_id: str | None = None)[source]

Update a Call Queue

Update the designated Call Queue.

Call queues temporarily hold calls in the cloud when all agents, which can be users or agents, assigned to receive calls from the queue are unavailable. Queued calls are routed to an available agent when not on an active call. Each call queue is assigned a Lead Number, which is a telephone number outside callers can dial to reach users assigned to the call queue. Call queues are also assigned an internal extension, which can be dialed internally to reach users assigned to the call queue.

Updating a call queue requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Location in which this call queue exists.

  • queue_id (str) – Update setting for the call queue with the matching ID.

  • update (CallQueue) – updates

  • org_id – Update call queue settings from this organization.

Examples:

api = WebexSimpleApi()

# shortcut
cq = api.telephony.callqueue

# disable a call queue
update = CallQueue(enabled=False)
cq.update(location_id=...,
          queue_id=...,
          update=update)

# set the call routing policy to SIMULTANEOUS
update = CallQueue(call_policies=CallPolicies(policy=Policy.simultaneous))
cq.update(location_id=...,
          queue_id=...,
          update=update)
# don't bounce calls after the set number of rings.
update = CallQueue(
    call_policies=CallPolicies(
        call_bounce=CallBounce(
            enabled=False)))
cq.update(location_id=...,
          queue_id=...,
          update=update)

Alternatively you can also read call queue details, update them in place and then call update().

details = cq.details(location_id=...,
                     queue_id=...)
details.call_policies.call_bounce.agent_unavailable_enabled=False
details.call_policies.call_bounce.on_hold_enabled=False
cq.update(location_id=...,
          queue_id=...,
          update=details)
class wxc_sdk.telephony.callqueue.CQRoutingType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, SafeEnum

Call routing type to use to dispatch calls to agents.

priority_based = 'PRIORITY_BASED'

Default routing type which directly uses the routing policy to dispatch calls to the agents.

skill_based = 'SKILL_BASED'

This option uses skill level as the criteria to route calls to agents. When there are more than one agent with same skill level, the selected routing policy helps dispatching the calls to the agents.

Submodules