Organisation Management¶
Creating an organisation¶
Via Admin Panel (Editor UI)¶
- Login to editor → Admin tab → Create Organisation
- Step 1: Name, industry (hotel/hospital/general), contact email/phone
- Step 2: Resource limits + compliance settings (auto-filled by industry preset)
- Step 3: Review → Create
- Success page shows API key + secret (one-time view)
Via API¶
POST /api/v1/organizations
{
"admin_username": "admin",
"admin_password": "<from env>",
"name": "Grand-Estancia-Salem",
"contact_info": { "email": "manager@ge.com", "phone": "+919944421125" },
"settings": {
"max_users": 50, "max_dids": 10, "max_trunks": 5, "max_queues": 10,
"recording_enabled": true,
"features": { "call_transfer": true, "call_recording": true, "voicemail": true,
"conference": true, "ivr": true, "ai_agent": false }
},
"limits": { "concurrent_calls": 30, "monthly_minutes": 50000, "storage_gb": 50 }
}
Returns api_key + api_secret (plain text, shown only once).
Editing an organisation¶
Editor → Admin tab → click Edit on any org. Editable fields:
General¶
- Name, status (active/suspended), contact email/phone
Features (8 toggles)¶
- Recording enabled, Webhooks enabled
- Call transfer, Call recording, Voicemail, Conference, IVR, AI Agent
Resource limits¶
- Max users, Max DIDs, Max trunks, Max queues
- Concurrent calls, Monthly minutes, Storage (GB)
Compliance¶
- Recording consent mode (4 options)
- CDR retention days, Recording retention days
- PII masking toggle
API credentials¶
- View API key
- Rotate API secret (generates new, invalidates old immediately)
Save auto-deploys Asterisk config — changes take effect on the next call.
Organisation lifecycle¶
- Active: all API calls work, calls route normally
- Suspended: all API calls return 401, existing Asterisk config remains but new calls fail
- Deleted: org removed from database
Resource limits enforcement¶
| Resource | Enforced at | API response on limit |
|---|---|---|
| Max users | POST /api/v1/users | 403 Forbidden |
| Max DIDs | POST /api/v1/dids | 403 Forbidden |
| Max trunks | POST /api/v1/trunks | 403 Forbidden |
| Max queues | POST /api/v1/queues | 403 Forbidden |
| Concurrent calls | Asterisk dialplan (GotoIf) | Plays "all circuits busy" |
| Monthly minutes | Not enforced (advisory) | — |
| Storage GB | Not enforced (advisory) | — |
Onboarding a new client¶
After creating the org:
- Create trunk —
POST /api/v1/trunks(Tata NUC gateway for PSTN access) - Assign DIDs —
POST /api/v1/dids(link phone numbers to routing) - Create users —
POST /api/v1/users(SIP extensions for agents) - Create queues —
POST /api/v1/queues(call queues with agents) - Deploy config —
POST /api/v1/config/deploy(generates Asterisk files) - Invite platform users —
POST /api/v1/org-users/invite(editor login accounts with roles) - Set compliance —
PUT /api/v1/compliance(retention, consent mode)
API reference¶
Full API documentation available at: - Swagger UI: https://devpbx.astradial.com/api-docs - Scalar: https://devpbx.astradial.com/reference