DB based info for caller priority into queue

We’ve a database of customers, ran under PHP/MySQL. Every time one of them call us, he or she is serviced by one of our agents. They run an Elastix based inbound call-center, that allow us embeed a web app we designed for this. Web app is triggered when the call is sent out the queue to the agent.

Every time a customer calls, we record some customer order info and increment a calls counter field in the customer’s record in the DB. We’d like to give queue priority to those -VIP- customers whom have a larger number of calls (orders), over the ocassionally callers.

We want to be able to:

  1. get the caller id in PBX
  2. run some kind of (asterisk/freepbx ??) app/script, querying for customer’s record in DB and getting his/her number of calls (orders)
  3. Set the priority (increase it) based on the number of calls
  4. Proceed to queue the call (to a common or to a prioritized queue, whatever).
  5. Be the customer served before the others.
  6. Trigger our own app from elastix, when agent gets free, and collect new order…

I appreciate any help on this. May be someone may point me into the right direcion.

Thanks, regards.
Fabio

I think the right direction would be Elastix, we can’t support it as it dosn’t use a supported or legitimate version of FreePBX.

Sorry. Didn’t kown it.
Out of elastix, would be possible to get something like I described in FreePBX ?

Thanks for your answer.

Not directly, FreePBX is a PBX, you need a CallCenter, there are several that interface with FreePBX’s built in PBX functionality.

All of this would be custom development. Regardless of which umbrella you go under you will need someone who knows Asterisk and mysql at a minimum Plus whatever language you want everything in. All of this is possible but my guess is it won’t be cheap.

Tahnk you both, for your clear answers.
Best regards

Caller ID Superfecta will pull cnam from remote databases using the Database module. Dynamic Routing will direct inbound calls based on the result of a MySQL lookup. Assigning a queue priority would require a bit of code, but separating callers into two queues would be straight forward.