Call affinity

Status
Not open for further replies.

greychain

Gold Partner
Advanced Certified
Joined
Jul 13, 2018
Messages
779
Reaction score
122
I have a customer that would like call affinity. So that if an agent makes an outgoing call to a customer but the call is not answered then when the customer calls back it will be routed to the agent that made the call.

I'm guessing I can do it in a call flow app but is there any other way to do it.
 
This would require both a service and a Call Flow Designer (CFD) application. The service would either need to monitor the 3CX Call Control API in real-time or parse the optional CDR files to track outgoing calls. The service would have to capture the extension that made the outbound call, and the number dialed. You would likely want to include an expiration date too.

On the inbound side, you would need a CFD application that looks up the caller's number in the outbound call list to determine who called most recently. But you might also want to check whether the agent is available prior to routing the call. If the agent is not available, or there is no table entry, the call would be routed to the default extension.

The service could also periodically purge the table of any expired entries.
 
I was thinking along those lines. Probably be a bit of a lazy way, for every CDR write a call file. Then have a PHP app that is triggered by iNotify to put it into a seperate Postgres table which I can then access thru CFD. But good idea about checking extension availability.

A seperate cron job to purge the records older than X days.
 
Not a good idea to try to install PHP on the server.

Luckily a simple manual reinstall of 3CX got it back up.
 
I would NOT recommend tinkering with the 3CX PostgreSQL database even if you are using your own tables. 3CX support gets very concerned when you make any changes to their operating environment. It makes troubleshooting any 3CX issues far more complex.

iNotify simply does not work reliably in my experience. Further, it has some significant limitations and requires a ridiculous amount of RAM (nearly 1kb per file). It might work for this purpose since you are purging the file list as they are processed, but I've been pretty displeased with iNotify.
 
Thanks for the advice. I was wondering about how 3CX would react using the Postgres. Can you suggest an alternative to inotify? Incrond?
 
I should clarify. I'm a .Net programmer and .Net Core 2.2 had a bug where the filesystemwatcher (which uses iNotify in the background) didn't work reliably. .Net 3.1 seems to work better. The two main issues with iNotify are (1) by default it will only watch a little over 1,000 files. You can change this setting, but (2) it requires way too much RAM for each file that is monitored.

In your case, using iNotify may be OK because you are going to purge files after you have processed them, so presumably, you won't have to monitor many files. This became a problem for us when monitoring 3CX servers with millions of recordings.

The alternative is to poll the folder on a timed basis.
 
I'd be purging the files as they are processed into the database. So a seperate VM/container php ,mariadb & CFD. Makes it easy to deploy and secure.

Thanks for advise.

Also signed up to be a rerseller for VOIP tools.
 
Status
Not open for further replies.

Forum statistics

Threads
111,940
Messages
589,850
Members
164,830
Latest member
business@brightwaylogisti