I have multiple phone numbers registered on Telnyx...
# telephony
b
I have multiple phone numbers registered on Telnyx (e.g. +12340000001, +12340000002, etc), each one should route to its own dedicated LiveKit Agent (my-agent-1, my-agent-2, etc). All Telnyx numbers forward to the same SIP URI (the LiveKit SIP gateway). On the LiveKit side, I can create one SIP trunk and register all the numbers there. How can I route each number to its corresponding agent? Can I use one SIP trunk on the LiveKit side and dispatch based on the number that was dialed? Or do I need to create a separate SIP trunk per number to attach distinct dispatch rules? What’s the recommended dispatch mechanism to achieve per-number agent routing?
r
There are a few ways this is commonly handled: 1. Have a trunk/dispatch rule per agent 2. Use Agents request-handler to determine if the agent should handle that call 3. Have a common agent but load different "core" logic based on phone number
👀 1
b
Thanks! This clarifies a lot, and what is the most used option or recommended option out of these? I would think number 1
r
Yes, I guess #1 is easiest. It all really just depends on your use case.