sinch.domains.voice.api.v2.svaml_apis module

class sinch.domains.voice.api.v2.svaml_apis.Svaml(sinch)[source]

Bases: BaseVoice

describe(commands: ~typing.List[~sinch.domains.voice.models.v2.svaml.types.amd_command_dict.AmdCommandDict | ~sinch.domains.voice.models.v2.svaml.types.dial_command_dict.DialCommandDict | ~sinch.domains.voice.models.v2.svaml.types.messages_command_dict.MessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_messages_command_dict.StopMessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.custom_event_command_dict.CustomEventCommandDict | ~sinch.domains.voice.models.v2.svaml.types.hangup_command_dict.HangupCommandDict | ~sinch.domains.voice.models.v2.svaml.types.answer_command_dict.AnswerCommandDict | ~sinch.domains.voice.models.v2.svaml.types.pause_command_dict.PauseCommandDict | ~sinch.domains.voice.models.v2.svaml.types.start_recording_command_dict.StartRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_recording_command_dict.StopRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.bridge_call_command_dict.BridgeCallCommandDict | ~sinch.domains.voice.models.v2.svaml.types.menu_command_dict.MenuCommandDict | ~sinch.domains.voice.models.v2.svaml.types.goto_menu_command_dict.GotoMenuCommandDict], call_name: str | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>, on_hangup: ~typing.List[~sinch.domains.voice.models.v2.svaml.types.amd_command_dict.AmdCommandDict | ~sinch.domains.voice.models.v2.svaml.types.dial_command_dict.DialCommandDict | ~sinch.domains.voice.models.v2.svaml.types.messages_command_dict.MessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_messages_command_dict.StopMessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.custom_event_command_dict.CustomEventCommandDict | ~sinch.domains.voice.models.v2.svaml.types.hangup_command_dict.HangupCommandDict | ~sinch.domains.voice.models.v2.svaml.types.answer_command_dict.AnswerCommandDict | ~sinch.domains.voice.models.v2.svaml.types.pause_command_dict.PauseCommandDict | ~sinch.domains.voice.models.v2.svaml.types.start_recording_command_dict.StartRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_recording_command_dict.StopRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.bridge_call_command_dict.BridgeCallCommandDict | ~sinch.domains.voice.models.v2.svaml.types.menu_command_dict.MenuCommandDict | ~sinch.domains.voice.models.v2.svaml.types.goto_menu_command_dict.GotoMenuCommandDict] | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>, **kwargs) DescribeSvamlResponse[source]

Describe the call flow from the SVAML payload. This endpoint is useful for understanding the structure and flow of a SVAML payload without executing it. It provides a detailed description of the commands, events, and messages defined in the SVAML.

Parameters:
  • commands (List[SvamlCommandDict]) – (required) The ordered list of SVAML commands to describe.

  • call_name (UnsetOr[Optional[str]]) – (optional) Name of the call.

  • on_hangup (UnsetOr[Optional[List[SvamlCommandDict]]]) – (optional) Commands to describe when the call is hung up.

  • **kwargs

    Additional parameters for the request.

Returns:

A human-readable description of the SVAML call flow.

Return type:

DescribeSvamlResponse

For detailed documentation, visit https://developers.sinch.com/docs/voice-2.0.

validate(commands: ~typing.List[~sinch.domains.voice.models.v2.svaml.types.amd_command_dict.AmdCommandDict | ~sinch.domains.voice.models.v2.svaml.types.dial_command_dict.DialCommandDict | ~sinch.domains.voice.models.v2.svaml.types.messages_command_dict.MessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_messages_command_dict.StopMessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.custom_event_command_dict.CustomEventCommandDict | ~sinch.domains.voice.models.v2.svaml.types.hangup_command_dict.HangupCommandDict | ~sinch.domains.voice.models.v2.svaml.types.answer_command_dict.AnswerCommandDict | ~sinch.domains.voice.models.v2.svaml.types.pause_command_dict.PauseCommandDict | ~sinch.domains.voice.models.v2.svaml.types.start_recording_command_dict.StartRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_recording_command_dict.StopRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.bridge_call_command_dict.BridgeCallCommandDict | ~sinch.domains.voice.models.v2.svaml.types.menu_command_dict.MenuCommandDict | ~sinch.domains.voice.models.v2.svaml.types.goto_menu_command_dict.GotoMenuCommandDict], call_name: str | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>, on_hangup: ~typing.List[~sinch.domains.voice.models.v2.svaml.types.amd_command_dict.AmdCommandDict | ~sinch.domains.voice.models.v2.svaml.types.dial_command_dict.DialCommandDict | ~sinch.domains.voice.models.v2.svaml.types.messages_command_dict.MessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_messages_command_dict.StopMessagesCommandDict | ~sinch.domains.voice.models.v2.svaml.types.custom_event_command_dict.CustomEventCommandDict | ~sinch.domains.voice.models.v2.svaml.types.hangup_command_dict.HangupCommandDict | ~sinch.domains.voice.models.v2.svaml.types.answer_command_dict.AnswerCommandDict | ~sinch.domains.voice.models.v2.svaml.types.pause_command_dict.PauseCommandDict | ~sinch.domains.voice.models.v2.svaml.types.start_recording_command_dict.StartRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.stop_recording_command_dict.StopRecordingCommandDict | ~sinch.domains.voice.models.v2.svaml.types.bridge_call_command_dict.BridgeCallCommandDict | ~sinch.domains.voice.models.v2.svaml.types.menu_command_dict.MenuCommandDict | ~sinch.domains.voice.models.v2.svaml.types.goto_menu_command_dict.GotoMenuCommandDict] | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>, validation_type: ~typing.Literal['NORMAL', 'STRICT'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>, **kwargs) ValidateSvamlResponse[source]

Validate a SVAML payload. This endpoint checks the structure and content of the SVAML commands to ensure they conform to the expected schema and rules. It can operate in different validation modes, such as strict or lenient, depending on the requirements.

Parameters:
  • commands (List[SvamlCommandDict]) – (required) The ordered list of SVAML commands to validate.

  • call_name (UnsetOr[Optional[str]]) – (optional) Name of the call.

  • on_hangup (UnsetOr[Optional[List[SvamlCommandDict]]]) – (optional) Commands to validate when the call is hung up.

  • validation_type (UnsetOr[Optional[ValidationType]]) – (optional) Controls how strictly the SVAML payload is validated. If omitted, the server applies the default value NORMAL.

  • **kwargs

    Additional parameters for the request.

Returns:

The result of the SVAML validation.

Return type:

ValidateSvamlResponse

For detailed documentation, visit https://developers.sinch.com/docs/voice-2.0.