• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Detect if a caller is first time in queue

Status
Not open for further replies.

mbau

Customer
Joined
Sep 28, 2017
Messages
14
Reaction score
1
Hi,

It gives a possibility to detect if a call is the first time in a CFD queue?

Background: i created for every extension a queue. If a caller arrive the first time and the extension is busy, the call go after 10 seconds on a queue "ring all". If the caller want be connected anyway with the busy extension, he goes in the queue of this extension. Coz this i need to know if the caller arrive first or second time in this queue.
 
Hello @mbau,

In your CFD app you have the variable "session.ani" which contains the number of the caller. You can save this information for example in a database, so you later query the database and if the same number was connected to this extension X seconds ago, then you consider it the second time, otherwise you consider it the first time...

Kind regards.
 
Thanks for the fast reply.

But to use the number of the caller is not a very exact science.

Is there not a variable which i can increase per call or a unique identification per call that i can use?
 
Unfortunately you don't have a unique Call ID available. Every time the call arrives to the CFD app, a new call ID is assigned, so you can't correlate it with the previous time of the same call... I understand that the caller number is not 100% guaranteed to be unique, but I don't know about any other option...
 
Is it possible to see with the variable "session.ani" if the call arrive direct from extern or was redirected by an internal extension?
 
Yes, you have another variable: session.transferingExtension

This variable tells you which internal extension is transfering the call to the CFD app. In case the call is coming directly from outside, then it will have an empty string. So you can use the expression:
EQUAL(session.transferingExtension,"")

If that expression returns true, the call comes from outside, otherwise it's being transfered from an internal extension.
 
I like this project... now if you could get the Queue/CFD to announce the call over the paging system "John Smith, you have a call holding on Park 1" that would be awesome.
 
@edossantos: I understand correct that the variable "session.callid" is unique per call? In the description i found the following:

session.callid: the unique 3CX Call ID. You can use this value to match information in 3CX CDRs.

I did a short test and connect the same (external) call several times with a voice app queue, it looked like the callid stay the same.
 
Hello @mbau,

Yes, the callid will be the same every time you receive the same call. However, the ID is not totally unique. The ID counter is restarted when the 3CXQueueManager service is restarted. So, for example, you can have this:
- You receive a first call with session.callid = 1
- You receive a second call with session.callid = 2
- You receive a third call with session.callid = 3
- The 3CX Queue Manager service is restarted
- You receive a fourth call and the session.callid will be 1 again

So, if you find the callid in your records, you can't be sure that it's not from a previous run of the service... You would need some timestamp as well, so you can discard old records, assuming that a call will not take longer than X minutes for example...

Kind regards.
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,405
Messages
747,493
Members
144,370
Latest member
Imperial Treasure
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.