Page 1 of 1

HANGUP Button Click EVENT

PostPosted: Tue Mar 06, 2018 9:24 am
by donX
Hi Guys,

I have this script that will update the PAUSE_CODE of any agent on HANGUP.

It updates the PAUSE_CODE without a problem when I run it manually using php /path/to/script.php.
However, I would want to to be called whenever the HANGUP button is clicked.

I tried looking inside the VICIDIAL.php (/srv/www/htdocs/agc/) but can't seem to figure out which line it is located or I'm looking at a different file?

2nd, where do I set the DEFAULT refresh time in REALTIME REPORT? When you go to it, it is always set to 40secs as per default and you need to change it to 4 (being the fastest) manually?

Thanks so much for your support.

Re: HANGUP Button Click EVENT

PostPosted: Tue Mar 06, 2018 9:33 am
by donX
Hi,

Please disregard the REALTIME REPORT refresh rate. Ive found the config to set it to default in options.php.

Thanks,

Re: HANGUP Button Click EVENT

PostPosted: Tue Mar 06, 2018 1:33 pm
by blackbird2306
What is your vicidial version and installation method (in your previous posts it was build 170416-1548) ? And why you are not using campaign setting "Agent Pause Codes Active" --> FORCE ? Is there something special in your own script?

Re: HANGUP Button Click EVENT

PostPosted: Tue Mar 06, 2018 1:58 pm
by williamconley
donX wrote:Hi Guys,

I have this script that will update the PAUSE_CODE of any agent on HANGUP.

It updates the PAUSE_CODE without a problem when I run it manually using php /path/to/script.php.
However, I would want to to be called whenever the HANGUP button is clicked.

I tried looking inside the VICIDIAL.php (/srv/www/htdocs/agc/) but can't seem to figure out which line it is located or I'm looking at a different file?

2nd, where do I set the DEFAULT refresh time in REALTIME REPORT? When you go to it, it is always set to 40secs as per default and you need to change it to 4 (being the fastest) manually?

Thanks so much for your support.

1) Welcome to the Party! 8-)

2) As you are obviously new here, I have some suggestions to help us all help you:

When you post, please post your entire configuration including (but not limited to) your installation method (7.X.X?) and vicidial version with build (VERSION: 2.X-XXXx ... BUILD: #####-####).

This IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)

You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "manual/from scratch" you must post your operating system with version (and the .iso version from which you installed your original operating system) plus a link to the installation instructions you used. If your installation is "Hosted" list the site name of the host.

If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.

Similar to This:

Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600

3) There are a great many worker functions invoked when the agent presses hangup customer. That being said: ANY button's functionality can be ratted out by using the "right click"/"Inspect item" feature of your browser. That will give you the name of the function that will fire when that button is pressed. Ultimately, it will send an AJAX request to a php file on the server, which you could then alter to update anything you like.

But blackbird has a point: There are already methods available in later versions of Vicidial that manage pause codes. We also have a few clients with extra additions: For instance ... logging on without being on pause (already active), thus removing "login" as a pause code for that campaign. If you add to that the ability to force logout if they stay paused for more than five seconds, the agents really have no more option to scam the system. We have several clients who use logged in time (minus dead and minus pause) for payroll purposes. Of course, they have a "Meeting!" pause code for payable pauses.

Re: HANGUP Button Click EVENT

PostPosted: Wed Mar 07, 2018 10:47 am
by donX
Nevermind guys.

I already found a way to do it.

The AGENT PAUSE option through the campaign isn't what actually is the needed result.

I only want to set the STATUs and PAUSE code to something else automatically when the call hangs up.

I just added a loop in the script with sleep so it runs every 10seconds.

Thanks for your advise guys