miniature-nail-35141
08/18/2025, 3:18 AMtall-airline-16756
08/18/2025, 3:19 AMtall-airline-16756
08/18/2025, 3:19 AMagent_name
• The SIP trunk configuration details
With this info, we can make sure everything’s set up just right for explicit dispatch. Thanks so much! Sources: SIP troubleshooting guide | LiveKit Docs | protobufs/livekit_sip.proto | Accepting inbound calls | LiveKit Docs | Agents telephony integration | LiveKit Docs | Agents telephony integration | LiveKit Docsminiature-nail-35141
08/18/2025, 3:22 AM{
"trunk": {
"name": "trunk",
"numbers": [
"+12345678"
],
"krisp_enabled": true
}
}
dispatch rule.json
•
{
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"name": "self-hosted-dispatch",
"trunk_ids": [
"ST_ZkH4MQdybanR"
],
"roomConfig": {
"agents": [
{
"agentName": "self-hosted-agent",
"metadata": "job dispatch metadata"
}
]
}
}
tall-airline-16756
08/18/2025, 3:22 AMagents.cli.run_app(agents.WorkerOptions(
agent_name="self-hosted-agent"
))
2. Review Dispatch Rule Configuration:
Make sure your dispatch rule is specific enough to catch the incoming call. For instance, confirm that the number +12345678 is properly set up in the rule.
3. Check for Dispatch Rule Conflicts:
Sometimes, conflicting dispatch rules can override what you want. It’s worth checking for any overlaps and using conflict resolution if needed.
4. Verify Explicit Dispatch Configuration:
For telephony integrations, explicit dispatch is key. Ensure the agentName is set in your dispatch rule so calls don’t automatically go to the default agent.
5. Test with Specific Dispatch Rules:
Try creating a dispatch rule that clearly routes calls to your intended agent. For example:
{
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"roomConfig": {
"agents": [
{
"agentName": "self-hosted-agent"
}
]
}
}
You can create this rule using the LiveKit CLI:
lk sip dispatch create dispatch-rule.json
6. Review Logs:
Take a peek at the logs for any errors or warnings related to dispatch rule matching or how agents are being routed.
7. Ensure Agent Availability:
Lastly, double-check that your self-hosted-agent is actually running and ready to take calls.
If you hit any bumps or want me to walk through this with you, just let me know—I’m here to help! Sources: SIP troubleshooting guide | LiveKit Docs | Agents telephony integration | LiveKit Docs | sip/sip.gominiature-nail-35141
08/18/2025, 4:19 AMtall-airline-16756
08/18/2025, 4:20 AM{
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"roomConfig": {
"agents": [
{
"agentName": "self-hosted-agent"
}
]
},
"trunk_ids": [
"ST_KqPtGG58gfEy"
]
}
3. SIP Provider Settings:
Double-check that your SIP provider’s settings line up with your trunk configuration, including allowed IP addresses and authentication details.
If you’re still running into issues, take a peek at the logs for any errors about dispatch rule matching or agent routing. And of course, feel free to reach out if you want me to help troubleshoot further!miniature-nail-35141
08/18/2025, 4:21 AMtall-airline-16756
08/18/2025, 4:21 AM{
"roomConfig": {
"agents": [
{
"agentName": "self-hosted-agent"
}
]
}
}
3. Disable Automatic Dispatch:
Make sure explicit dispatch is turned on by setting the agent_name in the worker options. This helps avoid calls going automatically to the default agent.
4. Review Dispatch Rules:
Take a look to see if there are multiple or conflicting dispatch rules that might be overriding what you want.
5. Confirm Agent Availability:
Check that the agent self-hosted-agent is up and running, ready to take calls. It’s also a good idea to peek at the agent’s logs for any errors.
6. SIP Trunk Matching:
Make sure the SIP trunk’s inbound numbers or IP addresses are set up correctly to match the calls you expect.
If you’re still stuck after these checks, feel free to share the agent’s logs or any other details about your setup. I’m here to help you get this sorted out! Sources: Agents telephony integration | LiveKit Docs | sip/sip_test.go | SIP troubleshooting guide | LiveKit Docs | SIP dispatch rule | LiveKit Docs