Inbound Traffic Parsing Engine
Explore the Implementation
git clone https://github.com/vobiz-ai/Livekit-vobiz-inbound.git
cd Livekit-vobiz-inboundRather than solely executing programmatic outbound dials, this repository establishes the required infrastructure bindings for autonomously accepting, provisioning, and routing high-volume incoming PSTN loads globally off the Vobiz trunk boundary directly into isolated generic LiveKit instance pods securely using strict SIPDispatchRule filters.
How It Works
Accepting unbounded incoming traffic mandates persistent, zero-latency server worker routing capable of spinning up individual dynamic conversational environments per-call linearly without dropping load at the LiveKit abstraction layer explicitly.
- SIP Proxy Referencing: The core configuration fundamentally ties your physical leased number off the Vobiz console explicitly against a secure Inbound SIP URI trunk logically pointing specifically to your LiveKit Cloud project endpoint natively (e.g.
sip:your-project.sip.livekit.cloud). - Dispatch Declarations: An underlying Python setup wrapper provisions a strict LiveKit "Dispatch Rule". This architectural rule dictates that whenever a new bridged request specifically originates from your verified Vobiz
trunk_idsarray, LiveKit will dynamically orchestrate a brand new arbitrary internalRoommapped deterministically completely securely. - Agent Worker Subscriptions: You execute
agent_inbound.pyas a long-lived perpetual background daemon thread. It constantly polls the overarching LiveKit project endpoint gracefully. - Room Instantiation: The exact millisecond the caller enters standard connectivity space, the daemon discovers the newly spawned, untended internal
Room. It autonomously injects a pristineAgentSessionexplicitly listening and instantly evaluating the incoming pipeline, returning the initial conversational greeting dynamically securely.
Implementation Code
Creating massive concurrently isolated LiveKit rooms for entirely arbitrary random inbound numbers relies solely upon strict configuration rule mappings assigned specifically at a global project level recursively:
from livekit import api
async def deploy_inbound_dispatch_rule():
"""Maps dynamic Vobiz PSTN routing loops explicitly toward arbitrary scaling LiveKit room wrappers natively."""
livekit_api = api.LiveKitAPI()
# Generate generic catch-all dispatch rules targeting standard E.164 boundary formats
await livekit_api.sip.create_sip_dispatch_rule(
api.CreateSIPDispatchRuleRequest(
name="Vobiz Inbound Standard Routing",
rule=api.SIPDispatchRule(
dispatch_rule_direct=api.SIPDispatchRuleDirect(
room_prefix="inbound_call_",
pin="1234" # Optional bridging pin
)
),
trunk_ids=["ST_xxxxxxxxxxx"] # Exclusively target traffic originating strictly off the Vobiz bridge
)
)