An even more advanced way to route your incoming calls is using our Dynamic Destinations add-on module. This is a free add-on module you can install in your VitalPBX installation. Once the add-on is installed, you can go to PBX > Applications > Dynamic Destinations.

You can create multiple Dynamic Destinations, so you need to enter a Description to identify this dynamic destination. Dynamic destinations will query either a MySQL database or an HTTP/HTTPS request with a URL. Depending on the Source Type you choose, the required fields will appear so you can perform your connection and query.
A sample MySQL query can be as follows.
select ‘VIP_CUSTOMER’ as `response` from `customers` where `number` = ‘[CIDNUM]’
You can use the [CIDNUM] variable to add the Caller ID Number to your query. Depending on the Response, you can choose a Destination.
You can then use the Dynamic Destination as a destination for any module, for example, an inbound route.