sinch.domains.voice.models.v2.shared package

class sinch.domains.voice.models.v2.shared.Call(
*,
callId: Annotated[str, Strict(strict=True)],
projectId: Annotated[str, Strict(strict=True)],
serviceId: Annotated[str, Strict(strict=True)],
sessionId: Annotated[str, Strict(strict=True)],
callName: Annotated[str, Strict(strict=True)] | None = None,
bridgeName: Annotated[str, Strict(strict=True)] | None = None,
batchId: Annotated[str, Strict(strict=True)] | None = None,
from_: Annotated[Phone | SipFrom, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None = None,
to: Annotated[Phone | Sip | Stream | VoiceRelay, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None = None,
startTime: datetime,
updateTime: datetime | None = None,
callType: Literal['PHONE', 'SIP', 'STREAM', 'VOICE_RELAY'] | Annotated[str, Strict(strict=True)],
direction: Literal['INBOUND', 'OUTBOUND'] | Annotated[str, Strict(strict=True)],
answerTime: datetime | None = None,
endTime: datetime | None = None,
callDurationSeconds: Annotated[int, Strict(strict=True)] | None = None,
callResult: Literal['QUEUED', 'INITIATED', 'IN_PROGRESS', 'COMPLETED', 'REJECTED', 'NO_ANSWER', 'CANCEL', 'BUSY', 'FAILED'] | Annotated[str, Strict(strict=True)],
callReason: Literal['OK', 'NOT_AVAILABLE', 'CALLER_HANGUP', 'CALLEE_HANGUP', 'MANAGER_HANGUP', 'DID_NOT_FOUND', 'INVALID_SCRIPT', 'UNKNOWN_PRODUCT', 'NO_MORE_ROUTES', 'ERROR'] | Annotated[str, Strict(strict=True)] | None = None,
originationType: Literal['PHONE', 'SIP', 'SERVER'] | Annotated[str, Strict(strict=True)],
callRate: Money,
callResourceUrl: Annotated[str, Strict(strict=True)],
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • callId (Annotated[str, Strict(strict=True)])

  • projectId (Annotated[str, Strict(strict=True)])

  • serviceId (Annotated[str, Strict(strict=True)])

  • sessionId (Annotated[str, Strict(strict=True)])

  • callName (Annotated[str, Strict(strict=True)] | None)

  • bridgeName (Annotated[str, Strict(strict=True)] | None)

  • batchId (Annotated[str, Strict(strict=True)] | None)

  • from_ (Annotated[Phone | SipFrom, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None)

  • to (Annotated[Phone | Sip | Stream | VoiceRelay, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None)

  • startTime (datetime)

  • updateTime (datetime | None)

  • callType (Literal['PHONE', 'SIP', 'STREAM', 'VOICE_RELAY'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)])

  • direction (Literal['INBOUND', 'OUTBOUND'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)])

  • answerTime (datetime | None)

  • endTime (datetime | None)

  • callDurationSeconds (Annotated[int, Strict(strict=True)] | None)

  • callResult (Literal['QUEUED', 'INITIATED', 'IN_PROGRESS', 'COMPLETED', 'REJECTED', 'NO_ANSWER', 'CANCEL', 'BUSY', 'FAILED'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)])

  • callReason (Literal['OK', 'NOT_AVAILABLE', 'CALLER_HANGUP', 'CALLEE_HANGUP', 'MANAGER_HANGUP', 'DID_NOT_FOUND', 'INVALID_SCRIPT', 'UNKNOWN_PRODUCT', 'NO_MORE_ROUTES', 'ERROR'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)

  • originationType (Literal['PHONE', 'SIP', 'SERVER'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)])

  • callRate (Money)

  • callResourceUrl (Annotated[str, Strict(strict=True)])

  • extra_data (Any)

call_id: Annotated[str, Strict(strict=True)]
project_id: Annotated[str, Strict(strict=True)]
service_id: Annotated[str, Strict(strict=True)]
session_id: Annotated[str, Strict(strict=True)]
call_name: Annotated[str, Strict(strict=True)] | None
bridge_name: Annotated[str, Strict(strict=True)] | None
batch_id: Annotated[str, Strict(strict=True)] | None
from_: Annotated[Phone | SipFrom, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None
to: Annotated[Phone | Sip | Stream | VoiceRelay, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | None
start_time: datetime
update_time: datetime | None
call_type: Literal['PHONE', 'SIP', 'STREAM', 'VOICE_RELAY'] | Annotated[str, Strict(strict=True)]
direction: Literal['INBOUND', 'OUTBOUND'] | Annotated[str, Strict(strict=True)]
answer_time: datetime | None
end_time: datetime | None
call_duration_seconds: Annotated[int, Strict(strict=True)] | None
call_result: Literal['QUEUED', 'INITIATED', 'IN_PROGRESS', 'COMPLETED', 'REJECTED', 'NO_ANSWER', 'CANCEL', 'BUSY', 'FAILED'] | Annotated[str, Strict(strict=True)]
call_reason: Literal['OK', 'NOT_AVAILABLE', 'CALLER_HANGUP', 'CALLEE_HANGUP', 'MANAGER_HANGUP', 'DID_NOT_FOUND', 'INVALID_SCRIPT', 'UNKNOWN_PRODUCT', 'NO_MORE_ROUTES', 'ERROR'] | Annotated[str, Strict(strict=True)] | None
origination_type: Literal['PHONE', 'SIP', 'SERVER'] | Annotated[str, Strict(strict=True)]
call_rate: Money
call_resource_url: Annotated[str, Strict(strict=True)]
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.CallHeader(
*,
key: Annotated[str, Strict(strict=True)],
value: Annotated[str, Strict(strict=True)] | None = None,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • key (Annotated[str, Strict(strict=True)])

  • value (Annotated[str, Strict(strict=True)] | None)

  • extra_data (Any)

key: Annotated[str, Strict(strict=True)]
value: Annotated[str, Strict(strict=True)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.Money(
*,
currencyCode: Annotated[str, Strict(strict=True)],
amount: Annotated[str, Strict(strict=True)],
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • currencyCode (Annotated[str, Strict(strict=True)])

  • amount (Annotated[str, Strict(strict=True)])

  • extra_data (Any)

currency_code: Annotated[str, Strict(strict=True)]
amount: Annotated[str, Strict(strict=True)]
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

Bases: BaseConfigModel

Parameters:
  • first (Annotated[str, Strict(strict=True)])

  • last (Annotated[str, Strict(strict=True)])

  • next (Annotated[str, Strict(strict=True)] | None)

  • prev (Annotated[str, Strict(strict=True)] | None)

  • self (Annotated[str, Strict(strict=True)])

  • extra_data (Any)

first: Annotated[str, Strict(strict=True)]
last: Annotated[str, Strict(strict=True)]
next: Annotated[str, Strict(strict=True)] | None
prev: Annotated[str, Strict(strict=True)] | None
self_: Annotated[str, Strict(strict=True)]
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.PaginationMeta(
*,
totalCount: Annotated[int, Strict(strict=True)],
pageCount: Annotated[int, Strict(strict=True)],
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • totalCount (Annotated[int, Strict(strict=True)])

  • pageCount (Annotated[int, Strict(strict=True)])

  • extra_data (Any)

total_count: Annotated[int, Strict(strict=True)]
page_count: Annotated[int, Strict(strict=True)]
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.Phone(
*,
type: Literal['PHONE'] = 'PHONE',
phone: PhoneDetails,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • type (Literal['PHONE'])

  • phone (PhoneDetails)

  • extra_data (Any)

type: Literal['PHONE']
phone: PhoneDetails
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.PhoneDetails(
*,
number: Annotated[str, Strict(strict=True)],
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • number (Annotated[str, Strict(strict=True)])

  • extra_data (Any)

number: Annotated[str, Strict(strict=True)]
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.Sip(
*,
type: Literal['SIP'] = 'SIP',
sip: SipDetails,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • type (Literal['SIP'])

  • sip (SipDetails)

  • extra_data (Any)

type: Literal['SIP']
sip: SipDetails
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.SipDetails(
*,
endpoint: Annotated[str, Strict(strict=True)],
transport: Literal['UDP', 'TCP', 'TLS'] | Annotated[str, Strict(strict=True)] | None = None,
callHeaders: Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None = None,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • endpoint (Annotated[str, Strict(strict=True)])

  • transport (Literal['UDP', 'TCP', 'TLS'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)

  • callHeaders (Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None)

  • extra_data (Any)

endpoint: Annotated[str, Strict(strict=True)]
transport: Literal['UDP', 'TCP', 'TLS'] | Annotated[str, Strict(strict=True)] | None
call_headers: Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.SipFrom(
*,
type: Literal['SIP'] = 'SIP',
sip: SipFromDetails,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
type: Literal['SIP']
sip: SipFromDetails
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.SipFromDetails(
*,
endpoint: Annotated[str, Strict(strict=True)],
displayName: Annotated[str, Strict(strict=True)] | None = None,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • endpoint (Annotated[str, Strict(strict=True)])

  • displayName (Annotated[str, Strict(strict=True)] | None)

  • extra_data (Any)

endpoint: Annotated[str, Strict(strict=True)]
display_name: Annotated[str, Strict(strict=True)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.Stream(
*,
type: Literal['STREAM'] = 'STREAM',
stream: StreamDetails,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • type (Literal['STREAM'])

  • stream (StreamDetails)

  • extra_data (Any)

type: Literal['STREAM']
stream: StreamDetails
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.StreamDetails(
*,
endpoint: Annotated[str, Strict(strict=True)],
streamOptions: StreamOptions | None = None,
callHeaders: Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None = None,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • endpoint (Annotated[str, Strict(strict=True)])

  • streamOptions (StreamOptions | None)

  • callHeaders (Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None)

  • extra_data (Any)

endpoint: Annotated[str, Strict(strict=True)]
stream_options: StreamOptions | None
call_headers: Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.StreamOptions(
*,
version: Annotated[int, Strict(strict=True)] | None = None,
codec: Literal['PCM'] | Annotated[str, Strict(strict=True)] | None = None,
sampleRate: Literal[8000, 16000, 24000, 44100, 48000, 96000] | Annotated[int, Strict(strict=True)] | None = None,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • version (Annotated[int, Strict(strict=True)] | None)

  • codec (Literal['PCM'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)] | None)

  • sampleRate (Literal[8000, 16000, 24000, 44100, 48000, 96000] | ~typing.Annotated[int, ~pydantic.types.Strict(strict=True)] | None)

  • extra_data (Any)

version: Annotated[int, Strict(strict=True)] | None
codec: Literal['PCM'] | Annotated[str, Strict(strict=True)] | None
sample_rate: Literal[8000, 16000, 24000, 44100, 48000, 96000] | Annotated[int, Strict(strict=True)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.VoiceRelay(
*,
type: Literal['VOICE_RELAY'] = 'VOICE_RELAY',
voiceRelay: VoiceRelayDetails,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
type: Literal['VOICE_RELAY']
voice_relay: VoiceRelayDetails
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None

class sinch.domains.voice.models.v2.shared.VoiceRelayDetails(
*,
endpoint: Annotated[str, Strict(strict=True)],
enableInterruptions: Annotated[bool, Strict(strict=True)] | None = None,
ttsVoice: Annotated[str, Strict(strict=True)],
sttLanguage: Annotated[str, Strict(strict=True)],
callHeaders: Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None = None,
**extra_data: Any,
)[source]

Bases: BaseConfigModel

Parameters:
  • endpoint (Annotated[str, Strict(strict=True)])

  • enableInterruptions (Annotated[bool, Strict(strict=True)] | None)

  • ttsVoice (Annotated[str, Strict(strict=True)])

  • sttLanguage (Annotated[str, Strict(strict=True)])

  • callHeaders (Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None)

  • extra_data (Any)

endpoint: Annotated[str, Strict(strict=True)]
enable_interruptions: Annotated[bool, Strict(strict=True)] | None
tts_voice: Annotated[str, Strict(strict=True)]
stt_language: Annotated[str, Strict(strict=True)]
call_headers: Annotated[list[CallHeader], Len(min_length=0, max_length=None)] | None
model_config = {'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_post_init(_BaseConfigModel__context: Any) None

Marks applied non-None defaults as set.

Parameters:

_BaseConfigModel__context (Any)

Return type:

None