I connected Twilio Sip Trunk to my LiveKit Cloud S...
# ask-ai
c
I connected Twilio Sip Trunk to my LiveKit Cloud SIP. I'm also running an agent from my computer which is the code from "multimodal-agent-node". When I call, i see livekit start my agent but the call ends almost instantly. The LiveKit Cloud logs show
PARTICIPANT_LEFT
(me, the caller) as the reason the call is ending. The total call is less than a second, so it's probably not a timeout issue. Any idea what causes
PARTICIPANT_LEFT
from the caller?
g
The
PARTICIPANT_LEFT
event indicates that the participant (in this case, the caller) has disconnected from the room. This can happen due to several reasons, such as network issues, SIP trunk misconfiguration, or the participant not being able to establish a media path. According to LiveKit documentation, SIP only connects the remote call when another user joins the conversation and the media path is fully established. If the media path is not established, the call may end prematurely. To troubleshoot, ensure that: 1. The SIP trunk is correctly configured and the media path is established. 2. The agent is publishing audio tracks as soon as it joins the room. If the agent does not publish audio, SIP may assume there are no participants to answer the call, leading to disconnection. 3. Check for any network issues or firewall settings that might be blocking the connection. Would you like more detailed steps on how to verify these configurations? Sources: - LiveKit documentation 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
c
@millions-hair-24956 I can see
PARTICIPANT_ACTIVE
and
TRACK_PUBLISHED
from the agent before the
Participant_Left
. I'm running this from my macbook with the firewall disabled. I've been through the sip trunk configuration ad nauseam. Any tips for verifying my network is setup correctly? Any other ideas?
g
It seems likely that your network setup might still be causing issues, even if the firewall is disabled. According to LiveKit documentation, LiveKit uses WebRTC, which requires certain ports to be open for media and signaling. Here are some steps to verify your network setup: 1. Check Port Availability: Ensure that the necessary ports for WebRTC are open. Typically, WebRTC uses UDP ports in the range of 50000-60000 for media, and TCP port 7881 for signaling. You can use tools like
netcat
or online port checkers to verify that these ports are open. 2. Run Connection Tests: Use the LiveKit Connection Test and WebRTC Browser Test to identify any network-related issues. These tests can help determine if there are any restrictions or issues with your network setup. 3. Inspect SIP Traffic: Use a tool like Wireshark to capture and analyze SIP traffic. This can help identify if there are any issues with SIP signaling or media negotiation. If these steps don't resolve the issue, it might be helpful to review the SIP trunk configuration again or test with a different network to rule out any local network issues. Would you like more detailed guidance on any of these steps? Sources: - LiveKit documentation 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.