MediaSFU Blog

SIP Configurations: Connect Any Phone System to MediaSFU

· Tutorial

SIP Configurations: Connect Any Phone System to MediaSFU

Bring your own SIP trunk, configure AI auto-attendants, set up IVR flows, and secure your telephony with IP/geo restrictions — all from the dashboard.


What Is a SIP Configuration?

A SIP Configuration connects your phone numbers (DID numbers) to the MediaSFU platform. Once connected, that phone number can:

  • Receive inbound calls and route them through MediaSFU's media pipeline
  • Make outbound calls via your SIP trunk or MediaSFU's system numbers
  • Auto-answer with an AI agent, IVR menu, or audio playback
  • Join callers into MediaSFU meeting rooms automatically
  • Record calls, apply geo/IP restrictions, and trigger webhooks on events

Think of each SIP config as a "profile" for a phone number — it defines how that number behaves when someone calls it or when you call out from it.

📞 Don't have a SIP trunk? No problem. MediaSFU's Click-to-Call option lets you use your personal or business phone number directly — no SIP provider, no trunk credentials, no telephony knowledge needed. Just enter your phone number, verify it, and website visitors can call you through a widget. Jump to Click-to-Call setup →

Two Paths: System SIP vs. Bring Your Own Trunk

🔵 System SIP Easy

No SIP trunk needed. MediaSFU provides shared phone numbers from a pool. You select a number, and the system handles registration, routing, and failover.

  • Available on Standard & Advanced plans
  • No provider account required
  • MediaSFU manages everything
  • Per-minute usage on your balance
  • Great for click-to-call and campaigns

🟣 Bring Your Own Trunk Advanced

Connect your existing SIP provider. Enter your trunk credentials and MediaSFU registers to your provider. Full control over your numbers, routing, and pricing.

  • Any plan
  • Your own phone numbers
  • Your provider's rates for PSTN
  • Primary + backup trunks
  • Custom SIP domains & ports

Supported Providers

The SIP Config wizard has built-in presets for popular providers. Select your provider and the wizard pre-fills the SIP host, port, and transport settings:

Provider Type Notes
Click-to-Call System No trunk needed. Uses your personal/business phone number. Inbound-only via widgets.
Twilio BYOT SIP domain trunk. Enter SID and auth token.
Telnyx BYOT SIP connection. Enter connection ID and credentials.
Vonage / Nexmo BYOT SIP credentials auth.
Bandwidth BYOT SIP credentials.
Plivo BYOT SIP endpoint.
Zadarma BYOT SIP credentials.
SignalWire BYOT SIP domain.
Other Provider BYOT Manual SIP host, port, transport, and auth. Works with any SIP-compliant provider.
💡 Already using Twilio Flex, Aircall, DialPad, RingCentral, Zoom Phone, Cisco, or Avaya? You can connect those systems to MediaSFU via SIP trunking. Your existing phone system continues to work — MediaSFU adds AI agents, recording, translation, and video on top.

The Setup Wizard: 7 Steps

Creating a SIP config is guided by a step-by-step wizard in the Developer Dashboard:

1 Basics 2 Peer Config 3 Features 4 AI Agent 5 AI Creds 6 Integrations 7 Confirm

Step 1: Basics

Select your provider, enter your DID phone number (E.164 format, e.g. +14155551234), and choose the call direction: inbound, outbound, or both.

Step 2: Peer Configuration

For BYOT users: enter the SIP host (e.g. sip.telnyx.com), port (default 5060), transport (UDP, TCP, or TLS), and authentication credentials. Optionally configure a backup peer for failover.

Step 3: Features

Toggle the settings that control call behavior:

Setting What It Does
supportSipActive Master on/off switch for this SIP config
allowOutgoing Enable outbound dialing from this number
audioOnly Audio-only mode — always true for SIP calls (video is not supported on SIP). The setting exists for completeness but does not change behavior.
sipOnly When enabled, only SIP callers and the AI agent (if configured) can join the room. WebRTC browser participants are blocked. Useful for pure telephony scenarios.
autoRecordSip Automatically record all calls on this number
createFreshRoomAlways Applies to incoming calls only. When true (recommended), each inbound call gets a new MediaSFU room. Set to false only if you provide a webhookUrl that returns a specific roomName to direct calls into. Outgoing calls always specify their own room name in the API payload.
preferPCMA Prefer PCMA codec over PCMU (for EU carriers)

Step 4: AI Auto-Agent

This is where it gets powerful. You can configure an AI agent to automatically handle calls on this number:

🤖 AI Mode

Full conversational AI. Configure:

  • System prompt — personality, role, instructions
  • First message — what the AI says when it answers
  • Personality traits — friendly, professional, etc.
  • Temperature — creativity (0.0 – 1.0)
  • Speak first — AI initiates or waits for caller
  • Fallback behavior — what to do when uncertain
  • Agent-only mode — AI handles everything, no human escalation
  • Human escalation webhook — notify when AI transfers to human

📞 IVR / Playback Mode

Traditional phone tree or audio playback:

  • Welcome audio — greeting when call connects
  • Wait music — hold music while routing
  • Passcode entry — gate calls with a pin
  • Goodbye audio — farewell on hang-up
  • Error audio — invalid input message
  • Callback offer — "Press 1 to receive a callback"
  • 14 configurable audio slots total
  • Each slot accepts a URL or TTS text with {template_variables}
🔧 Separate inbound vs. outbound agent types You can run AI for inbound calls and IVR for outbound (or vice versa). The type field controls inbound behavior, and outgoingType controls outbound — independently.

Step 5: AI Credentials

If using AI mode, specify which LLM, STT, and TTS providers to use. Bring Your Own Keys — enter API key nicknames for OpenAI, Anthropic, Google, DeepSeek, ElevenLabs, Deepgram, and more. Credentials are stored securely and referenced by nickname.

Step 6: Integrations (MCP)

Connect external tools that your AI agent can use during calls:

Integration What It Does
Zapier Trigger Zaps on call events (new call, call ended, escalation)
Composio Multi-tool orchestration
Notion Log call notes and transcripts to Notion
Linear Create issues/tickets from call escalations
Zendesk Link to support tickets
Calendly Book meetings during AI calls
Airtable Log call data to Airtable bases
Knowledge Base RAG — give your AI agent a document library to reference during calls

Step 7: Review & Confirm

Review all settings and create the config. The system sends a verification code via SMS or call to the DID number. Enter the code to verify ownership, and the config goes live.

Security: IP & Geo Restrictions

Every SIP config supports layered security:

Feature What It Does
IP Allow List Only accept SIP traffic from specific IPs or CIDR ranges
IP Block List Reject traffic from specific IPs or CIDR ranges
Geo Allow List Only accept calls from specific countries (ISO 2-letter codes)
Geo Block List Reject calls from specific countries
Secure Code Require a passcode to access the call/room
Webhook URL Receive real-time event notifications for audit logging
⚠️ Defense in depth These restrictions stack. You can combine IP allow-listing with geo-blocking and a secure code for maximum protection. For example: allow only US IPs, block known VPN ranges, and require a passcode.

Callback System

When all agents are busy or unavailable, the callback system offers callers an alternative to waiting on hold:

Option Default Description
enabled false Master toggle
offerAfterWaitSeconds 120 Seconds before offering callback
requirePin false Require PIN for callback verification
pinLength 4 Length of PIN if required
maxOfferAttempts 3 How many times to offer before giving up
callbackWebhookUrl — Webhook when callback is requested

Number Verification Flow

Every SIP config goes through number verification to confirm you own the phone number:

Submit the config — Enter your DID number and provider details. Receive verification code — MediaSFU sends an OTP via SMS or automated call to the DID number. Enter the code — Input the OTP in the dashboard. The config status changes from PENDING to VERIFIED. Config goes live — Calls can now route through this number. SIP registration happens automatically for BYOT.

Verification prevents unauthorized use of phone numbers. You can resend the code if it doesn't arrive, and the system tracks attempt counts for abuse prevention.

SIP Registration Management

For BYOT configurations, the dashboard provides trunk registration controls:

Action What It Does
Register Send a SIP REGISTER to your provider. Establishes the connection.
Unregister Send a SIP unREGISTER. Gracefully disconnects.
Refresh Re-register to renew the session. Useful after network changes.

Each action targets either the primary peer or backup peer independently. Registration status (registered, unregistered, failed, pending) is displayed in real time on the config card.

Click-to-Call: The Zero-Trunk Option

Not everyone needs a SIP trunk. The Click-to-Call provider type lets you connect your personal or business phone number without any SIP infrastructure:

Website visitor clicks widget ↓ MediaSFU initiates WebRTC call ↓ Call routes through MediaSFU's system SIP numbers ↓ Your personal phone rings (cell, landline, or VoIP) ↓ Connected — caller and you are in a call

The wizard auto-configures everything: peer host is set to click-to-call.mediasfu.com, direction is forced to inbound, and no SIP credentials are needed. Just enter your phone number and verify it.

This is the fastest path to "website visitor can call your team" — no Twilio account, no SIP trunk, no phone system changes. It works with any phone number worldwide.

Where SIP Configs Are Used

Once configured, SIP configs power multiple features across the platform:

Feature How SIP Config Is Used
Click-to-Call Widget Widget references a sipConfigId → calls route through that config's number
AI Agent Widget Agent uses the config's AI auto-agent settings for inbound call handling
Cloud Phone (App) Calls page uses the config for outbound dialing and inbound routing
Campaigns AI bot outbound campaigns use the config's number as caller ID
Meeting Rooms SIP-enabled meetings: phone dial-in joins callers to the meeting room

Quick Reference: All Configurable Fields

Click to expand full field reference
FieldTypeDescription
contactNumberString (E.164)The DID phone number
providerStringProvider name or "Click-to-Call"
supportSipActiveBooleanMaster on/off
supportSipNameCallsBooleanAllow display names on calls
allowOutgoingBooleanEnable outbound dialing
preferPCMABooleanPrefer PCMA codec
createFreshRoomAlwaysBooleanNew room per inbound call (recommended true; set false only with webhook routing)
sipOnlyBooleanBlock WebRTC participants — only SIP callers and AI agent allowed
audioOnlyBooleanAlways true for SIP (video not supported on SIP calls)
autoRecordSipBooleanAuto-record all calls
webhookUrlStringEvent webhook endpoint
secureCodeStringPasscode for gated calls
ipAllowListString[]Allowed IPs/CIDRs
ipBlockListString[]Blocked IPs/CIDRs
geoAllowListString[]Allowed countries (ISO)
geoBlockListString[]Blocked countries (ISO)
autoAgentObjectAI/IVR/Playback agent config
templateValuesKey/Value[]TTS template variables
audioLinksObject14 IVR audio slots
callbackOptionsObjectCallback queue config
peerObjectPrimary SIP trunk (host, port, transport, auth)
backupPeerObjectFailover SIP trunk
extraKey/Value[]MCP integrations, AI creds, custom metadata

Set Up Your First SIP Config

Connect your phone number in minutes. Click-to-Call needs zero SIP knowledge — just enter your number.

Open Developer Dashboard Read the Telephony Guide