wxc_sdk.telephony.huntgroup module
- class wxc_sdk.telephony.huntgroup.NoAnswer(*, nextAgentEnabled: bool | None = None, nextAgentRings: int | None = None, forwardEnabled: bool | None = None, destination: str | None = None, numberOfRings: int | None = None, systemMaxNumberOfRings: int | None = None, destinationVoicemailEnabled: bool | None = None, **extra_data: Any)[source]
Bases:
ApiModelSettings for when the call into the hunt group is not answered.
- next_agent_enabled: bool | None
If enabled, advance to next agent after the next_agent_rings has occurred.
- next_agent_rings: int | None
Number of rings before call will be forwarded if unanswered and nextAgentEnabled is true.
- forward_enabled: bool | None
If true, forwards unanswered calls to the destination after the number of rings occurs.
- destination: str | None
Destination if forward_enabled is True.
- number_of_rings: int | None
Number of rings before forwarding calls if forward_enabled is true.
- system_max_number_of_rings: int | None
System-wide maximum number of rings allowed for number_of_rings setting.
- destination_voicemail_enabled: bool | None
If forwardEnabled is true, enables and disables sending incoming to destination number’s voicemail if the destination is an internal phone number and that number has the voicemail service enabled. If destinationVoicemailEnabled is enabled, then *55 is added as a prefix for destination.
- class wxc_sdk.telephony.huntgroup.BusinessContinuity(*, enabled: bool | None = None, destination: str | None = None, destinationVoicemailEnabled: bool | None = None, **extra_data: Any)[source]
Bases:
ApiModel- enabled: bool | None
- destination: str | None
Destination
- destination_voicemail_enabled: bool | None
Indicates enabled or disabled state of sending diverted incoming calls to the destination number’s voicemail if the destination is an internal phone number and that number has the voicemail service enabled.
- static default() BusinessContinuity[source]
- class wxc_sdk.telephony.huntgroup.HGCallPolicies(*, policy: Policy | None = None, waitingEnabled: bool | None = None, groupBusyEnabled: bool | None = None, allowMembersToControlGroupBusyEnabled: bool | None = None, noAnswer: NoAnswer | None = None, busyRedirect: BusinessContinuity | None = None, businessContinuityRedirect: BusinessContinuity | None = None, **extra_data: Any)[source]
Bases:
ApiModelPolicy controlling how calls are routed to agents.
- waiting_enabled: bool | None
the hunt group won’t ring agents when they’re on a call and will advance to the next agent. If a hunt group agent has call waiting enabled and the call is advanced to them, then the call will wait until that hunt group agent isn’t busy.
- Type:
If false, then the option is treated as “Advance when busy”
- group_busy_enabled: bool | None
If true, the hunt group busy status will be set to busy. All new calls will get busy treatment. If busyRedirect is enabled, the calls are routed to the destination specified in busyRedirect.
- allow_members_to_control_group_busy_enabled: bool | None
If true, agents can change the hunt group busy status.
- busy_redirect: BusinessContinuity | None
Settings for sending calls to a specified destination when all agents are busy or when the hunt group busy status is set to busy.
- business_continuity_redirect: BusinessContinuity | None
Settings for sending calls to a specified destination if the phone is not connected to the network for any reason, such as a power outage, failed internet connection, or wiring problem.
- static default() HGCallPolicies[source]
- class wxc_sdk.telephony.huntgroup.HuntGroup(*, 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, alternateNumbers: list[AlternateNumber] | None = None, callPolicies: HGCallPolicies | None = None, huntGroupCallerIdForOutgoingCallsEnabled: bool | None = None, **extra_data: Any)[source]
Bases:
HGandCQThe huntgroup object
- alternate_numbers: list[AlternateNumber] | None
The alternate numbers feature allows you to assign multiple phone numbers or extensions to a hunt group. Each number will reach the same greeting and each menu will function identically to the main number. The alternate numbers option enables you to have up to ten (10) phone numbers ring into the hunt group.
- call_policies: HGCallPolicies | None
Policy controlling how calls are routed to agents.
- hunt_group_caller_id_for_outgoing_calls_enabled: bool | None
Whether or not the hunt group can be used as the caller ID when the agent places outgoing calls.
- static create(name: str, extension: str | None = None, phone_number: str | None = None) HuntGroup[source]
Get minimal hunt group settings that can be used to create a hunt group by calling
HuntGroupApi.create()with these settings. The hunt group will not have any agents.- Parameters:
name (str) – Unique name
extension (str) – Extension
phone_number (str) – Primary phone number
- Returns:
HuntGroupinstance
- class wxc_sdk.telephony.huntgroup.HuntGroupApi(session: RestSession)[source]
Bases:
ApiChildHunt Group API
- __init__(session: RestSession)[source]
- forwarding: ForwardingApi
- list(org_id: str | None = None, location_id: str | None = None, name: str | None = None, phone_number: str | None = None, **params) Generator[HuntGroup, None, None][source]
Read the List of Hunt Groups
List all calling Hunt Groups for the organization.
Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.
Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
org_id – List hunt groups for this organization.
location_id – Only return hunt groups with matching location ID.
name – Only return hunt groups with the matching name.
phone_number – Only return hunt groups with the matching primary phone number or extension.
- Returns:
yields
HuntGroupinstances
- by_name(name: str, location_id: str | None = None, org_id: str | None = None) HuntGroup | None[source]
Get hunt group info by name :param location_id: :param name: :param org_id: :return:
- create(location_id: str, settings: HuntGroup, org_id: str | None = None) str[source]
Create a Hunt Group
Create new Hunt Groups for the given location.
Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.
Creating a hunt group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Create the hunt group for the given location.
settings (
HuntGroup) – hunt group detailsorg_id (str) – Create the hunt group for this organization.
- Returns:
ID of the newly created hunt group.
- Return type:
str
- delete_huntgroup(location_id: str, huntgroup_id: str, org_id: str | None = None)[source]
Delete a Hunt Group
Delete the designated Hunt Group.
Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.
Deleting a hunt group 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 hunt group.
huntgroup_id (str) – Delete the hunt group with the matching ID.
org_id (str) – Delete the hunt group with the matching ID.
- details(location_id: str, huntgroup_id: str, org_id: str | None = None) HuntGroup[source]
Get Details for a Hunt Group
Retrieve Hunt Group details.
Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.
Retrieving hunt group 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 hunt group in this location.
huntgroup_id (str) – Retrieve settings for the hunt group with this identifier.
org_id (str) – Retrieve hunt group settings from this organization.
- Returns:
hunt group details
- update(location_id: str, huntgroup_id: str, update: HuntGroup, org_id: str | None = None)[source]
Update a Hunt Group
Update the designated Hunt Group.
Hunt groups can route incoming calls to a group of people or workspaces. You can even configure a pattern to route to a whole group.
Updating a hunt group requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Update the hunt group for this location.
huntgroup_id (str) – Update setting for the hunt group with the matching ID.
update (
HuntGroup) – hunt group settingsorg_id – Update hunt group settings from this organization.
- primary_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Hunt Group Primary Available Phone Numbers
List service and standard numbers that are available to be assigned as the hunt group’s primary phone number. These numbers are associated with the location specified in the request URL, can be active or inactive, and are unassigned.
The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.
Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Return the list of phone numbers for this location within the given organization. The maximum length is 36.
phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances
- alternate_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Hunt Group Alternate Available Phone Numbers
List service and standard numbers that are available to be assigned as the hunt group’s alternate phone number. These numbers are associated with the location specified in the request URL, can be active or inactive, and are unassigned.
The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.
Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Return the list of phone numbers for this location within the given organization. The maximum length is 36.
phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances
- base = 'telephony/config/huntGroups'
- forward_available_phone_numbers(location_id: str, phone_number: List[str] | None = None, owner_name: str | None = None, extension: str | None = None, org_id: str | None = None, **params) Generator[AvailableNumber, None, None][source]
Get Hunt Group Call Forward Available Phone Numbers
List service and standard numbers that are available to be assigned as the hunt group’s call forward number. These numbers are associated with the location specified in the request URL, can be active or inactive, and are assigned to an owning entity.
The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.
Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Return the list of phone numbers for this location within the given organization. The maximum length is 36.
phone_number (list[str]) – Filter phone numbers based on the comma-separated list provided in the phoneNumber array.
owner_name (str) – Return the list of phone numbers that are owned by the given ownerName. Maximum length is 255.
extension (str) – Returns the list of PSTN phone numbers with the given extension.
org_id (str) – List numbers for this organization.
- Returns:
Generator yielding
AvailableNumberinstances