Skip to main content

What Is SIP?

SIP means Session Initiation Protocol. It is a standard protocol used by phone systems to start, manage, and end voice calls over the internet. In this application, SIP is the bridge between:
  • The normal telephone network where leads receive calls
  • LiveKit rooms where the AI voice agent listens and speaks
Without SIP, the AI agent can talk inside a browser/WebRTC session, but it cannot call a normal mobile phone number.

What Is A SIP Trunk?

A SIP trunk is a configured connection between a telephony provider and an application. Think of it as the phone line for internet-based calling. This app uses two trunk concepts: The main production path uses the outbound trunk.

Why Vobiz Is Used

Vobiz is the SIP/telephony provider in this project. It supplies:
  • SIP domain or address
  • SIP username
  • SIP password
  • Caller phone number
  • PSTN connectivity for dialing Indian mobile numbers
LiveKit does not directly own the phone number in this setup. LiveKit asks the configured SIP trunk to place the call, and Vobiz completes the call over the phone network.

How The Call Travels

Environment Variables

Creating SIP Config

Run:
This creates:
  • A LiveKit inbound trunk named Ignitech Vobiz Inbound
  • A LiveKit dispatch rule named Ignitech Lead Dispatch
  • A LiveKit outbound trunk named Ignitech Vobiz Outbound
The dispatch rule routes inbound SIP calls into rooms using:

Listing SIP Config

Use the outbound trunk ID as:

Manual Test Call

With a real lead ID:
This creates:

Deleting SIP Config

This deletes dispatch rules first, then inbound trunks, then outbound trunks.

Important Notes

  • LIVEKIT_SIP_TRUNK_ID must be an outbound trunk ID.
  • Phone numbers must normalize to E.164, such as +91XXXXXXXXXX.
  • participant_identity uses hyphens: sip-lead-123.
  • VOBIZ_PHONE_NUMBER is used as caller ID when configured.
  • krisp_enabled=True is set for noise reduction.
  • play_ringtone=True is enabled so ringing behavior feels natural.