creamy-tiger-14805
09/17/2025, 10:06 AMtall-airline-16756
09/17/2025, 10:06 AMtall-airline-16756
09/17/2025, 10:06 AMlk sip inbound create inbound-trunk.json. If you want, you can also restrict incoming calls to specific numbers by using the allowedNumbers field.
3. Create a Dispatch Rule: Now, define how incoming calls should be routed to LiveKit rooms and specify which agents or participants should join. For example:
`{
"dispatch_rule": {
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"roomConfig": {
"agents": [
{
"agentName": "my-telephony-agent"
}
]
}
}
}`Then run: lk sip dispatch create dispatch-rule.json.
4. Answer the Call (for AI Agents): Once your agent connects, you can warmly greet the caller by using session.generate_reply(). For example:
await session.generate_reply(
instructions="Greet the user and offer your assistance."
)
Just a quick note: inbound calling works a bit differently from outbound. For inbound, you set up an inbound trunk and dispatch rules to accept and route calls, while outbound involves using an outbound trunk and programmatic APIs to initiate calls.
Sources: Agents telephony integration | LiveKit Docs | Accepting inbound calls | LiveKit Docs | Accepting incoming calls | LiveKit Docs | SIP inbound trunk | LiveKit Docs | Agents telephony integration | LiveKit Docs