wxc_sdk.telephony.location.moh module
MoH API for locations
- class wxc_sdk.telephony.location.moh.LocationMoHGreetingType(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,SafeEnum
Greeting type for the location.
- system = 'SYSTEM'
Play default music when call is placed on hold or parked. The system plays music to fill the silence and lets the customer know they are still connected.
- custom = 'CUSTOM'
Play custom music when call is placed on hold or parked. An audio file must already have been successfully uploaded to specify this option.
- class wxc_sdk.telephony.location.moh.LocationMoHSetting(*, callHoldEnabled: bool | None = None, callParkEnabled: bool | None = None, greeting: LocationMoHGreetingType | None = None, audioFile: AnnAudioFile | None = None)[source]
Bases:
ApiModel
location’s music on hold settings.
- call_hold_enabled: bool | None
If enabled, music will be played when call is placed on hold.
- call_park_enabled: bool | None
If enabled, music will be played when call is parked.
- greeting: LocationMoHGreetingType | None
Greeting type for the location.
- audio_file: AnnAudioFile | None
- class wxc_sdk.telephony.location.moh.LocationMoHApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
Access codes API
- read(location_id: str, org_id: str | None = None) LocationMoHSetting [source]
Get Music On Hold
Retrieve the location’s music on hold settings.
Location’s music on hold settings allows you to play music when a call is placed on hold or parked.
Retrieving location’s music on hold settings requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Retrieve access codes details for this location.
org_id (str) – Retrieve access codes details for a customer location in this organization
- Returns:
MoH settings
- Return type:
- update(location_id: str, settings: LocationMoHSetting, org_id: str | None = None) LocationMoHSetting [source]
Get Music On Hold
Retrieve the location’s music on hold settings.
Location’s music on hold settings allows you to play music when a call is placed on hold or parked.
Retrieving location’s music on hold settings requires a full, user or read-only administrator auth token with a scope of spark-admin:telephony_config_read.
- Parameters:
location_id (str) – Retrieve access codes details for this location.
settings (
LocationMoHSetting
) – new settingsorg_id (str) – Retrieve access codes details for a customer location in this organization
- Returns:
list of
wxc_sdk.common.CallPark
- create(location_id: str, access_codes: list[AuthCode], org_id: str | None = None) list[AuthCode] [source]
- Parameters:
location_id (str) – Add new access code for this location.
access_codes (list of
wxc_sdk.common.AuthCode
) – Access code detailsorg_id (str) – Add new access code for this organization.
- delete_codes(location_id: str, access_codes: list[str | AuthCode], org_id: str | None = None) list[AuthCode] [source]
Delete Access Code Location
Deletes the access code details for a particular location for a customer.
Use Access Codes to bypass the set permissions for all persons/workspaces at this location.
Modifying the access code location details requires a full administrator auth token with a scope of spark-admin:telephony_config_write.
- Parameters:
location_id (str) – Deletes the access code details for this location.
access_codes (list of
wxc_sdk.common.AuthCode
or str) – access codes to deleteorg_id (str) – Delete access codes from this organization.
- base = 'telephony/config/locations'