I have auto-egress set up in my dispatch rule. The...
# ask-ai
g
I have auto-egress set up in my dispatch rule. There are no egress participants joining.
t
Thanks for reaching out, Aumesh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to help you make sure egress participants join automatically when using auto-egress in your dispatch rule! To do this, you’ll want to include the
egress
configuration within the
room_config
when creating your dispatch rule. This setup allows an egress participant to join the room and start recording, even if no other participants are there yet. The
RoomEgress
configuration supports three types of egress, each designed to fit different needs: • Room Composite Egress (
room
): This records the entire room layout with all participants together. • Auto Participant Egress (
participant
): This records individual participants as they join the room. • Auto Track Egress (
tracks
): This records individual audio and video tracks separately. Make sure the
egress
field is properly set up in your
CreateRoomRequest
or the equivalent API call. Here’s an example in Python to give you a clearer picture of how to structure the dispatch rule creation:
Copy code
# Create dispatch rule with auto-egress
dispatch_rule = await lk_api.sip.create_sip_dispatch_rule(
    api.CreateSIPDispatchRuleRequest(
        trunk_ids=[inbound_trunk.sip_trunk_id],
        rule=api.SIPDispatchRule(
            dispatch_rule_individual=api.SIPDispatchRuleIndividual(
                room_prefix="call"
            )
        ),
        room_config=api.RoomConfiguration(
            egress=api.RoomEgress(
                participant=api.AutoParticipantEgress(
                    # Egress configuration options
                )
            )
        )
    )
)
Please feel free to reach out if you’d like me to walk you through this step-by-step or if you want to share more about your setup. I’m here to make sure everything works smoothly for you! Sources: livekit-protocol/livekit/protocol/room.pyi | How to enable auto-egress with SIP | SIP Integration & Telephony | livekit/livekit_composite | DeepWiki | protobufs/livekit_sip.proto | Community & Support | livekit/livekit_composite | DeepWiki