Multi-Tenant MSP Trunking
Overview
Managed Service Providers (MSPs) and IT consultancies that manage voice infrastructure for multiple clients need a way to provision, isolate, and bill SIP trunks without creating separate vendor accounts for each client. DIDfarm supports this out of the box.
With DIDfarm, you create one account, order numbers for all your clients, and assign each client their own SIP trunk with dedicated credentials. Numbers, call routing, and billing are fully separated per trunk.
Architecture
The multi-tenant model works by mapping each client to one or more SIP trunks within your account:
Your DIDfarm Account ├── Trunk: "Acme Corp" ── DIDs: +31 20 123 4567, +49 30 987 6543 ├── Trunk: "Beta Services" ── DIDs: +44 20 7946 0958 ├── Trunk: "Gamma GmbH" ── DIDs: +49 89 123 4567, +49 89 123 4568 └── Trunk: "Delta BV" ── DIDs: +31 10 234 5678, +32 2 345 6789
Each trunk gets its own SIP credentials (username/password) and its own set of assigned DIDs. Clients register their PBX to sip.didfarm.com using only their trunk credentials — they cannot see or access other trunks in your account.
Per-client Setup
Setting up a new client takes about two minutes:
1 Create a SIP trunk
Go to My Numbers → SIP Trunks and create a new trunk. Name it after the client for easy identification. Choose digest authentication (username/password).
2 Order numbers
Order the numbers your client needs via Buy Numbers. You can order local, national, mobile, or toll-free numbers in any of the 70+ supported countries.
3 Assign numbers to the trunk
Under DID Routing, assign each number to the client's trunk. Inbound calls to those numbers will now route to whichever PBX is registered on that trunk.
4 Share credentials
Give the client their SIP server (sip.didfarm.com), username, and password. They configure these in their PBX (3CX, FreePBX, Asterisk, Teams SBC, etc.).
Billing Pass-through
DIDfarm charges your account for all numbers and usage across all trunks. You then bill your clients at your own markup. To make this easy:
- Per-trunk cost tracking — the portal shows number costs grouped by trunk, so you can calculate per-client totals
- Invoice downloads — download DIDfarm invoices from the Billing tab and use them as the cost basis for your client invoices
- Wallet system — top up your wallet once and all trunk provisioning draws from the same balance. No need to manage separate payment methods per client
Managing 20+ Clients
As your client base grows, manual provisioning becomes a bottleneck. Here is how to stay efficient:
| Challenge | Solution |
|---|---|
| Provisioning speed | Use the API to create trunks, order numbers, and assign DIDs in a single script |
| Credential management | Store credentials in your PSA or RMM tool immediately after trunk creation |
| Cost tracking | Pull transaction history via API and aggregate by trunk for automated invoicing |
| Monitoring | Check trunk registration status via the portal or API to catch offline PBXes early |
| Number lifecycle | Set up renewal reminders per client; release numbers promptly when clients churn |
API Automation
For MSPs managing many clients, the DIDfarm API lets you automate the entire provisioning workflow. Here is a typical sequence:
# 1. Create a SIP trunk for the new client
curl -X POST https://didfarm.com/api/v1/portal/sip-trunks \
-H "Authorization: Bearer $TOKEN" \
-d '{"name": "Acme Corp", "auth_type": "digest"}'
# Response includes: uuid, username, password (save this!)
# 2. Search and order numbers
curl -X POST https://didfarm.com/api/v1/wallet/checkout \
-H "Authorization: Bearer $TOKEN" \
-d '{"items": [{"number": "+31201234567", "country": "NL", "type": "local"}]}'
# 3. Assign numbers to the trunk
curl -X POST https://didfarm.com/api/v1/portal/did-routing \
-H "Authorization: Bearer $TOKEN" \
-d '{"did_number_id": 42, "sip_trunk_id": 7}'Best Practices
- One trunk per client — avoid sharing trunks between clients, even if they are under the same parent company. Separate trunks mean separate credentials and cleaner isolation.
- Label everything — use descriptive trunk names and add notes to each DID assignment so your team knows which number belongs to which client.
- Automate onboarding — build a script or integration that creates the trunk, orders numbers, assigns routing, and stores credentials in your PSA in one step.
- Monitor registrations — a trunk that drops offline means a client without phone service. Check registration status regularly or set up alerting via the API.
- Regenerate credentials on offboarding — when a client leaves, regenerate the trunk credentials immediately to prevent unauthorized access, then release the numbers.
- Keep a margin buffer — maintain enough wallet balance to cover at least one month of renewals for all clients, so numbers are never accidentally released due to insufficient funds.
Frequently Asked Questions
Is there a limit on the number of trunks per account?
There is no hard limit. You can create as many trunks as you need. If you are provisioning at very high volume (100+ trunks), contact support so we can ensure your account is flagged for bulk operations.
Can clients see each other's numbers or trunks?
No. Each trunk has isolated credentials. A client can only authenticate with their own trunk credentials and can only receive calls on numbers assigned to their trunk.
How do I handle a client who needs numbers in multiple countries?
Order numbers in each country and assign them all to the same trunk. DIDfarm supports mixed-country assignments on a single trunk. Regulatory documents may be required for certain countries.
Can I white-label DIDfarm for my clients?
DIDfarm Connect offers white-label and reseller capabilities. See the Connect Getting Started guide for details on partner access and branding options.
What happens if my wallet runs out?
Number renewals will fail and numbers may be released after the grace period. Keep your wallet balance above the monthly renewal total for all clients. You can check the projected monthly cost in the Billing tab.
Start managing client trunks
Create your first client trunk in the portal now.