rapid-honey-43838
02/25/2026, 10:44 AMtall-airline-16756
02/25/2026, 10:45 AMtall-airline-16756
02/25/2026, 10:45 AMnumbers field, so you can find a trunk by listing trunks and checking that field.
What you can do (recommended)
1. List inbound trunks via the API (e.g., list_sip_inbound_trunk()).
2. Iterate through each trunk’s numbers field and match the phone number you’re searching for.
3. When you find a match, you have the trunk object and its metadata (ID, provider config, etc.).
Why this is needed
• Trunks are created with a numbers parameter that contains the phone numbers routed to that trunk, so the association exists on the trunk record itself.
• There’s no documented single-step lookup endpoint for “find trunk by phone number,” so listing + filtering is the practical method.
If you want, I can:
• Show a short code example (language of your choice) that lists trunks and finds a matching number.
• Help you design a server-side index (cache) so lookups are fast if you need to do this frequently.
Which would you prefer — a code sample (and which language), or help planning a lookup/cache strategy?
Sources: Python SDKs | livekit/livekit_composite | DeepWiki | sip | livekit/livekit_composite | DeepWiki | Preserve caller ID during SIP transfers with Twilio | LiveKit