Page 1 of 1

Agent API Pause Not Working?

PostPosted: Tue Feb 22, 2022 8:41 am
by developerdan
Hi Chaps,
This might be a long one (sorry).

I recently upgraded a client to svn version 3558 from a very old version (2962).
(This is on centos 7 and php7 installed with the remi repos).

Vicidial works 100% fine but the agent API seems to not be allowing us to pause calls.

This is an issue I reported back in 2018 and we had a make-shift fix suggested that seemed to work on that version.
( this thread :

With that fix applied the API pause works but there is a side effect; after the first api pause, the next call that goes to the native dispo screen will default the pause tick box to ticked.

This is a minor issue in the grand scheme but when agents are normally taking 2-3 seconds a call and now they take ~10 seconds the time adds up over an 8 hour shift.

So im hoping someone might have a better fix for us than the previous one for the new version as we would like the agent api pause to work as intended if possible.

I currently have a test server setup so any tests, trials etc are possible.

Any help is greatly appreciated.

Re: Agent API Pause Not Working?

PostPosted: Thu Feb 24, 2022 10:11 am
by developerdan
I think I found a fix. Possibly this is something you might want to include in future versions?

Here is where the fix goes :

Code: Select all
                                                    if (APIPausE.length > 4)
                                                        var temp_APIPausE_message='';
                                                        var APIPausE_array = APIPausE.split("!");
                                                        if (APIPausE_ID == APIPausE_array[1])
                                                                //alert("PAUSE ALREADY RECEIVED");
                                                                else document.vicidial_form.DispoSelectStop.checked=true;
                                                                APIPausE_ID = APIPausE_array[1];
                                                                if (APIPausE_array[0]=='PAUSE')

Its these two lines :
Code: Select all
else document.vicidial_form.DispoSelectStop.checked=true;

There might need to be something here to handle manual dial / callbacks though we havent noticed any issues in testing so far.
So far at least this has made the pause from API reliable and removed the side effect of the pause tickbox being ticked when it shouldnt be on the next call.

Re: Agent API Pause Not Working?

PostPosted: Thu Feb 24, 2022 5:43 pm
by mflorell
Please post a "diff -u" patch file against the latest svn/trunk revision to the Issue Tracker for this if possible.