DID Management Scripts¶
Admin scripts for assigning and managing DIDs on the OSS VPS.
Admin Only
These scripts run on the OSS VPS (185.252.235.208). Contributors do not have SSH access -- they email cats@astradial.com to request a DID.
Scripts Location¶
/opt/astradial-oss/scripts/
├── assign-did.sh # Assign DID to developer org
├── list-dids.sh # List all assigned DIDs
└── remove-did.sh # Remove DID from org
assign-did.sh¶
Assigns a DID to a developer's organisation. Updates the database, deploys Asterisk config, and pushes routing to the NUC.
# Usage
/opt/astradial-oss/scripts/assign-did.sh <DID> <ORG_ID>
# Example: assign +91-22-XXXX-XXXX to org 5
/opt/astradial-oss/scripts/assign-did.sh 912240001234 5
What it does:
- Inserts DID record into
astradial_ossdatabase - Generates Asterisk dialplan for the DID
- Reloads Asterisk config
- Pushes routing rule to NUC (
exten => DID,1,Dial(PJSIP/DID@oss_trunk_endpoint,30))
list-dids.sh¶
Lists all currently assigned DIDs with org info.
# Usage
/opt/astradial-oss/scripts/list-dids.sh
# Output example:
# DID | Org ID | Org Name | Assigned
# 912240001234 | 5 | dev-contrib-1 | 2026-04-13
# 912240005678 | 8 | test-org | 2026-04-10
remove-did.sh¶
Removes a DID assignment from an organisation. Cleans up database, Asterisk config, and NUC routing.
# Usage
/opt/astradial-oss/scripts/remove-did.sh <DID>
# Example
/opt/astradial-oss/scripts/remove-did.sh 912240001234
What it does:
- Removes DID record from database
- Removes Asterisk dialplan entry
- Reloads Asterisk config
- Removes routing rule from NUC
Manual Process¶
The end-to-end flow for DID assignment:
- Developer emails
cats@astradial.comwith org name and DID request - Admin picks an available DID from the pool
- Admin SSHs into OSS VPS and runs
assign-did.sh <DID> <ORG_ID> - Admin confirms the DID is routable (test call)
- Admin replies to developer with DID number and setup confirmation