Dynamic Routes Example configuration

From voipsupport
Revision as of 14:20, 13 June 2016 by John (talk | contribs) (John moved page Example configuration to Dynamic Routes Example configuration without leaving a redirect)
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.

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
use customer
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

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

Field name Value
Dynamic Route Name Customer priority
Dynamic Route Description Sets the priority of callers before sending them to a queue
Enable DTMF Input No
Announcement None
Timeout blank
Validation blank
Invalid Retries blank
Invalid Retry Recording None
Invalid Recording None
Invalid Destination Do not set this value
Saved input varibale name None
Saved result variable name None
Source Type MySQL
MySQL hostname localhost
MySQL database customer
MySQL username dr_user
MySQL password xxxxxxxx
MySQL query SELECT priority FROM customer_priority WHERE callerid like '%[NUMBER]'
Default Destination Queue: Customer Service
Dynamic Route Entries Match: top; Destination: Queue Priorities - Top Priority Customers
Match: normal; Destination: Queues - Customer Service

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.