<@U084APK40NS> please check below code, I’m using ...
# ask-ai
n
@millions-hair-24956 please check below code, I’m using a self hosted livekit server with version 1.8.3. The room agent dispatch feature is not working:
Copy code
await lk_api.sip.create_sip_dispatch_rule(
            create=api.CreateSIPDispatchRuleRequest(
                trunk_ids=[trunk_id],
                name=rule_name,
                rule=api.SIPDispatchRule(
                    dispatch_rule_individual=api.SIPDispatchRuleIndividual(
                        room_prefix=room_prefix,
                    )
                ),
                room_config=api.RoomConfiguration(
                    agents=[api.RoomAgentDispatch(
                        agent_name=agent_name,
                    )]
                )
            )
        )
g
It seems likely that the issue with your code might be related to the configuration of the dispatch rule or the agent dispatch settings. According to the LiveKit documentation, the
dispatchRuleIndividual
is used to route each caller into an individual room with the agent. Ensure that the
trunk_id
and
agent_name
are correctly configured and match the settings on your LiveKit server. Additionally, verify that your LiveKit server version supports the
dispatch_rule_individual
feature, as older versions might not have this functionality. You might also want to check if the
agent_name
is correctly set in the
WorkerOptions
and that the agent is properly registered to receive job requests. Would you like more detailed troubleshooting steps or information on setting up the dispatch rule? Sources: - LiveKit documentation šŸ‘ 0 button šŸ‘Ž 0 button šŸ’” Hint: Mention @runllm in the thread for followups.