HomeVICIdial TutorialsVICIdial Non Agent API TutorialsDeleting a Phone Number from a Filter Phone Group Using delete_fpg_phone API...

Deleting a Phone Number from a Filter Phone Group Using delete_fpg_phone API in VICIdial

Managing phone number filtering is essential for call centers, compliance teams, and outbound dialing operations. VICIdial provides the Filter Phone Groups (FPG) feature, which allows administrators to block or allow specific phone numbers based on predefined rules.

Sometimes, businesses need to remove a number from an FPG—for example, when a blacklisted number needs to be reinstated, when a customer re-opts into receiving calls, or when incorrectly filtered numbers need correction.

The delete_fpg_phone API allows administrators to remove a phone number from an FPG dynamically, ensuring that updates happen in real-time without manual intervention.

Why Use the delete_fpg_phone API?

Unblock mistakenly blacklisted numbers
Allow opted-in customers to receive calls again
Automate phone number filtering with real-time API updates
Ensure that filter lists remain accurate and up-to-date
Improve call connection rates by managing number filtering efficiently

In this tutorial, we will cover:
🔹 How the delete_fpg_phone 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 delete_fpg_phone API efficiently

Let’s get started! 🚀


Understanding the delete_fpg_phone API Function

The delete_fpg_phone API allows administrators to remove a phone number from a specific Filter Phone Group (FPG) dynamically. This ensures that numbers previously blocked, whitelisted, or otherwise filtered can be updated or removed as needed.

What Information Does the delete_fpg_phone API Require?

Filter Phone Group ID – The unique identifier of the FPG from which the phone number will be removed
Phone Number – The number that needs to be removed from filtering
Source – A custom identifier for tracking API calls

Common Use Cases for delete_fpg_phone API

🔹 Removing numbers that were mistakenly blacklisted
🔹 Reactivating previously blocked customers who now wish to be contacted
🔹 Keeping filter lists accurate and updated dynamically
🔹 Integrating real-time number filtering with external CRMs and compliance tools
🔹 Preventing over-restriction of outbound calls due to incorrect filtering


Step 1: Prerequisites for Using the API

Before using the delete_fpg_phone API, ensure you have:

VICIdial installed and configured
An API-enabled user account with administrative permissions**
A valid FPG ID that contains the phone number to be removed
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 delete_fpg_phoneto the **Allowed API Functions** (or set toALL`)
7️⃣ Click Save Changes

Now, your user is authorized to remove phone numbers from an FPG 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

arduino
http://your-vicidial-server/vicidial/non_agent_api.php

🔹 Replace your-vicidial-server with your actual VICIdial instance.

Required Parameters for delete_fpg_phone API

Parameter Description Example
function Specifies the API function (delete_fpg_phone) delete_fpg_phone
user VICIdial API username admin
pass VICIdial API password 1234
source Identifier for tracking API calls FPGRemoval
filter_phone_group_id The ID of the FPG where the phone should be removed BLACKLIST
phone_number The phone number to remove 18005551234

Step 3: Sending the API Request

Method 1: Removing a Number from an FPG via a Web Browser

Simply enter the following URL in your browser (replace credentials accordingly):

pgsql
http://your-vicidial-server/vicidial/non_agent_api.php?function=delete_fpg_phone&user=admin&pass=1234&source=FPGRemoval&filter_phone_group_id=BLACKLIST&phone_number=18005551234

🔹 Press Enter, and the API should remove the phone number from the specified FPG.


Method 2: Removing a Number from an FPG via cURL (Command Line)

For developers, cURL is a convenient tool for making API requests. Use the following command:

bash
curl -X GET "http://your-vicidial-server/vicidial/non_agent_api.php?function=delete_fpg_phone&user=admin&pass=1234&source=FPGRemoval&filter_phone_group_id=BLACKLIST&phone_number=18005551234"

🔹 This will return a confirmation message indicating the phone number has been removed from the FPG.


Method 3: Removing a Number from an FPG via Postman

1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL
4️⃣ Click Send
5️⃣ The response should display the confirmation message for the FPG update


Step 4: Understanding API Responses

If the request is successful, VICIdial returns a response confirming the phone number has been removed from the specified FPG:

vbnet
SUCCESS: 18005551234 | Removed from BLACKLIST

Breaking Down the Response

Response Value Meaning
SUCCESS The request was processed successfully
18005551234 The phone number removed from the FPG
BLACKLIST The FPG where the number was removed

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: PHONE NUMBER NOT FOUND The specified phone number is not in the FPG Ensure phone_number is correct
ERROR: NO FUNCTION SPECIFIED Missing function parameter Ensure function=delete_fpg_phone is included

Step 6: Best Practices for Using the delete_fpg_phone API

Ensure that numbers removed from an FPG are reviewed before reactivation
Log all FPG modifications for compliance tracking
Restrict API access to authorized users to prevent misuse
Verify customer intent before reactivating a number for calls
Integrate the API with CRM systems for automated FPG list management


Conclusion

The delete_fpg_phone API function is an essential tool for removing phone numbers from a Filter Phone Group dynamically in VICIdial. Whether you’re correcting errors, reactivating opted-in customers, or automating FPG list updates, this API provides a fast and efficient way to manage phone filtering rules.

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

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Special Offerspot_img

Must Read

spot_img
spot_img
spot_img

Related Articles - Must Read

spot_img