Skip to content

Outbound Calls

Initiate AI-powered outbound calls programmatically — your assistant dials the recipient and handles the conversation once connected.

Access Required

Outbound calls are only available upon request and after a positive review by sipgate support. This restriction exists to prevent fraud and spam. Please contact support to request access before using this feature.

How It Works

POST /v3/ai-flows/:aiFlowId/call
  → AI flow dials toPhoneNumber
  → Recipient answers
  → Session is created with direction: "outbound"
  → Webhook fires to your AI flow's webhook URL
  → Normal event/action flow begins

The call lifecycle after connection is identical to an inbound call — the same events (session_start, user_speak, etc.) and actions (speak, transfer, hangup, etc.) apply.

Prerequisites

  • Access granted by sipgate support (see warning above)
  • AI flow must have a phone_number configured (used as caller ID)
  • Target phone number in E.164 format (e.g. +4915790000687)

Initiating a Call

Endpoint

http
POST /v3/ai-flows/:aiFlowId/call
Authorization: Bearer <your-token>
Content-Type: application/json

Request Body

json
{
  "billingDevice": "e2",
  "toPhoneNumber": "+4915790000687"
}
FieldTypeDescription
billingDevicestringBilling device suffix (e.g. "e2")
toPhoneNumberstringTarget phone number in E.164 format

Response

The endpoint returns 201 Created when the call has been successfully initiated.

Error Responses

StatusReason
400AI flow has no phone_number configured
404AI flow not found

Session Direction

When an outbound call connects, the session_start event's session object will contain "direction": "outbound":

json
{
  "type": "session_start",
  "session": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "phone_number": "+4915790000687",
    "direction": "outbound",
    "from_phone_number": "+4921155660",
    "to_phone_number": "+4915790000687"
  }
}

Use the direction field to tailor your greeting — for outbound calls your assistant initiated the contact, so the opening message should reflect that context.

Example

http
POST /v3/ai-flows/:aiFlowId/call
Authorization: Bearer <your-token>
Content-Type: application/json

{
  "billingDevice": "e2",
  "toPhoneNumber": "+4915790000687"
}

TypeScript SDK

Using the @sipgate/ai-flow-sdk? See the Outbound Calls SDK guide for assistant.call() with full examples.

Next Steps