Telephony guideSIP, PSTN, routing, and call control
Phone calls on your own carrier

Bring your numbers. Every call reaches the right answer.

Connect the SIP provider and numbers you already have. MediaSFU routes each call to an AI agent, a spoken menu, a callback or a person on your team, and lets your app watch and steer it live.

Open Phone & SIP setup
  • $0.0001 per voice minute
  • Bring your own carrier
  • AI-to-human handoff
Example phone line
Click-to-call on your website

Your business number, answered from your site.

Put a call button on your website and visitors call your business number from the browser. Those calls carry no carrier minutes, only MediaSFU media minutes, which cuts what you spend on phone calls.

  • No SIP trunk for widget calls

    List the business number you already have as a line in MediaSFU. Widget calls are placed by MediaSFU, so they don't need a trunk.

  • Many callers at once

    Each click is its own call, so several visitors can be on the line at the same time instead of hitting a busy tone.

  • AI first, your team when it matters

    An AI agent answers every caller, or your team picks up from a queue, and the AI can hand a caller over to a person.

Set up click-to-call
Example website with click-to-call
Shortest production path

Five moves to a live number.

Do these in order. The sections in the menu follow the same order.

  1. 1CarrierCollect your SIP details

    Pick a SIP provider and collect domain, port, transport, username, password, and DID.

  2. 2NetworkLet MediaSFU through

    Allow MediaSFU gateway traffic in the provider firewall or trunk policy.

  3. 3ConfigCreate and verify

    Create the SIP config in MediaSFU and verify the phone number.

  4. 4RouteChoose who answers

    Decide the route: room, human operator, IVR/audio playback, AI agent, or callback. An AI agent also needs AI keys, or managed AI if your plan includes it.

  5. 5TestTest both directions

    Test inbound and outbound calls, DTMF, recording, transcripts, and fallback behavior.

Calleron a phoneSIP trunkyour providerMediaSFU roomthe live sessionWho answersagent, human, IVRInbound: a call arrives →← Outbound: you dial out
One path, both directions. The same trunk and room carry inbound and outbound calls, so setting up one sets up most of the other.

Watch it done

Watch a line set up end to end.

Take a first test call, connect your own carrier, and let an AI agent answer the line. Recorded on the live product.

All video tutorials

Your first phone agent

1 min 19 sEnglish narration, captions in 7 languages

Add your number, get a working click-to-call line with a test link, then let AI answer or connect a real number when you are ready.

Chapters
Transcript

Let's get your first phone call working. Open First phone agent from Phone Calls in your dashboard. Add your number and you get a working click-to-call line with a test link. No phone provider needed to start. Type your number with its country code. It names your line. Nobody calls or texts it now.

Choose who answers. Pick up yourself in the calls widget, or let a voice agent from your workspace take the call. Create the test line. MediaSFU switches on calls for your account and makes the line and its test link.

Your line is ready. Calls reach this line through the MediaSFU call widget, so it works before you connect a real number. Scan the QR code with your phone, or copy the test link, and place a test call. Keep the calls widget open in another tab to answer, listen in, or take over from your agent.

When you are ready, let AI answer with your own keys, or buy a number and upgrade this same line.

Here is the test page your callers see. Tap Call now and allow the microphone. That's your first phone agent, live in two minutes.

Answer a phone line with an AI agent

2 min 40 sEnglish narration, captions in 7 languages

Add your own Gemini Live key on AI Provider Keys, then add a phone line whose calls an AI agent answers: role, prompt, greeting, and the realtime speech credential.

Chapters
Transcript

An AI phone agent needs a speech model. Start on AI Provider Keys and add your own. Add a credential. Choose Realtime Speech: one live audio session that listens and answers, for the shortest pauses on a call. MediaSFU recommends Google Vertex for Gemini. This video uses Gemini Live with a Gemini API key.

Create an API key in Google AI Studio and copy it. Paste it here. Use your own key: it stays hidden, and it's blurred in this video. Give it a nickname you'll recognise. Lines and agents pick it by this name. Google can refuse the Gemini API from some server locations, so add a Vertex credential as a fallback before going live. You can select it here later. The model and audio settings come prefilled. Save it. The key is ready. Now give a phone line an agent.

Add a number. This one is a Twilio number. Another video covers the trunk itself. Add the trunk host. Start from a template or a demo persona, or write your own.

Turn on the AI agent. AI Agent holds a conversation. IVR and Playback only play messages. Give it a role, and the instructions it follows on every call. With Speak First on, it opens every call with this greeting.

Choose realtime speech-to-speech, then the Gemini key you just saved. Tools the agent can use during calls are optional. Skip them for now.

Check the summary and create the line. Once your provider routes the number here, the agent answers its calls. The next video tunes the agent in Agent Configs.

What teams run

One number, several outcomes.

The same trunk and room carry each of these. Pick the one you need first; the others are a setting away.

Prove it in 30 secondsCall a live AI phone agent before you configure anything.
$0.0001per voice minuteTransport only — bring your own numbers and SIP provider, no markup
Where do you want to start?

Pick the path that fits you.

Each one tells you what to set up and what you can skip.

Good to know

Four answers that save the first afternoon.

  • No AI agent, no AI keys

    Text-to-speech on its own is enough for spoken menu prompts (IVR).

  • An AI agent answers?

    Add speech-to-text, a language model and text-to-speech under AI Provider Keys (or use MediaSFU managed AI if your plan includes it), then turn the agent on for the number with autoAgent.

  • Verify before you dial

    Verify your number (its peer) so calls connect reliably both ways. To place calls as well, turn on allowOutgoing.

  • Two ways to steer a call

    Socket events for real-time control from a connected room; the HTTP API for control from your backend.

Built in

Everything a phone line needs.

  • Hand off to a person

    Move a caller from the AI agent to an operator mid-call, without dialling again.

  • Callbacks

    Offer a callback when nobody is free, and confirm it to the caller before they hang up.

  • Live call control

    Hold, play media, switch source, record and end calls over HTTP or from a connected room.

  • Webhooks that decide

    Your server can approve, route or reshape each call as it arrives and hear how it ended.

  • Phones and browsers together

    SIP callers and WebRTC participants share the same MediaSFU room and recording.

  • Apps on day one

    Call from the web, Android or Windows apps while you build your own.