for an inbound dispatch rule, how does the order o...
# ask-ai
m
for an inbound dispatch rule, how does the order of SIP participant and Agent participant happen when it comes to joining the room?
t
Thanks for reaching out, Kush. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
When an inbound call is received through a SIP trunking provider, the SIP participant (caller) joins the room first. This is followed by the agent(s) specified in the dispatch rule, as defined in the
room_config.agents
field. The SIP participant hears a dial tone until another participant, such as an agent, publishes tracks to the room. Sources: Accepting inbound calls | LiveKit Docs | Dispatching agents | LiveKit Docs
m
So the SIP participant always joins first then the agent joins, is my understanding correct?
t
Hey there! You've got it exactly right. The SIP participant (caller) will kick things off by joining the room first, and then the agent(s) from the dispatch rule will join afterwards. Makes total sense! 😊
m
Can you point out in code where that happens?
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!