Skip to main content
Pre-call initialization lets you dynamically select and configure the agent before a call starts. Works on all transports.

Supported Transports

Setup

Phone numbers (Twilio / WhatsApp)

Bind with routing_target_type: "webhook":

WebRTC

Pass server_url in requestData:

Your Server Receives

Verify the Signature

Each call-init request is HMAC-signed with the number’s server_url_secret (returned when you bind the number). Headers: X-TurnCall-Signature: v1=<hex> and X-TurnCall-Timestamp; the HMAC-SHA256 is computed over "{timestamp}.{raw_body}" — the same scheme as event webhooks.
Reject unverified requests — call-init decides which agent answers a real call.

Response Options

Response Fields

What Happens

1

call.initializing webhook event fires (informational)

2

Template {{variables}} are rendered into the system prompt

3

knowledge_context is prepended to the system prompt

4

metadata is stored on the call record

5

call.started event fires

6

Pipeline starts with the resolved configuration

For persistent, searchable knowledge, use the Knowledge Base API instead of knowledge_context. Use knowledge_context for per-call dynamic data like CRM records or open tickets.