when making an outbound call, sometimes i get a si...
# ask-ai
i
when making an outbound call, sometimes i get a sip status code of 480 which would represent that the outbound call was not successfully made, but i still see a participant connection and disconnection event fired
t
Thanks for reaching out, Ed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thank you for reaching out! A SIP status code 480 means "Temporarily Unavailable" in the SIP protocol. In LiveKit, this usually shows up as a serious issue during call setup or if a call unexpectedly ends while active. When this happens, the system gently cleans up the related SIP session and lets the application know about the participant's change in status. Sometimes, you might notice that a SIP participant was partially created or even joined the room before this error popped up—like during those early pre-invitation checks or initial signaling steps. In such cases, you might see a participant connection event first. Then, when the 480 response comes through, it causes the participant to be disconnected from the room. This back-and-forth of connecting and disconnecting is actually expected behavior when a call setup starts but then has to be stopped due to this error. Sources: protobufs/livekit_sip.proto | livekit-rtc/livekit/rtc/_proto/participant_pb2.pyi | src/room/events.ts | livekit-android-sdk/src/main/java/io/livekit/android/events/RoomEvent.kt
i
what triggers a participant connected event
t
When a RemoteParticipant joins a room after you've already connected, a "participant connected" event is triggered. It's important to note that this event won't fire for participants who were already in the room when you joined. This event comes from the
Room
object and gives you the
RemoteParticipant
instance, so you can easily respond when new users join. Here's a simple example in Python:
Copy code
@room.on("participant_connected")
def on_participant_connected(participant):
    print(f"Participant {participant.identity} connected")
If you'd like, I’m happy to provide more details or examples for other SDKs—just let me know! Sources: livekit-rtc/livekit/rtc/_proto/room_pb2.pyi | Runtime/Scripts/Room.cs | Building an Automated IVR Menu Caller | LiveKit Docs | stream_audio.py | Handling events | LiveKit Docs
i
so why does it fire for 480 sip codes? the participant obviously wasnt connected
t
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!