A Tkinter GUI tool for bulk-provisioning Deltapath PBX systems via REST API.
Replaces Playwright-based browser automation with pure REST API calls.
- 12-step Task Pipeline — Configure a complete PBX customer from Group → Number (Strip Digits)
- Mutually exclusive Mobility / Htek user creation
- Optional Task – Search & Delete — Search by group name or customer ID, then bulk-delete
- SIP Trunk Status page — Table of SIP trunk peers (host/port/status) filtered to the trunks on the server, with peer-ID filter
- Custom API payloads — Override default JSON for any task via a popup editor
- Status indicator lights — Grey (idle), Yellow (running), Green (success), Red (error)
- Session persistence — Last-used parameters are saved and restored automatically
- Copy & Export user records (login/pin) to clipboard or CSV
- UI font scaling — Hold Ctrl and scroll to zoom the whole UI (0.5x–3.0x)
- Python 3.9+
- Deltapath PBX with REST API enabled
requestslibrary
pip install requestsNo Playwright / browser drivers required.
Copy config/config.json to config/config.example.json and edit placeholders, or configure directly in the GUI:
{
"base_url": "https://your-pbx-ip",
"credentials": {
"username": "admin",
"password": "your-password"
}
}config.json and last_session.json are git-ignored so your real server URL and credentials are never committed. You can also enter URL/username/password in the GUI — the config file provides defaults.
cd Deltapath-Automation
python main.py- Enter URL, Username, Password (press Enter in password field to login)
- Click Login — a green token indicator confirms authentication
- Fill Global Parameters (right panel)
- Tick tasks in the Task Pipeline (left panel)
- Click Start
Login is attempted in this order, automatically falling back as needed:
- RESTful
POST /RESTful/index.php/auth/login— used when the controller exists (older PBX firmware) - Web session
POST /modules/auth/authProcess.phpwithresponse=json— used on newer UC servers (e.g. UC 5.1.1) that have no RESTfulauth/logincontroller. APHPSESSIDcookie is established and reused for all RESTful calls; success is verified by probing a RESTful controller for a JSON response. http://→https://auto-upgrade — if login overhttp://fails, the client retries automatically overhttps://(many servers force a 302 redirect that would otherwise discard the POST body).
Note: Some servers negotiate only weak TLS 1.2 cipher suites. The client uses an insecure SSL context (
SECLEVEL=0, verification off) so older PBX firmware can be reached.
| Field | Description |
|---|---|
| Group Name | Customer name (max 30 chars, spaces → _) |
| Group Code | Short code for the group |
| Max Concurrent Calls & Reg User | 1–300 |
| SIP Trunk Host/IP | Peer SIP server address |
| SIP Trunk Port | Peer SIP server port |
| Context Prefix | Prefix used for context names ({prefix}_Internal, etc.) |
| Permission Group Prefix | Prefix used for permission group names |
| Inbound Ranges / CallerID | Comma-separated ranges (603xxx-603xxx,...) |
| User Extension / Extension Range | Extension range (6032722300-6032722303) |
| Extensions | Auto-generated list from the extension range (read-only) |
| Htek MAC Data | MAC addresses for Htek phones. Dropdown selects model: List Provide Model (enter MAC MODEL per line) or uc902g / uc902sp / uc921g (enter MAC only) |
Run sequentially. Each task has a status light, checkbox, API badge, and a JSON payload button.
| # | Task | Description |
|---|---|---|
| 1 | Group | Create customer group (POST /v1/post/customer/customer) |
| 2 | Context | Create 4 contexts (_Internal, _Fixed, _Mobile, _IDD) |
| 3 | Permission Group | Create 4 permission groups (_Class_1 to _Class_4) with context includes |
| 4 | SIP Trunk | Create SIP trunk peer |
| 5 | Outbound Routing | Create 10 outbound routing rules |
| 6 | Inbound Routing | Create inbound routes for each range |
| 7 | Caller ID Manipulation | Create caller ID manipulation rules |
| 8 | ACL Group | Create _Managers, _Supervisors and _Users ACL groups (form-urlencoded) |
| 9 | User Profile | Create 4 user profiles (Class_1–4). 4 POSTs per class: JSON profile → form numberstatus → form status mode → form timeslot |
| 10 | User (Mobility) | Create mobility users. No password sent — server auto-generates; extracted from response. First extension of each range = Manager |
| 10b | User (Htek) | Create Htek phone users with MAC binding. Mutually exclusive with Mobility |
| 11 | ACL User | Assign Manager / Supervisor / User ACL groups. Supports multi-extension inputs (8123,8124,1234) and ranges (5000-5010). First ext = manager, rest = limited |
| 12 | Number (Strip Digits) | Create strip-digit number. 3 POSTs: JSON number → form numberstatus → form status mode |
Select/deselect all tasks (skips Htek — must be checked manually).
Checking Mobility unchecks Htek and vice versa.
Located in its own third notebook tab (Search & Delete). Search by group name or customer ID from the group dropdown (refresh with ↻), then bulk-delete.
| Module | Search API | Delete API |
|---|---|---|
| Group | GET /v1/get/customer/customer/view/list |
POST /v1/delete/customer/customer/{code} |
| Context | GET /v1/get/numberingplan/context/view/list |
POST /v1/delete/numberingplan/context/{names} |
| Perm Group | GET /v1/get/numberingplan/permissiongroup/view/list |
POST /v1/delete/numberingplan/permissiongroup/{names} |
| SIP Trunk | GET /v1/get/configuration/siptrunk/view/list |
POST /v1/delete/configuration/siptrunk/{id} |
| Outbound Routing | GET /v1/get/numberingplan/outboundrouting/view/list |
POST /v1/delete/numberingplan/outboundrouting/{id} |
| Inbound Routing | GET /v1/get/numberingplan/inboundrouting/view/list |
POST /v1/delete/numberingplan/inboundrouting/{id} |
| Caller ID | GET /v1/get/configuration/calleridmanipulation/view/list |
POST /v1/delete/configuration/calleridmanipulation/{id} |
| ACL Group | GET /v1/get/configuration/aclgroup/view/list |
POST /delete/configuration/aclgroup/{id} |
| User Profile | GET /v1/get/user/userprofile/view/list |
POST /v1/delete/user/userprofile/{id} |
| User | GET /v1/get/user/user/view/list |
POST /v1/delete/user/user/{username} |
| ACL User | GET /v1/get/configuration/acluser/view/list |
POST /v1/delete/user/user/{username} |
| Number | GET /v1/get/numberingplan/number/view/list |
POST /v1/delete/numberingplan/number/{id} |
| Call Forward | GET /v1/get/numberingplan/numbercallforward/view/list (resolves group per number) |
DELETE /v1/delete/numberingplan/numbercallforward/{number} |
| Call Pickup | GET /v1/get/user/callpickupgroup/view/list |
POST /v1/delete/user/callpickupgroup/{groupID} |
| Hunt Group | GET /v1/get/user/huntgroup/view/list |
POST /v1/delete/user/huntgroup/{id} |
| Voice Prompt | GET /configuration/voiceprompt/view/list |
DELETE /v1/configuration/voiceprompt/{id} |
| IVR | GET /ivr/route/view/list?query={K} (K = first letter/digit of group) |
DELETE /v1/ivr/route/menu/{ivr} |
Cinch Contact Center (grouped section):
| Module | Search API | Delete API |
|---|---|---|
| Agents | GET /get/callcentre/agent/view/list (also fetches ACL privileges per agent) |
DELETE /v1/callcentre/agent/{id} |
| Agent Groups | GET /get/callcentre/agentgroup/view/list |
DELETE /v1/callcentre/agentgroup/{id} |
| Queue | GET /callcentre/queue/view/list |
DELETE /v1/callcentre/queue/{id} |
Usage:
- Type a group name or customer ID
- Tick the modules to search
- Click Search — results appear in the log and next to each module (Not Found shown in red)
- Review and click Delete to remove
A fourth notebook tab that shows SIP trunk peers in an Excel-style table (Name / Host / Port / Status).
- Peer ID dropdown lists every trunk peer name from
GET /RESTful/index.php/v1/get/siptrunk/siptrunk/view/list?start=0&limit=1000 - Table fetches
GET /systemstatus/activepeer/view/listand keeps only the rows whose peer name exists in the SIP trunk list — other (non-trunk) peers are filtered out - Status column comes from the activepeer response (e.g.
OK,unmonitor,UNREACHABLE) - Fetches automatically after login
- ↻ Refresh button re-fetches the list; ↻ next to the dropdown refreshes the peer list
- Auto Refresh combo re-fetches on a schedule (Off / 30s / 1min / 5min)
- Peer selector dialog lets you Select All / Clear / Apply to filter the table
- Table row height auto-adjusts when the UI font is zoomed via Ctrl + scroll
Click the 📄 button next to any task to open a JSON editor.
Edit the payload — your changes are merged with the default values at runtime.
Use Reset to restore the sample, Save to persist.
Real-time execution logs (right panel, below Global Parameters).
Green text on dark background — shows every API call, response, and error.
Auto-generated during Mobility / Htek user creation:
Extension | Login Password | User PIN
Buttons:
- Copy Records — copy to clipboard
- Export Records — save as CSV
Deltapath-Automation/
├── main.py # Main GUI + pipeline orchestrator
├── styles.py # Tkinter theme & colors
├── config/
│ ├── config.py # Config loader
│ └── config.json # Server URL & credentials (gitignored)
├── utils/
│ ├── __init__.py
│ ├── ext_parser.py # Extension range parser
│ └── rest_client.py # REST API client (GET, POST, POST form)
├── standard_modules/ # Standard Order pipeline tasks
│ ├── task1_group.py
│ ├── task2_context.py
│ ├── task3_perm.py
│ ├── task4_sip_trunk.py
│ ├── task5_outbound_routing.py
│ ├── task6_inbound_routing.py
│ ├── task7_caller_id_manipulation.py
│ ├── task8_acl_group.py
│ ├── task9_user_profile.py
│ ├── task10_user.py
│ ├── task10b_user_htek.py
│ ├── task11_acl_user.py
│ └── task12_number_strip.py
├── complex_modules/ # Complex Order pipeline tasks (same set)
├── modules_optional/ # Optional Search & Delete modules (third tab)
│ ├── opt_group.py
│ ├── opt_context.py
│ ├── opt_permgroup.py
│ ├── opt_siptrunk.py
│ ├── opt_outboundrouting.py
│ ├── opt_inboundrouting.py
│ ├── opt_calleridmanipulation.py
│ ├── opt_aclgroup.py
│ ├── opt_userprofile.py
│ ├── opt_user.py
│ ├── opt_acluser.py
│ ├── opt_numberstrip.py
│ ├── opt_callforward.py
│ ├── opt_callpickup.py
│ ├── opt_huntgroup.py
│ ├── opt_voiceprompt.py
│ ├── opt_ivr.py
│ ├── opt_agents.py # Cinch Contact Center
│ ├── opt_agentgroups.py
│ ├── opt_queue.py
│ └── opt_siptrunkstatus.py # SIP Trunk Status tab
└── last_session.json # Auto-saved session parameters (gitignored)
The following are saved to last_session.json on exit and restored on launch:
- Server URL & username
- Group Name, Code, Max Calls
- SIP Host & Port
- Context & Permission Group Prefixes
- Inbound Ranges & Extension Range
- Htek model dropdown selection
| Symptom | Likely Cause |
|---|---|
| Login fails with SSL error | Server negotiates only weak TLS ciphers; client auto-uses an insecure SECLEVEL=0 context |
| Login shows HTML login page in the error | http:// was redirected to https:// mid-request; retry with https:// (or rely on auto-upgrade) |
| "RESTful auth/login not available" | Newer UC firmware has no RESTful login controller; web-session fallback is used automatically |
| Task stays yellow | Task is still running or the API is unresponsive |
| "Value not allowed" | Model name case — dropdown auto-uppercases; ensure valid model |
| No results in Optional Search | Keyword doesn't match group name or customer ID |
| "No Customer ID" in task | Run Task 1 (Group) first, or enter a matching group name |