Page 1 of 1

Issue with pause codes

PostPosted: Mon Feb 26, 2018 1:21 am
by Jitin
Hello Team,

Asterisk version : 11.22.0
vicidial version : 2.14
OS : centos 6.9
It is a scratch install.

In campaigns, I have enabled pause code = Force
When an agent clicks on pause , sometime pause codes doesn't come up.
It gives a message in alert box :- "CHECK FOR CALL RUNNING. PLEASE WAIT : 1" and then directly goes on pause without asking for any pause codes.
This hampers the agents break report.

Any solution for the same.

Re: Issue with pause codes

PostPosted: Mon Feb 26, 2018 6:55 pm
by mflorell
How frequently does this happen in a day?

What is the version and build of vicidial.php that you are using?

Re: Issue with pause codes

PostPosted: Tue Feb 27, 2018 12:00 am
by Jitin
This happens a lot. I have tried with multiple installations as well. I believe this issue is there in vicidial.
you can use a test camp, put pause code on force and then login an agent on that camp. click on pause and resume few times and you will get the issue.

VERSION: 2.14-588a
BUILD: 170211-1041

Re: Issue with pause codes

PostPosted: Tue Feb 27, 2018 7:05 am
by mflorell
That particular version you are using has some known bugs. I don't know that this specific issue is affected, but I do know that agent activity logging bugs are in the version you are using, and you should consider upgrading to a newer svn/trunk version.

As for the issue, I will try to replicate it on our testing server.

Re: Issue with pause codes

PostPosted: Wed Feb 28, 2018 12:00 am
by Jitin
even when we upgrade the svn, the same issue persists. Please try to replicate the issue on a testing server and please let me know if we have any fix for this.

Re: Issue with pause codes

PostPosted: Thu Mar 01, 2018 3:07 am
by Jitin
@mflorell : any update on the same sir ?

Re: Issue with pause codes

PostPosted: Thu Mar 01, 2018 1:35 pm
by blackbird2306
I was able to replicate your problem. And it was not easy at all to debug this problem step by step. But I found the solution for this tricky bug:

First of all your alert "CHECK-FOR-CALL RUNNING, PLEASE WAIT..." was introduced in conduction with a rare bug and should fix pause-while-call-coming-in issues.
There is in function "AutoDial_ReSume_PauSe" a control structure with checks, if ( (CFAI_sent > 0) && (APRclick=='YES') ).
If CFAI_sent is "1" and also APRclick is "YES", then pause function will be interrupted with the known alert window (CHECK...).

To solve this problem you have to make changes in "vicidial.php" in function check_for_auto_incoming() (revision 2930 from 2018-02-24):
Changes about line 11116:
// if (alert_box_close_counter > 0) not working though it goes in PAUSE
Change "if (alert_box_close_counter > 0)" to "if (alert_box_close_counter == 1)"

and
//AutoDial_ReSume_PauSe has 8 arguments and not 7 and if not 'YES' then ( (CFAI_sent > 0) && (APRclick=='YES') ) is always false regardless of CFAI_sent value
Change "agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','1','');" to "agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','1','','YES');"


Final you have this:
Code: Select all
if (alert_box_close_counter == 1)
  {
   if (VDRP_stage != 'PAUSED')
       {
       agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','1','','YES');
       }
  }


Give us feedback if your problem is solved by these changes!!

Re: Issue with pause codes

PostPosted: Fri Mar 02, 2018 5:13 pm
by mflorell
This should be fixed in svn/trunk now. Thanks!

Re: Issue with pause codes

PostPosted: Mon Mar 05, 2018 4:29 am
by Jitin
if (alert_box_close_counter == 1)
{
if (VDRP_stage != 'PAUSED')
{
agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','1','','YES');
}
button_click_log = button_click_log + "" + SQLdate + "-----CFAI_close_pause_alert---" + previous_agent_log_id + " " + agent_log_id + "|";
alert_box_close_counter=0;
hideDiv('AlertBox');
}

I made the changes but still the same.
"CHECK-FOR-CALL RUNNING, PLEASE WAIT..." keeps on coming more now.

This did not fix the issue. Kindly check and update with the fix.

Re: Issue with pause codes

PostPosted: Mon Mar 05, 2018 7:13 am
by blackbird2306
It was the right place, but a typing error, there was a "1" for temp_auto_code in function call. It should be empty without the 1:
Try this:

...
if (VDRP_stage != 'PAUSED')
{
agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','','','YES');
}
...

Re: Issue with pause codes

PostPosted: Tue Mar 06, 2018 12:04 am
by Jitin
if (alert_box_close_counter > 0)
{
if (VDRP_stage != 'PAUSED')
{
agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','1','','YES');
}
button_click_log = button_click_log + "" + SQLdate + "-----CFAI_close_pause_alert---" + previous_agent_log_id + " " + agent_log_id + "|";
alert_box_close_counter=0;
hideDiv('AlertBox');
}


Made this setting now but still not working sir.
"CHECK-FOR-CALL RUNNING, PLEASE WAIT..." keeps coming and then agent goes on pause without getting any pause codes.
Kindly check again and please provide with a solution as soon as possible.

Re: Issue with pause codes

PostPosted: Tue Mar 06, 2018 3:25 am
by blackbird2306
You have to slightly change this part now (delete the 1):
from
agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','1','','YES');
to
agent_log_id = AutoDial_ReSume_PauSe("VDADpause",'','','','','','','YES');

Did you make this last thing?

Of course this alert "CHECK-FOR-CALL RUNNING, PLEASE WAIT..." will still remain in some moments (it's part of a bug fix) and that's wanted, but the agents state won't change anymore in pause without setting pause-code (only with agent pause codes active = Force) !

Re: Issue with pause codes

PostPosted: Wed Mar 07, 2018 12:50 am
by Jitin
@blackbird2306 : Thank you for the solution. This worked.
Now agent doesn't go on pause without choosing the pause code.
Thank you