I'm glad to hear it is working. But I can guarantee that you will have some unwanted agent pause moments with this. If an agent wants to go only in pause mode and then resumes, the next call pause will be triggered. Just try it out with the API: 1. send pause, 2. send resume, - 3. then a call comes in and you want to dispo and keep going on without pausing, 4. send hangup, 5. send external status --> the agent will be paused
And now I have a small fix for testing purposes. Just to see, if we are on the right track.
As I have mentioned this was only for testing. But now the final fix for your issue if you don't want to change the order of your api commands (1. pause , 2. hangup, 3. dispo and not 1. hangup, 2. pause, 3. dispo):
Additionally to the previous fix add the green line about 15 lines further down:
if ( (APIPausE_array[0]=='RESUME') && (AutoDialReady < 1) && (auto_dial_level > 0) )
{
document.vicidial_form.DispoSelectStop.checked=false; AutoDialWaiting = 1;
AutoDial_ReSume_PauSe("VDADready");
temp_APIPausE_message='RESUME-SET';
}
}
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3