wxc_sdk.person_settings.voicemail module

Voicemail API

class wxc_sdk.person_settings.voicemail.VoicemailApi(*, session: RestSession, selector: ApiSelector = ApiSelector.person)[source]

Bases: PersonSettingsApiChild

API for person’s call voicemail settings. Also used for virtual lines and workspaces

feature: str | None = 'voicemail'
read(entity_id: str, org_id: str = None) VoicemailSettings[source]

Read Voicemail Settings for an entity

The voicemail feature transfers callers to voicemail based on your settings. You can then retrieve voice messages via Voicemail. Voicemail audio is sent in Waveform Audio File Format, .wav, format.

Optionally, notifications can be sent to a mobile phone via text or email. These notifications will not include the voicemail files.

This API requires a full, user, or read-only administrator auth token with a scope of spark-admin:people_read or a user auth token with spark:people_read scope can be used by a person to read their settings.

Parameters:
  • entity_id (str) – Unique identifier for the entity

  • org_id (str) – Entity is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Returns:

entity’s voicemail settings

Return type:

VoicemailSettings

configure(entity_id: str, settings: VoicemailSettings, org_id: str = None)[source]

Configure Voicemail Settings for an entity

The voicemail feature transfers callers to voicemail based on your settings. You can then retrieve voice messages via Voicemail. Voicemail audio is sent in Waveform Audio File Format, .wav, format.

Optionally, notifications can be sent to a mobile phone via text or email. These notifications will not include the voicemail files.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings. :return:

configure_busy_greeting(entity_id: str, content: BufferedReader | str, upload_as: str = None, org_id: str = None)[source]

Configure Busy Voicemail Greeting for an entity

Your request will need to be a multipart/form-data request rather than JSON, using the audio/wav Content-Type.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • content (Union[BufferedReader, str]) – the file to be uploaded, can be a path to a file or a buffered reader (opened file); if a reader referring to an open file is passed then make sure to open the file as binary b/c otherwise the content length might be calculated wrong

  • upload_as (str) – filename for the content. Only required if content is a reader; has to be a .wav file name.

  • org_id (str) – Entity is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

configure_no_answer_greeting(entity_id: str, content: BufferedReader | str, upload_as: str = None, org_id: str = None)[source]

Configure No Answer Voicemail Greeting for an entity

Configure an entity’s No Answer Voicemail Greeting by uploading a Waveform Audio File Format, .wav, encoded audio file.

Your request will need to be a multipart/form-data request rather than JSON, using the audio/wav Content-Type.

This API requires a full or user administrator auth token with the spark-admin:people_write scope or a user auth token with spark:people_write scope can be used by a person to update their settings.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • content (Union[BufferedReader, str]) – the file to be uploaded, can be a path to a file or a buffered reader (opened file); if a reader referring to an open file is passed then make sure to open the file as binary b/c otherwise the content length might be calculated wrong

  • upload_as (str) – filename for the content. Only required if content is a reader; has to be a .wav file name.

  • org_id (str) – Entity is in this organization. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

modify_passcode(entity_id: str, passcode: str, org_id: str = None)[source]

Modify an entity’s voicemail passcode.

Modifying an entity’s voicemail passcode requires a full administrator, user administrator or location administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • entity_id (str) – Modify voicemail passcode for this entity.

  • passcode (str) – Voicemail access passcode. The minimum length of the passcode is 6 and the maximum length is 30.

  • org_id (str) – Modify voicemail passcode for an entity in this organization.

Return type:

None

reset_pin(entity_id: str, org_id: str = None)[source]

Reset Voicemail PIN

Reset a voicemail PIN for an entity.

The voicemail feature transfers callers to voicemail based on your settings. You can then retrieve voice messages via Voicemail. A voicemail PIN is used to retrieve your voicemail messages.

This API requires a full or user administrator or location administrator auth token with the`spark-admin:people_write` scope.

Parameters:
  • entity_id (str) – Unique identifier for the entity.

  • org_id (str) – ID of the organization in which the person resides. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Return type:

None

base = ''
class wxc_sdk.person_settings.voicemail.VoicemailEnabledWithGreeting(*, enabled: bool, greeting: Greeting | None = None, greetingUploaded: bool | None = None, audioFile: MediaFile | None = None, **extra_data: Any)[source]

Bases: VoicemailEnabled

Voicemail enablement setting with greeting details

greeting: Greeting | None

DEFAULT indicates the default greeting will be played. CUSTOM indicates a custom .wav file will be played.

greeting_uploaded: bool | None

Indicates a custom greeting has been uploaded.

audio_file: MediaFile | None
class wxc_sdk.person_settings.voicemail.UnansweredCalls(*, enabled: bool, greeting: Greeting | None = None, greetingUploaded: bool | None = None, audioFile: MediaFile | None = None, numberOfRings: int | None = None, systemMaxNumberOfRings: int | None = None, **extra_data: Any)[source]

Bases: VoicemailEnabledWithGreeting

Voicemail enablement settungs for unsanswered cals

number_of_rings: int | None

Number of rings before unanswered call will be sent to voicemail.

system_max_number_of_rings: int | None

System-wide maximum number of rings allowed for number_of_rings setting.

class wxc_sdk.person_settings.voicemail.VoicemailSettings(*, enabled: bool | None = None, sendAllCalls: VoicemailEnabled | None = None, sendBusyCalls: VoicemailEnabledWithGreeting | None = None, sendUnansweredCalls: UnansweredCalls | None = None, notifications: VoicemailNotifications | None = None, transferToNumber: VoicemailTransferToNumber | None = None, emailCopyOfMessage: VoicemailCopyOfMessage | None = None, messageStorage: VoicemailMessageStorage | None = None, faxMessage: VoicemailFax | None = None, voiceMessageForwardingEnabled: bool | None = None, **extra_data: Any)[source]

Bases: ApiModel

User’s voicemail settings

enabled: bool | None

Voicemail is enabled or disabled.

send_all_calls: VoicemailEnabled | None

Settings for sending all calls to voicemail.

send_busy_calls: VoicemailEnabledWithGreeting | None

Settings for sending calls to voicemail when the line is busy.

send_unanswered_calls: UnansweredCalls | None

Settings for sending calls to voicemail when call is unanswered

notifications: VoicemailNotifications | None

Settings for notifications when there are any new voicemails.

transfer_to_number: VoicemailTransferToNumber | None

Settings for voicemail caller to transfer to a different number by pressing zero (0).

email_copy_of_message: VoicemailCopyOfMessage | None

Settings for sending a copy of new voicemail message audio via email.

message_storage: VoicemailMessageStorage | None

Settings for message storage

fax_message: VoicemailFax | None

Fax message settings

voice_message_forwarding_enabled: bool | None
static default() VoicemailSettings[source]

Default voicemail settings

Returns:

defauilt settings

Return type:

VoicemailSettings