Call Outcomes

All installation and configuration problems and questions

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

Call Outcomes

Postby xmerlin » Thu Jan 18, 2007 11:05 am

Hi there,

We are having a little bit of a problem with calls that VICIDIAL is marking as NA once called. This includes calls such as Out of service; number not recieving incoming calls and disconnected numbers.

At present these calls are being marked in teh database as NA, and as such they are boing recycled and redialled, making the agents on certain campains extremely inefficient.

having looked at the PRI debug screen during calls, it loooks like the majority of these calls are being returned as code 31. Is there some way i can get tehse calls to be marked differently on teh database?

Thanks
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Thu Jan 18, 2007 12:33 pm

Take a look at the FastAGI_log script in the Local section for an example of how we automatically code BUSY calls.

What is the status that is returned with these code 31 calls?

Who is your provider?

What area are you calling mostly?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Mon Jan 22, 2007 7:48 am

Hi Matt,
I've had a chance to look at this a bit more closely now and also had a look through the FastAGI_log script, but i am not sure that this is actually being used by vicidial, as the sample CLI output below seems to be using the deprecated call_log.agi, VD_hangup.agi etc....


anyway, looking through VD_hangup.agi, i think (correct me if i'm wrong) the part dealing with the database update is this:

if ($dialstatus =~ /CHANUNAVAIL/) {$VDL_status = 'DC'; $VDAC_status = 'DISCONNECT';}

looking at the call below, i think it should have given the outcome code of DC rather than NA.

The Line is a straight BT line, but we are using a PRI box to screen teh calls for TPS and the calls are bing routed over CPS.



-- Executing MeetMe("Local/8600061@default-2e84,2", "8600061") in new stack
> Channel Local/8600061@default-2e84,1 was answered.
-- Executing AGI("Local/8600061@default-2e84,1", "call_log.agi|901603617588") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
-- AGI Script call_log.agi completed, returning 0
-- Executing Dial("Local/8600061@default-2e84,1", "zap/g1/01603617588|55|rtTo") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g1/01603617588
-- Channel 0/1, span 1 got hangup request
-- Hungup 'Zap/1-1'
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing Hangup("Local/8600061@default-2e84,1", "") in new stack
== Spawn extension (default, 901603617588, 3) exited non-zero on 'Local/8600061@default-2e84,1'
-- Executing DeadAGI("Local/8600061@default-2e84,1", "call_log.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
-- AGI Script call_log.agi completed, returning 0
-- Executing DeadAGI("Local/8600061@default-2e84,1", "VD_hangup.agi|PRI-----NODEBUG-----31-----CHANUNAVAIL----------") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/VD_hangup.agi
-- AGI Script VD_hangup.agi completed, returning 0
== Spawn extension (default, 8600061, 1) exited non-zero on 'Local/8600061@default-2e84,2'
-- Executing DeadAGI("Local/8600061@default-2e84,2", "call_log.agi|h") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
-- AGI Script call_log.agi completed, returning 0
-- Executing DeadAGI("Local/8600061@default-2e84,2", "VD_hangup.agi|PRI-----NODEBUG-----0---------------") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/VD_hangup.agi
-- AGI Script VD_hangup.agi completed, returning 0
== Manager 'sendcron' logged off from 127.0.0.1
localhost*CLI>


thanks for you help!
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Mon Jan 22, 2007 6:50 pm

You should be able to add CHANUNAVAIL and 31 into the Local section of the VD_hangup part of FastAGI_log script.

The call_log.agi scripts will probably be depricated in the 2.0.3 final release.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby mflorell » Mon Jan 22, 2007 6:59 pm

Here's a thread from the asterisk-users list from today on this subject:
http://lists.digium.com/pipermail/aster ... 78035.html
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Tue Jan 23, 2007 5:37 am

hi matt, thats for your reply,

do i need to do anything to get VICIDIAL using the FastAGI_log script? as it doesn't appear to be called in crontab etc...

thanks
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Tue Jan 23, 2007 2:55 pm

It doesn't go in the crontab, it's controlled by the keepalive_ALL script

For instructions on using the FastAGI_log, just look at the script header or the extensions.conf.sample file.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Wed Jan 24, 2007 9:23 am

hi matt, thaks for the pointers.

i've decided not to change the extensions.conf to use the FastAGI_log yet, but to try and change the VDhangup.agi, which as far as i can see is pretty much the same code anyway as far as the database updating goes.

anyway, i was hoping you would have a little look over what it is that we've done to make sure tehres nothing in there blaitantly wrong.

also, we were trying to figure out what the $VDAC_status variable was used to populate, jsut out of curiosity...


if ( ($PRI =~ /^PRI$/) && ($callerid =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) && ( ($dialstatus =~ /BUSY/) || ( ($dialstatus =~ /CHANUNAVAIL/) && ($hangup_cause =~ /^1$|^31$/) ) ) )
{
if ($dialstatus =~ /BUSY/) {$VDL_status = 'B'; $VDAC_status = 'BUSY';}


if ($dialstatus =~ /CHANUNAVAIL/)
{
if ( $hangup_cause == 31 ) {$VDL_status = 'C31'; $VDAC_status = 'CAUSE31';}
else if ( $hangup_cause == 21 ) {$VDL_status = 'TPS'; $VDAC_status = 'TPS';}
else {$VDL_status = 'DC'; $VDAC_status = 'DISCONNECT';}
}
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Wed Jan 24, 2007 10:59 am

That looks like it should work. Let me know how it goes.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Wed Jan 24, 2007 11:36 am

hi Matt,
I'm getting myself really confused here.
none of the changes i have made seem to be making the slightest bit of difference, its almost as if the VD_hangup.agi file isn't actually being called.

any ideas where it is i'm going wrong?

Thanks
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Wed Jan 24, 2007 11:44 am

Have you tried attaching to the FastAGI screen and watching the output as you try to call known BUSY or Disconnected numbers in VICIDIAL?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Wed Jan 24, 2007 11:50 am

i've set up a campaign with nothing but duff numbers in it.

when i attach to the ASTfastlog screen i dont get any output....
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Wed Jan 24, 2007 12:59 pm

Do you have call_log.agi anywhere in your extensions.conf?

If you do you need to replace them with the fastAGI command instead then reload Asterisk.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Fri Jan 26, 2007 11:17 am

Hi Matt,

well, moving everything over to FastAGI messed it all up and i was back to square one, so i put extension.conf back to using call_log.agi and VD_hangup.agi specifically.

so, changes are made and things now seem to be working properly, any chance you could have a look at the bits below and let me know if theres a chance i've damaged somethign i've not noticed? Thanks.

************************************************************

VD_hangup.agi - Line 258:

if ( ($PRI =~ /^PRI$/) && ($callerid =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) && ( ($dialstatus =~ /BUSY/) || ($dialstatus =~ /CONGESTION/) || ( ($dialstatus =~ /CHANUNAVAIL/) && ($hangup_cause =~ /^1$|^21$|^27$|^28$|^31$|^88$/) ) ) )
{
if ($dialstatus =~ /BUSY/) {$VDL_status = 'B'; $VDAC_status = 'BUSY';}
if ($dialstatus =~ /CHANUNAVAIL/) {$VDL_status = "DC:$hangup_cause"; $VDAC_status = 'DISCONNECT';}
if ($dialstatus =~ /CONGESTION/) {$VDL_status = 'TPS'; $VDAC_status = 'DISCONNECT';}

$stmtA = "UPDATE vicidial_auto_calls set status='$VDAC_status' where callerid = '$callerid';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAC update: |$affected_rows|$CIDlead_id"; &agi_output;}

$stmtA = "UPDATE vicidial_list set status='$VDL_status' where lead_id = '$CIDlead_id';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list update: |$affected_rows|$CIDlead_id"; &agi_output;}




************************************************************


AST_VDauto_dial.pl - Line 880:

if ($CLstatus =~ /DISCONNECT/)
{
}
else
{
$stmtA = "UPDATE vicidial_list set status='$CLnew_status' where lead_id='$CLlead_id'";
$affected_rows = $dbhA->do($stmtA);
}
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Fri Jan 26, 2007 11:40 am

When you say "messed it all up" what specifically was happening?

What was the FastAGI output when Disconnected calls came through?

I have not run the code, but it looks like it should work.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Fri Jan 26, 2007 12:16 pm

the call outcome code from FastAgi were all code 16 (normal call clearing) and i'd gotten too far with the previous code to start all over again and try to figure out where it was getting the clearing codes from...

below is a copy of the logs from one call:

2007-01-26 13:40:09|TEST_VDfastAGI|begin|+++++++++++++++++ FastAGI Start ++++++++++++++++++++++++++++++++++++++++
2007-01-26 13:40:09|TEST_VDfastAGI|begin|Perl Environment Dump:
2007-01-26 13:40:09|TEST_VDfastAGI|begin|0|--debug
2007-01-26 13:40:09|TEST_VDfastAGI|begin|URL HVcauses: |PRI|NODEBUG|0|||)|
2007-01-26 13:40:09|TEST_VDfastAGI|begin|AGI Environment Dump:
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- accountcode =
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- callerid = 0000000000
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- calleridname = V0126133956000054136
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- callingani2 = 0
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- callingpres = 0
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- callingtns = 0
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- callington = 0
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- channel = Local/901603698432@default-a259,2
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- context = default
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- dnid = unknown
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- enhanced = 0.0
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- extension = h
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- language = en
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- network = yes
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- network_script = VD_hangup--HVcauses--PRI-----NODEBUG-----0---------------)
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- priority = 2
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- rdnis = unknown
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- request = agi://127.0.0.1:4577/VD_hangup--HVcause ... ----------)
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- type = Local
2007-01-26 13:40:09|TEST_VDfastAGI|begin| -- uniqueid = 1169818797.3
2007-01-26 13:40:09|TEST_VDfastAGI|begin|AGI Variables: |1169818797.3|Local/901603698432@default-a259,2|h|Local|V0126133956000054136|
2007-01-26 13:40:09|TEST_VDfastAGI|VD_hangup|Process to run: |agi://127.0.0.1:4577/VD_hangup--HVcauses--PRI-----NODEBUG-----0---------------)|VD_hangup|END|
2007-01-26 13:40:09|TEST_VDfastAGI|VD_hangup|DEBUG: NODEBUG
2007-01-26 13:40:09|TEST_VDfastAGI|VD_hangup|VD_hangup : V0126133956000054136 Local/901603698432@default-a259,2 2 54136
2007-01-26 13:40:09|TEST_VDfastAGI|VD_hangup|-- VD_hangup Local DEBUG: |PRI|V0126133956000054136||0|
2007-01-26 13:40:09|TEST_VDfastAGI|VD_hangup|+++++ VDAD START LOCAL CHANNEL: EXITING- 2
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm

Postby mflorell » Fri Jan 26, 2007 12:21 pm

That interesting, because the code is the same as VDhangup, it's just in the form of a server not a standalone AGI script. We have been using it for over a month on over 14 servers on PRIs with no issues.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby xmerlin » Fri Jan 26, 2007 12:29 pm

wierdness, i wonder if it could be our TPS checking box thats done that...

it also looks like our code changes have unsettled several other things, call_log and vicidial_list now have a 2 second difference in tehm on call times. i'll let you know if/how we manage to fix it.

for now though, its friday evening and i need to do as the monty pythons and runawayyyy...
xmerlin
 
Posts: 48
Joined: Thu Oct 12, 2006 2:17 pm


Return to Support

Who is online

Users browsing this forum: dlbaron and 78 guests