Send real-time commands to active calls.Send Control Command#
Send a command to an active call. The call must have status in-progress.Parameters#
| Name | In | Type | Description |
|---|
id | path | string | Call ID |
Command Types#
| Type | Description |
|---|
inject-context | Add information to agent's memory without speaking |
say | Make the agent speak specific text |
end-call | End the call with optional message |
transfer | Transfer to another number |
Inject Context#
Add information to the agent's context without the agent speaking. Use for SMS verification codes, CRM data lookups, or any silent context updates.Request#
Fields#
| Field | Type | Required | Description |
|---|
type | string | Yes | inject-context |
content | string | Yes | Context to inject |
trigger_response | boolean | Yes | If true, agent responds immediately |
Say#
Make the agent speak specific text.Request#
Fields#
| Field | Type | Required | Description |
|---|
type | string | Yes | say |
content | string | Yes | Text for the agent to speak |
end_after | boolean | Yes | End call after speaking |
End Call#
End the active call, optionally with a final message.Request#
Fields#
| Field | Type | Required | Description |
|---|
type | string | Yes | end-call |
message | string | No | Final message before ending |
Transfer#
Transfer the call to another phone number or SIP endpoint.Request#
Fields#
| Field | Type | Required | Description |
|---|
type | string | Yes | transfer |
destination | string | Yes | Phone number or SIP URI |
message | string | No | Message before transfer |
Response#
{
"success": true,
"message": "Command sent successfully"
}
Errors#
| Status | Description |
|---|
| 400 | Invalid command or call not active |
| 404 | Call not found |
Modified at 2025-12-29 14:18:06