How to identify extension in queue calls recording

Hi all,

I am facing little difficulty in identifying a call basically landing on my queue but I want to know which extension actually answered that call. forexample; a call on queue rings 10 extensions and one answered that call so in CEL table I can see which Extension actually answered that call but in recording folders I can only see “q-3088-+12185139788-20200303-093106-1583245865.1231718.wav”

In CDRs we can see call landed on a queue but can not identify by which extension it answered by.

Is there any way that I can get that data who answered the call.

I need this record for AI contact center in which we can analyse the calls with respect to emotions and etc.

The ‘uniqueid’ 583245865.1231718 is the link to use embedded in the filename and available in both cel and cdr tables

Hi Dicko,

if it’s only for one call it’s good we can check from CEL and CDRs but I need a report on 5000 calls and get the recordings from the system. for AI contact center I need to collect information in CDRs metadata as follow:
src and dst fields.

But in queue calls we only get record with q-3033-

so this will not clarify which extension answer the call.

That’s what sql queries can fix ;-’)

do you think I can edit sql queries for this

It is possible, Something like

for i in $(find /var/spool/asterisk/monitor/  -mtime -1  -name q*.wav); do UNIQUEID=$(echo $i|cut -d '-' -f6 |cut -d '.' -f 1,2); mysql asteriskcdrdb -e "select * from cel where uniqueid='$UNIQUEID' and eventtype='CHAN_START'";done

Should get you going

1 Like

what I have to do.
Should i edit any file or what.
Where can I use this query?
Any guidelines for this whole implementation?

it is a ‘shell lscript’ you call from any ‘shell’

I’m afraid you will have to find someone with a minimal comfort level in bash and mysql.

Is this going to change all the code or just print me the data as an output.

and if this will change the code of the current system then how it affects the system any affect on the system level.

…eh? yeah. That’s why you need to find some one with a little more understanding.

Rule 1) Only do things you do understand, (as a hint, this script is read only)
Rule 2) Find a way so Rule 1 is not needed.

1 Like

I have to do this.

can we make changes to the code so the files will be saved with answering agent name ? or is there any way that call will be recorded separate for Queue and separate for agent.

So i have two recording files at the same time. I have no issue with this.

I can’t think of a way to do this within the system, mostly because the agent name isn’t part of the call data…

Spitballing, add a hangup handler to the channel, the recording filename and answering agent are both saved in channel variables which you can find with DumpChan. Create a copy of the file with the desired filename.

then how are we archiving recording files for extension to extension and outbound as these files are stored with Source and Destination Number.

and this is what we want.

because you are recording the Queue, you can extract what the Queue was bridged to with

for i in $(find /var/spool/asterisk/monitor/ -size +1  -mtime -1  -name q*.wav); do UNIQUEID=$(echo $i|cut -d '-' -f6 |cut -d '.' -f 1,2); echo -en "$i\t"; mysql -sN asteriskcdrdb -e "select peer from cel where uniqueid='$UNIQUEID' and eventtype='BRIDGE_ENTER'"|sed -e 's/@.*//' -e 's|Local/||';done

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.