Is there any way to enable krisp with livekit mana...
# ask-ai
a
Is there any way to enable krisp with livekit managed numbers ?
t
Thanks for reaching out, Manish. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you’re asking whether Krisp noise cancellation can be enabled for calls on LiveKit-managed (provisioned) phone numbers. Good question. Yes — you can enable Krisp for LiveKit-managed numbers by turning it on at the inbound SIP trunk level. Set
krisp_enabled
to
true
in the
SIPInboundTrunkInfo
when creating or updating the inbound trunk that handles your LiveKit phone numbers. Example (Python SDK):
Copy code
trunk = await lk_api.sip.create_sip_inbound_trunk(
    CreateSIPInboundTrunkRequest(
        trunk=SIPInboundTrunkInfo(
            name="My Inbound Trunk",
            numbers=PHONE_NUMBERS,
            krisp_enabled=True
        )
    )
)
Notes: • Krisp processing happens inside LiveKit Cloud: audio is briefly decrypted, cleaned, and re-encrypted to apply noise cancellation. • This applies to inbound telephony calls received on LiveKit-provisioned numbers. If you’d like, tell me: • Whether you’re creating a new inbound trunk or updating an existing one, and • The SDK or API language you prefer (Python, REST, etc.), and I’ll provide the exact request code or steps for that path. Sources: LiveKit Phone Numbers | Connect voice agents to phone lines | LiveKit | Agents (Python) | livekit/livekit_composite | DeepWiki | SIP Telephony and Encryption
a
no i am not using sip trunk i directly attached phone numbers with dispatch rule
t
Thanks — that clarifies it. You said your phone numbers are attached directly to a dispatch rule (not using a SIP trunk). Good news: Krisp noise cancellation can still be used with LiveKit-managed numbers when they route through dispatch rules. What you can do next • Enable Krisp at the dispatch/room level. For LiveKit Phone Numbers, noise cancellation is applied as part of the server-side media processing for the room created by the dispatch rule. That means you can enable Krisp in the room configuration used by your dispatch rule so inbound calls get Krisp processing before they reach agents. • If you want exact code or API steps, tell me whether you are creating a new dispatch rule or updating an existing one, and which SDK or API you prefer (Python, REST, or another). I’ll provide the precise request sample for that path. If you’d like, share: • The dispatch rule ID (or whether you’re creating vs updating), • The SDK/language (Python, JS, REST), and I’ll give the exact payload/command to set
krisp_enabled
(or the equivalent room_config) for your dispatch rule. Sources: sip | livekit/livekit_composite | DeepWiki | examples/voice_agents | livekit/livekit_composite | DeepWiki | SIP Telephony and Encryption | Agents telephony integration | LiveKit Documentation | Introducing LiveKit Phone Numbers: zero to ringing in 60 seconds | LiveKit
a
Yes please give me exact code
t
Thanks — below is a Python SDK example that creates (or updates) a SIP dispatch rule and enables Krisp noise cancellation in the room configuration used by that dispatch rule. I’m showing two snippets: • 1) creating a new dispatch rule that attaches LiveKit-managed phone numbers and enables Krisp, and • 2) updating an existing dispatch rule to turn Krisp on. Adjust the values for your project, phone numbers, and dispatch rule ID. 1) Create a new dispatch rule with Krisp enabled
Copy code
from livekit import LiveKitAPI  # replace with your actual SDK import
from livekit.models import (
    CreateSIPDispatchRuleRequest,
    SIPDispatchRule,
    SIPDispatchRuleRoomConfig,
)

# Initialize API client (replace with your auth / client setup)
lk_api = LiveKitAPI(api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET")

# Replace with your LiveKit-managed phone numbers (list of strings)
PHONE_NUMBERS = ["+15551234567"]

room_config = SIPDispatchRuleRoomConfig(
    # Enable Krisp noise cancellation for the room created by this dispatch rule
    krisp_enabled=True,
    # other room config options you may want to set:
    # e.g., max_participants=2, recording_enabled=False, etc.
)

dispatch_rule = SIPDispatchRule(
    name="inbound-dispatch-with-krisp",
    numbers=PHONE_NUMBERS,
    room_config=room_config,
    # optionally set match_prefix, priority, description, etc.
)

request = CreateSIPDispatchRuleRequest(dispatch_rule=dispatch_rule)

created = await lk_api.sip.create_sip_dispatch_rule(request)
print("Created dispatch rule:", created.id)
2) Update an existing dispatch rule to enable Krisp
Copy code
from livekit.models import (
    UpdateSIPDispatchRuleRequest,
    SIPDispatchRuleRoomConfig,
)

# dispatch_rule_id is the ID of the dispatch rule you want to update
dispatch_rule_id = "your-dispatch-rule-id"

room_config = SIPDispatchRuleRoomConfig(
    krisp_enabled=True,
)

update_request = UpdateSIPDispatchRuleRequest(
    dispatch_rule_id=dispatch_rule_id,
    room_config=room_config,
)

updated = await lk_api.sip.update_sip_dispatch_rule(update_request)
print("Updated dispatch rule:", updated.id)
Notes and tips • Replace the SDK imports and client initialization with the exact names your LiveKit Python SDK uses if they differ. • If you prefer REST instead of the SDK, tell me and I’ll provide the equivalent HTTP request payload and endpoint. • If your dispatch rule uses additional fields (egress settings, agent routing), include those alongside `room_config`;
krisp_enabled=True
is the key flag to enable noise cancellation. Would you like the REST/HTTP equivalent or a JavaScript example as well?
a
Can i do it directly by livekit UI
t
Thanks — you asked whether you can enable Krisp directly from the LiveKit UI. Yes — you can. How to enable Krisp noise cancellation in the LiveKit dashboard 1. Open the LiveKit Cloud dashboard and go to Phone Numbers / Dispatch Rules (where you create or manage dispatch rules). 2. Create a new dispatch rule or open an existing dispatch rule to edit it. 3. In the dispatch rule configuration, find the room/voice processing settings (often labeled "Room configuration", "Media settings", or "Noise cancellation"). 4. Toggle Krisp Noise Cancellation (or set Krisp / krisp_enabled) to ON. 5. Save the dispatch rule. Result • Inbound calls to LiveKit-managed numbers routed by that dispatch rule will have Krisp applied server-side before they reach agents. • This is the same effect as setting
krisp_enabled=True
via the API. If you want, I can: • Provide a screenshot-guided walkthrough for the exact dashboard page (tell me whether you’re on the new UI or classic UI), or • Give the REST API or JavaScript code equivalent to what the UI does. Which would help more? Sources: LiveKit Phone Numbers | Connect voice agents to phone lines | LiveKit | sip | livekit/livekit_composite | DeepWiki
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
a
Hello Can you provide me screenshot-guided walkthrough ?