Dynamic Routes Example configuration

From voipsupport
Revision as of 10:11, 13 June 2016 by John (talk | contribs)
Jump to navigation Jump to search

Set the queue priority of callers, allowing "top" customers to receive a faster answer

Use case

Your customer help line has a single queue for calls. However, your customer database allows to identify the importance of customers. You would like to give a better level of service to some customers, so that their calls are answered on a priority basis.

This makes use of the queue priorities functionality. See here for details.

Database

In this example priority callers will be identified by their phone number (callerid column). The lookup will be configured to return the value from the priority column. A lookup value of "normal" will not change the queue priority. A lookup value of "top" will be used to set a priority of 1. Higher priority callers are answered before lower priority callers, so customer with a "top" priority will be answered before customers with a "normal" priority.

callerid priority
12345678 normal
23456789 normal
34567890 top


The dynamic routing module does not actually create the database, table, user to access the database or grant permissions. These are assumed to existing already. If you need help setting up please follow this example. xxxx

Let's assume that you have created a table caller "customer_priority" in database "customer" and it has the columns "callerid" and "priority" as in the above table. Your sql lookup would be

SELECT priority FROM customer_priority WHERE callerid like '%[NUMBER]'

Dynamic Routes will substitute the [NUMBER] symbol for the incoming callerid if one is present.

We will also assume that the database is located on the localhost and that there is a user of "dr_user" and password "xxxxxxxx". If possible you should verify that you can connect to the database and execute a select query on the table, for example:

mysql -u dr_user -p xxxxxxxx
SELECT * FROM customer_priority;

Setup Instructions

1. It is assumed you already have a queue called "Customer Service". Set up a new Queue priority with a value of 1 to make it higher than the default value of 0

Queue priority page.png

2. Setup a dynamic route in Freepbx (Menu Applications -> Dynamic Routes) with the following details:


It is always advisable to define a default destination. This will be used if the lookup fails or returns and unknown result. If you don't define a default destination the default behaviour is to disconnect the call.

Here is a screen shot of the Dynamic Route configuration:

3. Instead of setting your incoming route to the Customer Service Queue, set it to the Dynamic Route.

4. Make some test calls to try the configuration.