We are using SIP for our telephony agent. Most of ...
# ask-ai
s
We are using SIP for our telephony agent. Most of the time, during the welcome message, the bot ends up capturing its own voice due to echo. We've enabled Krisp on the LiveKit trunk and are also using the
BVCTelephony
agent code. However, we're still noticing that the bot picks up its own welcome message. We're not sure why this is happening. Any Suggestion here ? Am i supposed to use either krisp or BVCTelephony?
t
Thanks for reaching out, Navin. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To address the echo issue during the welcome message in your SIP telephony setup, here are some suggestions: • Ensure that Krisp noise cancellation is correctly enabled for both incoming and outgoing calls. For incoming calls, this should be configured in the inbound trunks. For outgoing calls, use the
krisp_enabled
attribute in the
CreateSIPParticipant
API. • Verify that the Krisp integration is functioning as expected. It uses AI to remove background noise and should help improve call clarity. Both Krisp and the
BVCTelephony
agent code can be used together. They serve different purposes, and there is no requirement to choose one over the other. If the issue persists, it might be worth reviewing the audio setup or testing with different configurations to identify the root cause of the echo. Sources: SIP overview | LiveKit Docs | SIP overview | LiveKit Docs
s
We are getting the echo isue even when we are enabling the krisp_enabled
t
Since the echo issue is still hanging around even with
krisp_enabled
, let’s try a few more troubleshooting steps together: 1. Double-check Krisp Setup: ◦ Make sure
krisp_enabled
is correctly set up in both your inbound trunk and outbound call settings. ◦ Keep an eye on the SIP call status and enabled features to confirm Krisp is actually active during the call. 1. Audio and Media Settings: ◦ Tweak the jitter buffer settings to better handle your network conditions. ◦ Verify that your telephony codecs (like PCMU/PCMA) and WebRTC codecs (like Opus) are playing nicely together. ◦ Check your media encryption settings to make sure audio processing is smooth. 1. Network and Connectivity: ◦ Confirm that NAT traversal settings and external IP configurations are spot on. ◦ Make sure RTP media ports are accessible and properly configured. 1. Advanced Krisp Troubleshooting: ◦ Try enabling Background Voice Cancellation (BVC) to boost echo and noise reduction. ◦ Check that WebRTC echo cancellation settings aren’t conflicting with Krisp’s features. If you’re still having trouble, feel free to share your current SIP trunk setup, dispatch rule settings, and any relevant logs or error messages. That way, we can dig in together and find exactly what’s causing the echo. Sources: Noise & echo cancellation | LiveKit Docs | livekit-protocol/livekit/protocol/sip.pyi | SIP overview | LiveKit Docs | SIP Integration | livekit/livekit_composite | DeepWiki | Noise & echo cancellation | LiveKit Docs
s
We are just using the default value
t
Just a heads-up: Krisp noise cancellation is turned off by default for inbound SIP trunks, so you'll need to enable it yourself. For outbound calls, you can switch Krisp on for each call using the
CreateSIPParticipant
API. If you're sticking with the default setup, Krisp might not be working on your inbound calls, which could be why you're hearing that echo. I’d suggest turning Krisp on in your SIP trunk settings and double-checking that it’s active for both inbound and outbound calls. Need a hand figuring out how to tweak these settings? Just give me a shout—I’m happy to help!
s
we have enabled the krisp
t
Hey there! Since the echo is still hanging around even with Krisp turned on, let’s try a few more things that might help: 1. Take a look at your Network Configuration: ◦ Make sure your NAT traversal settings, like
media_use_external_ip
and
media_nat_1_to_1_ip
, are set up correctly to avoid any network-related echo problems. 1. Tweak Your Audio Settings: ◦ Try enabling the jitter buffer—it helps smooth out any audio bumps. ◦ Check that your audio codecs are the best fit for your setup since some can cause more echo than others. 1. Double-Check Krisp’s Setup: ◦ Make sure Krisp is switched on for both incoming and outgoing calls. 1. Look Over Media Encryption: ◦ Have a peek at your media encryption settings to ensure they’re not getting in the way of Krisp’s noise cancellation. If the echo is still being stubborn, feel free to share some details about your network setup, codec choices, and any logs you have. That way, we can dig in together and figure out what’s causing it. Sources: livekit/livekit_sip.pb.go | Speech & Audio Processing | livekit/livekit_composite | DeepWiki | SIP Integration | livekit/livekit_composite | DeepWiki | SIP overview | LiveKit Docs | SIP APIs | LiveKit Docs
s
◦ Try enabling the jitter buffer—it helps smooth out any audio bumps. How we can enable this
t
To turn on the jitter buffer in your SIP telephony setup for LiveKit, just update your configuration file like this:
Copy code
sip:
  # Other SIP configuration parameters...
  enable_jitter_buffer: true
This tweak helps smooth out those annoying network delays and makes your call audio sound better. If you have any questions or need a hand with this, just let me know—I’m here to help!
s
sip: # Other SIP configuration parameters... enable_jitter_buffer: true is this in livekit inbound trunk
t
Just a quick note: the jitter buffer setting isn’t tied directly to the LiveKit inbound trunk settings—it’s actually part of your overall SIP configuration. To turn it on, you can add
enable_jitter_buffer: true
in your SIP configuration file. If you have any questions or want a hand setting this up, feel free to reach out—I’m here to help!
s
where i can find this file
t
Hey there! The SIP configuration file in LiveKit is usually called
config.yaml
. Where you find it really depends on how you’ve set things up, but most of the time it’s: • Mounted as a volume in your server or container. • Set through an environment variable (like
SIP_CONFIG_FILE
). If you want to enable the jitter buffer, just pop this into your
config.yaml
file:
Copy code
enable_jitter_buffer: true
Not quite sure where that file is in your setup? No worries! Take a peek at your deployment docs or check your environment variables. And if you want, I’m here to help you find or tweak that file anytime.