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)[source]
Bases:
ApiModel
Settings 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 destination_voicemail_enabled 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.
- class wxc_sdk.telephony.huntgroup.BusinessContinuity(*, enabled: bool | None = None, destination: str | None = None, destinationVoicemailEnabled: bool | None = None)[source]
Bases:
ApiModel
Settings for sending calls to a destination of your choice if your phone is not connected to the network for any reason, such as power outage, failed Internet connection, or wiring problem
- enabled: bool | None
Divert calls when unreachable, unanswered calls divert to a defined phone number. This could apply to phone calls that aren’t answered due to a network outage, or all agents of the hunt group are busy and the Advance when the busy option is also enabled. For persons only using a mobile device, calls won’t be diverted, if there is a network outage.
- destination: str | None
Destination for Business Continuity.
- 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, noAnswer: NoAnswer | None = None, businessContinuity: BusinessContinuity | None = None)[source]
Bases:
ApiModel
Policy 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”
- business_continuity: BusinessContinuity | None
Settings for sending calls to a destination of your choice if your phone is not connected to the network for any reason, such as 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, addressAgents: Any | None = None, huntGroupCallerIdForOutgoingCallsEnabled: bool | None = None)[source]
Bases:
HGandCQ
The 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.
- address_agents: Any | None
- 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:
HuntGroup
instance
- class wxc_sdk.telephony.huntgroup.HuntGroupApi(session: RestSession)[source]
Bases:
ApiChild
Hunt Group API
- 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
HuntGroup
instances
- 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
- base = 'telephony/config/huntGroups'
- 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.