VoiceAgentsTelephonyOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:telephony> attribute.
Constructor
VoiceAgentsTelephonyOperations(*args, **kwargs)
Methods
| cancel_call_job |
Cancel an outbound telephony call job. Cancels future attempts using If-Match; completion may be asynchronous. New cancellation after
connection returns 409 and lets the active call finish. Cancelling a SIP call job requires the
|
| create_binding |
Create an agent telephony binding. Creates a telephony binding for the voice agent named in the path. Creating a SIP binding
requires the |
| create_call_job |
Create an outbound telephony call job. Creates one durable outbound CallJob. Each attempt pins the Agent endpoint's execution version
for validation and its voice session. A call job over a |
| delete_binding |
Delete an agent telephony binding. Deletes a telephony binding owned by the voice agent named in the path. Deleting a SIP binding
requires the |
| delete_call_job |
Delete an outbound telephony call job. Deletes a terminal, reconciled job (otherwise 409), without cancelling calls or removing
Campaign outcomes/call history. Later GET returns 404; repeated DELETE returns 204. Deleting a
SIP call job requires the |
| end_call |
End an active agent telephony call. Ends an active inbound call owned by the voice agent named in the path. Ending a SIP call
requires the |
| get_binding |
Get an agent telephony binding. Retrieves a telephony binding owned by the voice agent named in the path. |
| get_call |
Get an agent telephony call. Retrieves a durable inbound call record owned by the voice agent named in the path. |
| get_call_job |
Get an outbound telephony call job. Retrieves a durable direct or campaign-created outbound call job. |
| get_transfer_targets |
Get agent telephony transfer targets. Returns all transfer targets configured for the voice agent named in the path. |
| list_bindings |
List agent telephony bindings. Returns the telephony bindings owned by the voice agent named in the path. |
| list_call_jobs |
List outbound telephony call jobs. Lists current direct/Campaign jobs, excluding deleted or superseded rounds. Pages are live. Campaign cursors survive boundary deletion/cancel, not replacement/name reuse (400 invalid_cursor). |
| list_calls |
List agent telephony calls. Returns the durable inbound call history for the voice agent named in the path. |
| replace_transfer_targets |
Replace agent telephony transfer targets. Replaces all transfer targets configured for the voice agent named in the path. Configuring a
SIP destination requires the |
| transfer_call |
Transfer an active agent telephony call. Transfers an active inbound call to a configured target for the voice agent named in the path.
Transferring a SIP call requires the |
| update_binding |
Update an agent telephony binding. Updates a telephony binding owned by the voice agent named in the path. Updating a SIP binding
requires the |
cancel_call_job
Cancel an outbound telephony call job.
Cancels future attempts using If-Match; completion may be asynchronous. New cancellation after
connection returns 409 and lets the active call finish. Cancelling a SIP call job requires the
VoiceAgents=V1Preview opt-in.
cancel_call_job(agent_name: str, call_job_id: str, *, etag: str, match_condition: MatchConditions, **kwargs: Any) -> TelephonyCallJob
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the call job. Required. |
|
call_job_id
Required
|
The service-generated identifier of the call job to cancel. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
etag
|
check if resource is changed. Set None to skip checking etag. Required. |
|
match_condition
|
The match condition to use upon the etag. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyCallJob. The TelephonyCallJob is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
create_binding
Create an agent telephony binding.
Creates a telephony binding for the voice agent named in the path. Creating a SIP binding
requires the VoiceAgents=V1Preview opt-in.
create_binding(agent_name: str, binding: _models.TelephonyBinding, *, content_type: str = 'application/json', **kwargs: Any) -> _models.TelephonyBinding
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the binding. Required. |
|
binding
Required
|
The provider-specific binding to create. Is one of the following types: TelephonyBinding, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyBinding. The TelephonyBinding is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
create_call_job
Create an outbound telephony call job.
Creates one durable outbound CallJob. Each attempt pins the Agent endpoint's execution version
for validation and its voice session. A call job over a SipOutbound connection requires the
VoiceAgents=V1Preview opt-in.
create_call_job(agent_name: str, job: _models.TelephonyCallJobCreate, *, idempotency_key: str, content_type: str = 'application/json', **kwargs: Any) -> _models.TelephonyCallJob
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that executes the call. Required. |
|
job
Required
|
The direct outbound call to create. Is one of the following types: TelephonyCallJobCreate, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
idempotency_key
|
Customer retry key. Equivalent requests return the same job; retained keys for deleted jobs return 409 call_job_deleted, never redial. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyCallJob. The TelephonyCallJob is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
delete_binding
Delete an agent telephony binding.
Deletes a telephony binding owned by the voice agent named in the path. Deleting a SIP binding
requires the VoiceAgents=V1Preview opt-in.
delete_binding(agent_name: str, binding_id: str, *, etag: str, match_condition: MatchConditions, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the binding. Required. |
|
binding_id
Required
|
The service-generated binding identifier. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
etag
|
check if resource is changed. Set None to skip checking etag. Required. |
|
match_condition
|
The match condition to use upon the etag. Required. |
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
delete_call_job
Delete an outbound telephony call job.
Deletes a terminal, reconciled job (otherwise 409), without cancelling calls or removing
Campaign outcomes/call history. Later GET returns 404; repeated DELETE returns 204. Deleting a
SIP call job requires the VoiceAgents=V1Preview opt-in.
delete_call_job(agent_name: str, call_job_id: str, **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The owning voice agent. Required. |
|
call_job_id
Required
|
The call-job identifier. Required. |
Returns
| Type | Description |
|---|---|
|
None |
Exceptions
| Type | Description |
|---|---|
end_call
End an active agent telephony call.
Ends an active inbound call owned by the voice agent named in the path. Ending a SIP call
requires the VoiceAgents=V1Preview opt-in.
end_call(agent_name: str, call_id: str, **kwargs: Any) -> TelephonyCallRecord
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the active call. Required. |
|
call_id
Required
|
The service-generated call identifier. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyCallRecord. The TelephonyCallRecord is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_binding
Get an agent telephony binding.
Retrieves a telephony binding owned by the voice agent named in the path.
get_binding(agent_name: str, binding_id: str, **kwargs: Any) -> TelephonyBinding
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the binding. Required. |
|
binding_id
Required
|
The service-generated binding identifier. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyBinding. The TelephonyBinding is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_call
Get an agent telephony call.
Retrieves a durable inbound call record owned by the voice agent named in the path.
get_call(agent_name: str, call_id: str, **kwargs: Any) -> TelephonyCallRecord
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the call record. Required. |
|
call_id
Required
|
The service-generated call identifier. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyCallRecord. The TelephonyCallRecord is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_call_job
Get an outbound telephony call job.
Retrieves a durable direct or campaign-created outbound call job.
get_call_job(agent_name: str, call_job_id: str, **kwargs: Any) -> TelephonyCallJob
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the call job. Required. |
|
call_job_id
Required
|
The service-generated identifier of the call job to retrieve. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyCallJob. The TelephonyCallJob is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get_transfer_targets
Get agent telephony transfer targets.
Returns all transfer targets configured for the voice agent named in the path.
get_transfer_targets(agent_name: str, **kwargs: Any) -> TelephonyTransferTargets
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent whose transfer targets are retrieved. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyTransferTargets. The TelephonyTransferTargets is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list_bindings
List agent telephony bindings.
Returns the telephony bindings owned by the voice agent named in the path.
list_bindings(agent_name: str, *, provider: str | TelephonyProvider | None = None, limit: int | None = None, order: str | PageOrder | None = None, before: str | None = None, **kwargs: Any) -> ItemPaged[TelephonyBindingListItem]
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent whose bindings are listed. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
provider
|
Filters bindings by provider. Known values are: "teams_phone_extensibility", "twilio", and "sip". Default value is None. Default value: None
|
|
limit
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None. Default value: None
|
|
order
|
Sort order by the Default value: None
|
|
before
|
A cursor for use in pagination. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of TelephonyBindingListItem |
Exceptions
| Type | Description |
|---|---|
list_call_jobs
List outbound telephony call jobs.
Lists current direct/Campaign jobs, excluding deleted or superseded rounds. Pages are live. Campaign cursors survive boundary deletion/cancel, not replacement/name reuse (400 invalid_cursor).
list_call_jobs(agent_name: str, *, limit: int | None = None, order: str | PageOrder | None = None, before: str | None = None, status: str | TelephonyCallJobStatus | None = None, campaign_name: str | None = None, **kwargs: Any) -> ItemPaged[TelephonyCallJob]
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The owning voice agent. Authorization is applied before pagination. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
limit
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None. Default value: None
|
|
order
|
Sort order by the Default value: None
|
|
before
|
A cursor for use in pagination. Default value: None
|
|
status
|
Optional lifecycle filter. Known values are: "accepted", "waiting_for_schedule", "queued", "dispatching", "in_progress", "waiting_for_retry", "cancellation_requested", "completed", "blocked", "expired", "failed", and "cancelled". Default value is None. Default value: None
|
|
campaign_name
|
Current Campaign round: 404 if absent, empty while deleting. Omit for direct and Campaign jobs. Replacement/name reuse invalidates cursors. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of TelephonyCallJob |
Exceptions
| Type | Description |
|---|---|
list_calls
List agent telephony calls.
Returns the durable inbound call history for the voice agent named in the path.
list_calls(agent_name: str, *, provider: str | TelephonyProvider | None = None, status: str | TelephonyCallStatus | None = None, started_after_time: datetime | None = None, started_before_time: datetime | None = None, limit: int | None = None, order: str | PageOrder | None = None, before: str | None = None, **kwargs: Any) -> ItemPaged[TelephonyCallSummary]
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent whose calls are listed. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
provider
|
Filters calls by provider. Known values are: "teams_phone_extensibility", "twilio", and "sip". Default value is None. Default value: None
|
|
status
|
Filters calls by lifecycle status. Known values are: "in_progress", "success", and "failed". Default value is None. Default value: None
|
|
started_after_time
|
Includes calls that started at or after this Unix timestamp in seconds. Default value is None. Default value: None
|
|
started_before_time
|
Includes calls that started at or before this Unix timestamp in seconds. Default value is None. Default value: None
|
|
limit
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None. Default value: None
|
|
order
|
Sort order by the Default value: None
|
|
before
|
A cursor for use in pagination. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of TelephonyCallSummary |
Exceptions
| Type | Description |
|---|---|
replace_transfer_targets
Replace agent telephony transfer targets.
Replaces all transfer targets configured for the voice agent named in the path. Configuring a
SIP destination requires the VoiceAgents=V1Preview opt-in.
replace_transfer_targets(agent_name: str, *, transfer_targets: List[_models.TelephonyTransferTarget], etag: str, match_condition: MatchConditions, content_type: str = 'application/json', **kwargs: Any) -> _models.TelephonyTransferTargets
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent whose transfer targets are replaced. Required. |
|
body
|
Is either a JSON type or a IO[bytes] type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
transfer_targets
|
The complete set of destinations to which the voice agent may transfer calls. An empty array clears all targets when replacing the configuration. Required. Default value: <object object at 0x0000029F297D0430>
|
|
etag
|
check if resource is changed. Set None to skip checking etag. Required. |
|
match_condition
|
The match condition to use upon the etag. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyTransferTargets. The TelephonyTransferTargets is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
transfer_call
Transfer an active agent telephony call.
Transfers an active inbound call to a configured target for the voice agent named in the path.
Transferring a SIP call requires the VoiceAgents=V1Preview opt-in.
transfer_call(agent_name: str, call_id: str, *, target: str, content_type: str = 'application/json', **kwargs: Any) -> _models.TelephonyCallRecord
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the active call. Required. |
|
call_id
Required
|
The service-generated call identifier. Required. |
|
body
|
Is either a JSON type or a IO[bytes] type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
target
|
The name of a transfer target configured for the voice agent. Required. Default value: <object object at 0x0000029F297D0430>
|
Returns
| Type | Description |
|---|---|
|
TelephonyCallRecord. The TelephonyCallRecord is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
update_binding
Update an agent telephony binding.
Updates a telephony binding owned by the voice agent named in the path. Updating a SIP binding
requires the VoiceAgents=V1Preview opt-in.
update_binding(agent_name: str, binding_id: str, body: _models.UpdateTelephonyBindingRequest, *, etag: str, match_condition: MatchConditions, content_type: str = 'application/merge-patch+json', **kwargs: Any) -> _models.TelephonyBinding
Parameters
| Name | Description |
|---|---|
|
agent_name
Required
|
The name of the voice agent that owns the binding. Required. |
|
binding_id
Required
|
The service-generated binding identifier. Required. |
|
body
Required
|
The binding properties to update. Is one of the following types: UpdateTelephonyBindingRequest, JSON, IO[bytes] Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
etag
|
check if resource is changed. Set None to skip checking etag. Required. |
|
match_condition
|
The match condition to use upon the etag. Required. |
Returns
| Type | Description |
|---|---|
|
TelephonyBinding. The TelephonyBinding is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|