Skip to content

OpenAI Realtime on an Israeli phone number ​

OpenAI's Realtime API accepts phone calls over SIP. Kolwire gives the agent an Israeli number, bridges the call to OpenAI and keeps recordings, transcripts, webhooks and billing on its side.

What you need ​

  • An OpenAI project ID (proj_…) and API key.
  • A Kolwire account (in early access) and an Israeli number.

1. Create the agent on Kolwire ​

ts
import { Kolwire } from "@kolwire/sdk";
const kw = new Kolwire();

const agent = await kw.agents.create({
  name: "Receptionist",
  mode: "openai_realtime",
  system_prompt: "You are the receptionist of Acme Clinic in Tel Aviv. Speak Hebrew unless the caller speaks English.",
  first_message: "שלום, הגעתם למרפאת אקמי. איך אפשר לעזור?",
  language: "he",
  external: { project_id: "proj_abc123", model: "gpt-realtime-2.1", voice: "marin" },
  provider_api_key: process.env.OPENAI_API_KEY,
});
console.log(agent.connector.webhook_url);

2. Add the webhook at OpenAI ​

In OpenAI (Settings → Project → Webhooks), add a webhook for realtime.call.incoming that points at agent.connector.webhook_url. Save its signing secret on the agent:

ts
await kw.agents.update(agent.id, { provider_webhook_secret: "whsec_…" });

3. Route a number or place a call ​

ts
// Inbound: the number rings the agent
await kw.numbers.update("pn_123", { voice_config: { mode: "agent", agent_id: agent.id } });

// Outbound: the agent calls an Israeli mobile
await kw.calls.create({ from: "+972721234567", to: "+972501234567", agent_id: agent.id });

How it works ​

Kolwire bridges the call to sip:<project_id>@sip.api.openai.com;transport=tls. OpenAI posts realtime.call.incoming; Kolwire checks the webhook signature, makes sure the call is one it bridged for this agent, and accepts it with the agent's prompt, first message, language, model and voice.

  • Phone minutes are billed by Kolwire in shekels; the AI is billed by OpenAI on your account.
  • Audio is G.711 over the phone network.

More detail: OpenAI Realtime & ElevenLabs agents.