hallowed-ocean-30053
04/24/2026, 1:23 PMUpdateSIPInboundTrunkFields to programmatically add whitelisted numbers as I provision them from Twilio.tall-airline-16756
04/24/2026, 1:23 PMtall-airline-16756
04/24/2026, 1:23 PMUpdateSIPInboundTrunkFields to add numbers.
There is no documented enforcement of a maximum number of entries for the trunk numbers field. The numbers field in SIPInboundTrunkInfo is a string array (string[]) used to specify which phone numbers route to the trunk, and the docs do not state a hard limit. SIP trunks can be updated programmatically (for example via the Python SDK workflows for creating/updating trunks), so updating the numbers list as you provision Twilio numbers is the expected approach.
A couple quick clarifying questions so I can help further:
• Which SDK or API method do you plan to use to call updates (REST, Python SDK, or another)?
• Do you expect to add thousands of numbers at once or add them incrementally?
If you tell me the SDK/method and your expected scale, I’ll give a concise example and any practical guidance (batching, payload size concerns, or update pattern) to use when adding numbers programmatically.
Sources: Agents telephony integration | LiveKit Documentation | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK, with interactive elementshallowed-ocean-30053
04/24/2026, 1:24 PMtall-airline-16756
04/24/2026, 1:25 PMnumbers array for a SIP Inbound Trunk. The numbers field is a string[] and can be updated programmatically, but there is no documented atomic partial-update method named UpdateSIPInboundTrunkFields.
Recommended approach given the documentation:
1. Retrieve the existing trunk config (list the trunk).
2. Append the new numbers to the numbers array in your client.
3. Replace the trunk configuration by creating/updating the trunk with the full updated numbers list (examples show recreate/replace patterns).
4. Perform these changes incrementally and in batches rather than attempting thousands in a single request.
Practical guidance:
• Batch additions (e.g., hundreds at a time) to reduce payload size and risk of failures.
• Test throughput and retry logic in staging to handle transient errors.
• If you need code examples, tell me which SDK or REST approach you’re using (Python SDK, REST, or another), and I’ll provide a concise example and a suggested batching strategy.
Would you like a Python (or REST) example for incremental batching?
Sources: Creating SIP Inbound Trunks and Dispatch Rules with Python SDK | https://livekit.com/pricing.md| | Accepting calls overview | LiveKit Documentation, with interactive elementshallowed-ocean-30053
04/24/2026, 1:28 PMtall-airline-16756
04/24/2026, 1:28 PMnumbers array. This simplifies management and scales better.
• If you expect thousands of numbers, add them incrementally in batches (append to the numbers list and update the trunk), and test batching/retry behavior in staging.
If you’d like, I can:
• Provide a concise Python or REST example for batching incremental updates, or
• Suggest a batching size/strategy based on your expected throughput.
Which SDK or API will you use for provisioning (Python SDK, REST, or other)?
Sources: Creating SIP Inbound Trunks and Dispatch Rules with Python SDK | Agents telephony integration | LiveKit Documentation, with interactive elementshallowed-ocean-30053
04/24/2026, 1:29 PMtall-airline-16756
04/24/2026, 1:30 PMallowed_addresses to restrict which IPs can send SIP requests to your LiveKit instance.
• Combine IP whitelisting with SIP auth (auth_username / auth_password) for defense in depth.
• Keep your allowlist up to date with Twilio’s published IP ranges and test changes in staging.
If you’d like, I can:
• Provide a concise example (Python or REST) showing how to set allowed_addresses on a trunk, or
• Suggest a batching/rollout plan to safely switch from number-based whitelisting to IP-based whitelisting.
Which would you prefer?
Sources: Agents telephony integration | LiveKit Documentation | How Vicidial Handles Bridging, Transfers, and SIP Calls | Checklist for Regional Deployments | LiveKit, with interactive elements