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

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

Read Voicemail Settings for a Person Retrieve a Person’s Voicemail Settings

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:
  • person_id (str) – Unique identifier for the person.

  • org_id (str) – Person 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:

user’s voicemail settings

Return type:

VoicemailSettings

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

Configure Voicemail Settings for a Person Configure a person’s Voicemail Settings

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(person_id: str, content: BufferedReader | str, upload_as: str | None = None, org_id: str | None = None)[source]

Configure Busy Voicemail Greeting for a Person Configure a Person’s Busy 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:
  • person_id (str) – Unique identifier for the person.

  • 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) – Person 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(person_id: str, content: BufferedReader | str, upload_as: str | None = None, org_id: str | None = None)[source]

Configure No Answer Voicemail Greeting for a Person Configure a Person’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:
  • person_id (str) – Unique identifier for the person.

  • 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) – Person 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(person_id: str, passcode: str, org_id: str | None = None)[source]

Modify a person’s voicemail passcode.

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

Parameters:
  • person_id (str) – Modify voicemail passcode for this person.

  • 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 a person in this organization.

Return type:

None

base = ''
class wxc_sdk.person_settings.voicemail.VoicemailEnabledWithGreeting(*, enabled: bool, greeting: Greeting | None = None, greetingUploaded: bool | None = None)[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.

class wxc_sdk.person_settings.voicemail.UnansweredCalls(*, enabled: bool, greeting: Greeting | None = None, greetingUploaded: bool | None = None, numberOfRings: int | None = None, systemMaxNumberOfRings: int | None = None)[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)[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