Skip to content

SIP PBX Trigger AI Tool Call

Andrey Egorov edited this page May 16, 2026 · 1 revision

Overview

Use SIP PBX Trigger with Trigger On = AI Tool Call to receive tool invocation requests from a live voice-agent session.

This trigger is the workflow bridge between:

  • a voice agent attached to a WebSocket leg
  • normal n8n business logic

Parameters

Parameter Required Description
Trigger On Yes Select AI Tool Call.
AI Tool Ref Yes Stable tool routing name used by Invoke AI Tool and the trigger.
Options -> Respond Timeout (Seconds) No How long the trigger waits for Respond To AI Tool before returning timeout to the runtime.

Output Branches

Branch Meaning
Request The live voice-agent session requested a tool call.

Request Output Payload

Field Meaning
ref Public AI tool ref.
aiToolRequestId Request ID for Respond To AI Tool.
aiLegId WebSocket AI leg that initiated the tool call.
peerLegId Bridged peer leg when present.
flowParams Static or expression-derived workflow parameters supplied by Invoke AI Tool.
toolParams Arguments supplied by the AI model according to the declared schema.
sipPbx.aiToolRequestId Hidden request handle used by automatic respond resolution.
sipPbx.aiLegId Hidden AI leg resolution metadata.

Follow-Up Action: Respond To AI Tool

Use SIP PBX -> Respond -> Respond To AI Tool.

Parameter Required Description
Response Text Yes Text returned to the model as the tool result.
Options -> Request ID No Explicit request ID override. Usually resolved automatically from the trigger item.

Request ID Resolution

Respond To AI Tool resolves the request in this order:

  1. hidden response handle from the trigger item
  2. explicit Options -> Request ID
  3. item.json.aiToolRequestId
  4. item.json.sipPbx.aiToolRequestId

Related AI Actions

The actions that define and attach tool behavior are documented in AI and WebSocket Legs.

Clone this wiki locally