outbound call CDR info

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

outbound call CDR info

Postby tarikzz » Tue Aug 14, 2018 4:06 am

Hello,

Having some bugs with an old GoAutodial running Vicidial 2.9, I finally just installed a fresh Vicibox 8.0.1.

A short version of my problem: how to retrieve CDR information about a transferred call and how to link it to his main incoming call CDR information?


And some details :
We receive only incoming calls, and some of them are transferred to external phone numbers via a carrier I configured.
But I cannot find any information about the transferred call in the database, where can I get this information?

For each incoming call, I need to know if it has been transferred, and if so, to what number, the length of the transferred call, the agent who made the transfer ... And most important, I need to be able to link this outgoing CDR information to the main incoming CDR.

I made a whole mysqldump right after the transfer, looking for the number i just transferred to, but that number appears only once in the database, in vicidial_manager table which just logged the Originate command.

Any help would be highly appreciated

Thank you
Linux vicibox8 4.4.140-62-default #1 SMP Tue Jul 17 12:14:34 UTC 2018 (951943d) x86_64 x86_64 x86_64 GNU/Linux
Asterisk 11.25.3-vici
Maria DB 10.2.16-MariaDB-log. Apache/2.4.23 (Linux/SUSE) PHP 5.5.14
RAM 32G
CPU x8 3.50GHz
tarikzz
 
Posts: 22
Joined: Sun Apr 15, 2018 8:02 am

Re: outbound call CDR info

Postby mflorell » Tue Aug 14, 2018 5:09 am

We usually recommend logging calls like this with the agi-NVA_recording.agi script in a custom dialplan entry so that specific call log entries are created just for those calls:


# agi-NVA_recording.agi version 2.12
#
# This script is designed to give recording ability to agents not the using
# ViciDial agent screen
#
# ; 1. logging output (NONE|STDERR|FILE|BOTH)
# ; 2. the ViciDial user ID, if empty it defaults to accountcode(usually phone extension) or vicidial_live_agents user who launched the call
# ; 3. log this call in user_call_log (Y|N) default N
# ; 4. log this call in call_log (Y|N) default N, ONLY NEEDED FOR INBOUND AND INTERSYSTEM CALLS!!!
# ; 5. audio record this call (Y|N) default N
# ; 6. double-log this call in call_log (Y|N) default N, ONLY NEEDED FOR INBOUND CALLMENU FORWARDED CALLS!!!
# ; 7. play the recording ID of this call before recording starts
# ; 8. include the recording ID in the filename
# ; 9. search vicidial_list for phone number dialed (Y|N) default N, assumes 10 digit phone numbers
# ; 10. if 9 is Y, this is search method (ALLLISTS|PHONE) default ALLLISTS, search all lists, use phone setting, CURRENTLY DOES NOTHING
# ; 11. error out and end call if phone number is not found (Y|N) default N
# ; 12. run the phone entry's NVA Call URL (Y|N) default N
# ; 13. if 9 is Y, and phone number is not found, insert into phone's NVA List ID (Y|N) default N
# ; 14. if 13 is Y, override phone's NVA List ID with this list ID when lead is inserted
# ; 15. if 13 is Y, override phone's NVA Phone Code with this phone code when lead is inserted
# ; 16. if 13 is Y, override phone's NVA Status with this status when lead is inserted
#
#
# ;custom dialplan entry example: (similar to the defaultlog Call Menu)
#exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---N---Y---N---N---N)
#exten => _X.,n,Goto(default,${EXTEN},1)
#exten => _X.,n,Hangup
#
# ;inbound to agent example:
#exten => 5678,1,AGI(agi-NVA_recording.agi,BOTH------Y---Y---Y---N---N---N)
#exten => 5678,n,Goto(vicidial-auto,5678,1)
#exten => 5678,n,Hangup
#
# ; example of dial prefix of 94 in System Settings Custom Dialplan to default log
#exten => _941NXXNXXXXXX,1,Goto(defaultlog,9${EXTEN:2},1)
#
# ; example of using as Call Menu prompt to record with playing of recording id
#agi-NVA_recording.agi,BOTH------Y---N---Y---N---Y---Y
#
# ; example of using as Call Menu prompt to record, search for phone number, run NVA call URL and error if not found
#agi-NVA_recording.agi,BOTH------Y---N---Y---N---N---N---Y---ALLLISTS---Y---Y
#
# ;custom dialplan entry example: (similar to the defaultlog Call Menu) with NVA options
#exten => _X.,1,AGI(agi-NVA_recording.agi,BOTH------Y---N---Y---N---N---N---Y---ALLLISTS---N---Y---Y)
#exten => _X.,n,Goto(default,${EXTEN},1)
#exten => _X.,n,Hangup
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: outbound call CDR info

Postby tarikzz » Thu Aug 16, 2018 12:51 am

Thank you so much for this, it’s exactly what I needed.

After activating this AGI in my custom dial plan, and enabling the 6th option for doublelog, The DOUBLELOG line is now inserted in the call_log table, with all the details about the transferred call.

However, I also need the start and end time of the main incoming call, from the moment when the server Answers() and put the call in the queue, till the moment the call is transfered)

I can see that line in call_log table but most of the time we have start_time = end_time = 0 (or 1)

Is there a specific way to update the end_time of the main incoming call, updating it to the time of the client final Hangup OR to the time of the transfer ?

Or maybe this information already exists somewhere else and can be linked thanks to the uniqueid ?
Linux vicibox8 4.4.140-62-default #1 SMP Tue Jul 17 12:14:34 UTC 2018 (951943d) x86_64 x86_64 x86_64 GNU/Linux
Asterisk 11.25.3-vici
Maria DB 10.2.16-MariaDB-log. Apache/2.4.23 (Linux/SUSE) PHP 5.5.14
RAM 32G
CPU x8 3.50GHz
tarikzz
 
Posts: 22
Joined: Sun Apr 15, 2018 8:02 am

Re: outbound call CDR info

Postby tarikzz » Thu Aug 16, 2018 1:06 am

Okey got it ! vicidial_closer_log table contain the detailed information of the main incoming call, which can be linked to call_log (containing the transfered call info in a doublelog line) via the uniqueid
Linux vicibox8 4.4.140-62-default #1 SMP Tue Jul 17 12:14:34 UTC 2018 (951943d) x86_64 x86_64 x86_64 GNU/Linux
Asterisk 11.25.3-vici
Maria DB 10.2.16-MariaDB-log. Apache/2.4.23 (Linux/SUSE) PHP 5.5.14
RAM 32G
CPU x8 3.50GHz
tarikzz
 
Posts: 22
Joined: Sun Apr 15, 2018 8:02 am

Re: outbound call CDR info

Postby williamconley » Thu Aug 16, 2018 3:35 pm

tarikzz wrote:Okey got it ! vicidial_closer_log table contain the detailed information of the main incoming call, which can be linked to call_log (containing the transfered call info in a doublelog line) via the uniqueid

Good post back. Very cool for the next guy with this same question. Well done. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 82 guests