Managing Direct Inward Dialing (DID) numbers effectively is essential for handling inbound calls, ensuring proper call routing, and optimizing call center performance. VICIdial, a leading open-source call center solution, allows administrators to modify DID settings dynamically using the update_did
API.
The update_did
API enables businesses to change call routing, update descriptions, activate or deactivate DIDs, modify assigned campaigns, and adjust voicemail or IVR settings, all without manually updating the VICIdial admin panel.
Why Use the update_did
API?
✅ Modify DID settings in real-time
✅ Automate call routing adjustments without manual configuration
✅ Enable or disable DIDs as required
✅ Update call handling settings for inbound campaigns dynamically
✅ Integrate DID updates with external CRM or telephony systems
In this tutorial, we will cover:
🔹 How the update_did
API works
🔹 How to configure and authenticate API access
🔹 How to construct and send API requests
🔹 Examples using a browser, cURL, and Postman
🔹 How to interpret API responses and troubleshoot errors
🔹 Best practices for using the update_did
API efficiently
Let’s get started! 🚀
Understanding the update_did
API Function
The update_did
API allows administrators to modify settings for an existing DID dynamically. This helps in real-time call routing adjustments, campaign optimization, and CRM integration.
What Information Can Be Updated Using update_did
API?
✔ DID Description – Change the description for better identification
✔ DID Active Status – Enable (Y
) or disable (N
) the DID
✔ DID Route – Define where calls will be routed (AGENT
, CALLMENU
, VOICEMAIL
, etc.)
✔ Assigned Campaign – Assign or change the campaign linked to the DID
✔ User ID or Group ID – Route calls to specific agents or groups
✔ Voicemail Box – Assign or update the voicemail extension
✔ Call Recording – Enable (ALLCALLS
) or disable (NEVER
) call recording
Common Use Cases for update_did
API
🔹 Temporarily disabling DIDs for maintenance or business hours adjustments
🔹 Modifying call routing dynamically based on workload or availability
🔹 Redirecting inbound calls to new campaigns or call menus
🔹 Enabling or disabling voicemail for specific DIDs
🔹 Automating DID updates based on external CRM or call flow rules
Step 1: Prerequisites for Using the API
Before using the update_did
API, ensure you have:
✅ VICIdial installed and configured
✅ An API-enabled user account with administrative permissions**
✅ A valid DID number that already exists in VICIdial
✅ VICIdial server access credentials
How to Enable API Access in VICIdial
1️⃣ Log in to the VICIdial Admin Panel
2️⃣ Navigate to Admin > Users
3️⃣ Select the user who will access the API
4️⃣ Set API Access to 1
(Enabled)
5️⃣ Set User Level to 8 or higher** (Admin-level access) 6️⃣ Add
update_didto the **Allowed API Functions** (or set to
ALL`)
7️⃣ Click Save Changes
Now, your user is authorized to update inbound DID settings dynamically using the API.
Step 2: Constructing the API Request
The VICIdial API uses HTTP GET requests, meaning you can access it via a browser, cURL, or API tools like Postman.
Base API URL
🔹 Replace your-vicidial-server
with your actual VICIdial instance.
Required Parameters for update_did
API
Parameter | Description | Example |
---|---|---|
function |
Specifies the API function (update_did ) |
update_did |
user |
VICIdial API username | admin |
pass |
VICIdial API password | 1234 |
source |
Identifier for tracking API calls | DIDUpdate |
did_pattern |
The DID number to update | 18001234567 |
did_description |
(Optional) New description for the DID | Customer Support Line |
did_route |
(Optional) New call destination (AGENT , CALLMENU , etc.) |
AGENT |
user_id |
(Optional) Route calls to a specific agent | 1001 |
group_id |
(Optional) Assign the DID to a call group | SALES_TEAM |
voicemail_ext |
(Optional) Assign a voicemail box | 8500 |
did_active |
(Optional) Enable (Y ) or disable (N ) the DID |
Y |
recording |
(Optional) Enable (ALLCALLS ) or disable (NEVER ) call recording |
ALLCALLS |
Step 3: Sending the API Request
Method 1: Updating a DID via a Web Browser
Simply enter the following URL in your browser (replace credentials accordingly):
🔹 Press Enter, and the API should update the DID settings.
Method 2: Updating a DID via cURL (Command Line)
For developers, cURL is a convenient tool for making API requests. Use the following command:
🔹 This will return a success message confirming the DID update.
Method 3: Updating a DID via Postman
1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL
4️⃣ Click Send
5️⃣ The response should confirm the DID update
Step 4: Understanding API Responses
If the request is successful, VICIdial returns a response confirming the DID was updated:
Breaking Down the Response
Response Value | Meaning |
---|---|
SUCCESS |
The request was processed successfully |
18001234567 |
The updated DID number |
DID Updated Successfully |
Confirmation message |
Step 5: Handling Errors & Troubleshooting
Error Message | Cause | Solution |
---|---|---|
ERROR: USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION |
Insufficient API permissions | Ensure user level is 8+ and API Access is enabled |
ERROR: INVALID USERNAME OR PASSWORD |
Wrong credentials | Verify API username and password |
ERROR: DID PATTERN NOT FOUND |
The DID does not exist in VICIdial | Ensure did_pattern is correct |
ERROR: NO FUNCTION SPECIFIED |
Missing function parameter | Ensure function=update_did is included |
Conclusion
The update_did
API function is an essential tool for modifying inbound DID settings dynamically in VICIdial. Whether you’re changing call routing, updating descriptions, enabling/disabling DIDs, or adjusting call recording settings, this API provides a fast and efficient way to manage inbound call handling.
Feel free to contact us or simply start a live chat to get connected to one of our team members. Here is our contact information.
Calling from US: +1 954-990-0053
Email: office@callix.ai