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, playlist: IdAndName | 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

Announcement Audio File details when greeting is selected to be CUSTOM.

playlist: IdAndName | None

Playlist details when greeting is selected to be CUSTOM.

class wxc_sdk.telephony.location.moh.LocationMoHApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

Location Music on Hold 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:

LocationMoHSetting

update(location_id: str, settings: LocationMoHSetting, org_id: str | None = None)[source]

Update Music On Hold

Update the location’s music on hold settings.

Location music on hold settings allows you to play music when a call is placed on hold or parked.

Updating a location’s music on hold settings requires a full administrator or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – Update music on hold settings for this location.

  • settings (LocationMoHSetting) – new settings

  • org_id (str) – Update music on hold settings for this organization.

base = 'telephony/config/locations'