calm-eye-57311
09/19/2025, 11:57 AMtall-airline-16756
09/19/2025, 11:57 AMtall-airline-16756
09/19/2025, 11:57 AMsip.callStatus participant attribute and using the participant_attributes_changed event in your application logic.
Here’s a simple breakdown of the key steps:
• Keep track of the sip.callStatus attribute, which shows states such as dialing, ringing, active, and hangup.
• Use the participant_attributes_changed event to spot changes in call status and take action as needed.
• Check out the disconnect_reason field in the SIP call info to understand why a call ended—whether it was a user action, a rejection, or a system error.
If you’d like, I’d be happy to provide detailed examples or clarify any part of this for you. Just let me know!
Sources: pkg/sip/participant.go | protobufs/livekit_sip.proto | SIP Integration | livekit/livekit_composite | DeepWiki | Video Conferencing Applications | livekit/livekit_composite | DeepWiki | livekit-protocol/livekit/protocol/sip.pyicalm-eye-57311
09/19/2025, 12:03 PMtall-airline-16756
09/19/2025, 12:04 PMsip.callStatus within the ctx object in your async def entrypoint(ctx: JobContext) function. You can use the ctx.room object to listen for participant events and check their attributes, which is a great way to keep track of changes.
Here’s a simple way to get started:
• Use ctx.room.on("participant_attributes_changed", handler) to listen for any updates in participant attributes, including sip.callStatus.
• To focus on SIP participants, you can filter by checking if participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP or if participant.identity starts with sip_.
• Then, access the sip.callStatus attribute by using participant.attributes.get("sip.callStatus").
If you’d like, I can provide a detailed code example to walk you through implementing this in your entrypoint function. Just let me know!
Sources: SIP participant | LiveKit Docs | complex-agents/ivr-agent/agent.py | SIP Integration | livekit/livekit_composite | DeepWikicalm-eye-57311
09/19/2025, 12:25 PMtall-airline-16756
09/19/2025, 12:25 PMparticipant_attributes_changed listener, you can register an event listener on the Room object. Here’s a simple example in Python that might make things clearer:
@room.on("participant_attributes_changed")
def on_participant_attributes_changed(changed_attributes: dict[str, str], participant: rtc.Participant):
<http://logging.info|logging.info>("Participant attributes changed: %s %s", participant.attributes, changed_attributes)
If you'd like to dive deeper, the documentation is a great resource and you can check it out here. Please feel free to reach out if you have any more questions or need a hand with anything else—I’m here to help!
Sources: Participant attributes and metadata | LiveKit Docs | livekit-rtc/livekit/rtc/room.py | Job lifecycle | LiveKit Docs | livekit/src/room/participant/remote_participant.rs | callback.gocalm-eye-57311
09/19/2025, 12:31 PMtall-airline-16756
09/19/2025, 12:32 PMasync def entrypoint(ctx: JobContext), the @room is actually referring to ctx.room. You can easily set up an event listener for attribute changes by using ctx.room.on("participant_attributes_changed", handler).
If you'd like, I’m here to help with more details or examples—just let me know!