Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.57 KB

File metadata and controls

53 lines (41 loc) · 1.57 KB

AI Transfer

What

Transfer an active call with client.ai.transfer(call_id, pipeline).

Why

Allows full runtime control over call flow using the same PCMO pipeline format.

Recommended Pattern

Use client.ai.pipeline() or PipelineBuilder to avoid manual JSON.

pipeline = (
    client.ai.pipeline()
    .play("https://example.com/transfer_notice.wav")
    .connect(
        params={"caller_id": "919999999999", "strategy": "sequential"},
        endpoints=[
            {"type": "agent", "id": "PRIMARY_AGENT_UUID"},
            {"type": "agent", "id": "SECOND_AGENT_UUID"},
        ],
    )
)

response = client.ai.transfer(call_id="CALL_UUID", pipeline=pipeline)

Parameters

Parameter Description Why Required Constraints
call_id Active call UUID. Identifies which call to modify. Yes UUID
pipeline New pipeline actions. Defines transfer behavior. Yes valid PCMO action list

Action-by-Action Docs

Each action has its own file (description + standalone example):

Validation Rules

Rule Reason
Max 2 agent endpoints per connect. Server-side limit.
If agent endpoints exist, they must be at the end. Deterministic routing behavior.
All actions validated before request is sent. Early error detection.