Implementation:Elevenlabs Elevenlabs python WorkflowPhoneNumberNodeModelOutput
| Attribute | Value |
|---|---|
| Page Type | Implementation |
| Language | Python |
| SDK | elevenlabs |
| Class | WorkflowPhoneNumberNodeModelOutput |
| Source File | src/elevenlabs/types/workflow_phone_number_node_model_output.py |
| Auto-Generated | Yes (Fern API Definition) |
Overview
Description
WorkflowPhoneNumberNodeModelOutput is a Pydantic model representing the output configuration of a phone number transfer node within a conversational AI workflow. It describes how a call is transferred, including custom SIP headers, the transfer destination, the type of transfer, and the node's position and edge ordering in the workflow graph.
Usage
This model is returned by the ElevenLabs API as part of a workflow definition and represents the state of a phone number transfer node. It provides information about how the node is configured, including custom SIP headers to attach during the transfer, the transfer destination (which can be a phone number or SIP URI), and the transfer type.
Code Reference
Source Location
src/elevenlabs/types/workflow_phone_number_node_model_output.py
Class Signature
class WorkflowPhoneNumberNodeModelOutput(UncheckedBaseModel):
...
Import Statement
from elevenlabs.types import WorkflowPhoneNumberNodeModelOutput
I/O Contract
| Field Name | Type | Required | Description |
|---|---|---|---|
| custom_sip_headers | typing.List[WorkflowPhoneNumberNodeModelOutputCustomSipHeadersItem] |
Yes | Custom SIP headers to include when transferring the call. Each header can be either a static value or a dynamic variable reference. |
| position | PositionOutput |
Yes | Position of the node in the workflow. |
| edge_order | typing.List[str] |
Yes | The IDs of outgoing edges in the order they should be evaluated. |
| transfer_destination | WorkflowPhoneNumberNodeModelOutputTransferDestination |
Yes | The destination for the phone number transfer. |
| transfer_type | TransferTypeEnum |
Yes | The type of transfer to perform. |
Model Configuration:
- Frozen (immutable) model
- Allows extra fields
- Supports both Pydantic v1 and v2
Usage Examples
Accessing output node fields
from elevenlabs.types import WorkflowPhoneNumberNodeModelOutput
# After retrieving a workflow from the API
node: WorkflowPhoneNumberNodeModelOutput = ...
# Access transfer details
print(f"Transfer type: {node.transfer_type}")
print(f"Destination: {node.transfer_destination}")
# Inspect custom SIP headers
for header in node.custom_sip_headers:
print(f"Header: {header}")
# Access position and edges
print(f"Position: {node.position}")
print(f"Edge order: {node.edge_order}")
Constructing a phone number node output
from elevenlabs.types import (
WorkflowPhoneNumberNodeModelOutput,
PositionOutput,
)
node = WorkflowPhoneNumberNodeModelOutput(
custom_sip_headers=[],
position=PositionOutput(x=300, y=150),
edge_order=["edge_success", "edge_failure"],
transfer_destination="+15551234567",
transfer_type="cold",
)
Related Pages
- WorkflowOverrideAgentNodeModelInput - Override agent node model for workflow inputs
- WorkflowStandaloneAgentNodeModelInput - Standalone agent node model for workflow inputs
- WorkflowExpressionConditionModelOutputExpression - Expression condition model for workflow outputs