shy-raincoat-67106
07/22/2025, 6:04 AMtall-airline-16756
07/22/2025, 6:04 AMtall-airline-16756
07/22/2025, 6:06 AMagent_name (e.g., "inbound-agent") in your agent code for dispatch configuration.
3. Set up an inbound SIP trunk for your Telnyx number. Create a file like `inbound-trunk.json`:`{
"trunk": {
"name": "My inbound trunk",
"numbers": ["+15105550100"]
}
}`Then run:`lk sip inbound create inbound-trunk.json`
4. Configure a dispatch rule to route inbound calls to your agent. Create `dispatch-rule.json`:`{
"rule": {
"dispatchRuleIndividual": {
"roomPrefix": "call-"
}
},
"roomConfig": {
"agents": [{
"agentName": "inbound-agent"
}]
}
}`Then run:`lk sip dispatch create dispatch-rule.json`
5. Add a greeting in your agent code after the session starts:`await session.generate_reply(
instructions="Greet the user and offer your assistance."
)`
6. Start your agent:`python agent.py dev`
With this setup, inbound calls to your Telnyx number will be routed to a LiveKit room, where your agent will join and greet the caller automatically.steep-keyboard-85291
07/23/2025, 12:56 PMtall-airline-16756
07/23/2025, 12:57 PM