Call duration - DeadAGI behavior.

All installation and configuration problems and questions

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

Call duration - DeadAGI behavior.

Postby LICEBMI » Mon Feb 24, 2014 10:59 am

Hello. I'm trying to understand the predictive call procedure. I'm trying to make a reliable cdr, I checked my call_log table and I found weird numbers, I enabled the cdr module and I got the same numbers. Apparently the call duration reports only untill the call is answered, still every manual call show's the right duration.
Reading the asterisk log, I found out what it appears to me, an unexpected behavior. Whenever the call goes to the conference with the agent, h extension is called and it write (with deadagi) to the call_log table and to the cdr log the call duration until said event. I'm wondering if this is normal and I'm supposed to parse the file so I can get the right duration.

Anyway, I'm using a clean install of vicibox 4
VERSION: 2.8-410a
BUILD: 130824-2319
asterisk 1.4.44

my dialplan is
exten => _X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _X.,n,Dial(sip/${EXTEN}@carrier,,tTo)
exten => _X.,n,Verbose(1,">>>|${UNIQUEID}|${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)}|${EXTEN}|carrier|${DIALSTATUS}|${SIPURI}")
exten => _X.,n,Hangup

I'm sorry if this question has been answered before, I searched for it but couldn't find any information.
LICEBMI
 
Posts: 2
Joined: Mon Feb 24, 2014 10:31 am

Re: Call duration - DeadAGI behavior.

Postby williamconley » Mon Feb 24, 2014 3:49 pm

Any information you can try to save in the CDR should already be in a log table in Vicidial.

Also, HOW did you enable the cdr module, where are you writing the data, and what data are you writing.

Note that when Vicidial pushes a call into the meetme conference the original call IS terminated and a masqueraded channel is used to switch the prospect's call into the meetme room. This is a function of the magic of Vicidial. Consider that the call has already been initiated, sound is already active, and there are already two legs (bridged) before the logic in Vicidial finds an agent (especially if there were none available when the call answered and it took 1 or 2 seconds to get a free agent). So now Vicidial has to break this existing call and somehow generate a conference "instantly" upon finding an agent. The method they use causes this odd behavior when entering the meetme room. I don't remember if it's part of meetme or something else, but it's required to make the system work.

However, that call should also be logged to the CDR if done properly.

But really you should not need any of it if your information is already available in a Vicidial log.

Also: BOTH legs of that outbound call should be in the CDR, and only one of them is terminated during the switch to the meetme. The other should still be there and should show full length if you're CDR is working properly.

Of course, I haven't done this in a while (we use Vicidial logs ...) so my memory may be a bit off. :)
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: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Call duration - DeadAGI behavior.

Postby LICEBMI » Mon Feb 24, 2014 6:48 pm

I'm currently using the raw csv log with all it's fields. I was trying to use the csv CDR instead of vicidial log in case someone could get direct SIP access to the server instead of dialing with vicidial.

This is currently my mapping
Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})}

And I'm getting this kind of output (actual data masked).
"clid","src","dst","default","channel","dstchannel","Dial","lastdata","2014-02-24 09:13:34","2014-02-24 09:13:53","2014-02-24 09:13:54","20","1","ANSWERED","DOCUMENTATION","","1393254814.30",

As I said, all I'm getting is the time until CDP says someone answered.
Then I'm going to search for that other leg.
Thanks.
LICEBMI
 
Posts: 2
Joined: Mon Feb 24, 2014 10:31 am

Re: Call duration - DeadAGI behavior.

Postby williamconley » Sat Mar 01, 2014 11:05 pm

Note that if someone dials through your vicidial server directly (non-campaign), this call will be treated just like a phone dialing through "admin->Phones". These calls are logged also.

To connect to and dial through an asterisk server, two things are required:

1) Permission to dial: This is generally a sip account but can also be an IAX2 account or any one of several others that are more arcane and usually not active. It is possible to dial on an "anonymous" account if it is actually turned on (which it should not be, of course, in a Vicibox or Goautodial system).
2) Path to dial: The call is generally executed as an extension and will be executed from the extension context to which your sip account is assigned. In Vicidial this is ordinarily "default". To dial out, you must request an extension and that extension's dialplan must lead to an outside carrier to complete a call. This usually entails executing the "carrier's" diaplan exten, which includes the Vicidial agi line ... which logs the call. Of course, if you do not have a standard setup, you could have a carrier without the agi line and calls would then be incognito, but that would require a special setup.

So ... to test your Master.csv file: Make an outbound call directly from an agent phone after hours and see how that looks in your "Master.csv" file as that will be the same treatment as a rogue call from an intruder who manages to register to a phone account. Then check your Vicidial logs and you'll see it appears there as well.

And look here for a lockdown method (install full DGG for an easy-to-manage locked down system, but the lockdown instructions for DGG have proven quite secure so far): http://www.viciwiki.com/index.php/DGG
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: 20258
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 102 guests