Agent unpauses automatically if agent api is used

All installation and configuration problems and questions

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

Agent unpauses automatically if agent api is used

Postby ccabrera » Wed Nov 13, 2019 4:23 pm

Hello,

I'm trying to accomplish hangup, dispo and pause events from the Agent API, but whenever I use them, the agent hangups the call, dispositions it, but after that, pauses for about 1 second and then it unpauses itself.

According to the API docs, the order of the events should be pause (while on a live call), then hangup and then dispo. However, this isn't working.

By checking the vicidial_api_log table, all three events are marked as SUCCESS.

Here are the URLs I used (in this order).

api.php?source=API-VICIDIAL&user=apiuser&pass=XXXXX&agent_user=6666&function=external_pause&value=PAUSE
api.php?source=API-VICIDIAL&user=apiuser&pass=XXXXX&agent_user=6666&function=external_hangup&value=1
api.php?source=API-VICIDIAL&user=apiuser&pass=XXXXX&agent_user=6666&function=external_status&value=XA

The SVN revision for this installation is 3163, which is the most up to date.

Any ideas?
Christian Cabrera
Enlaza Comunicaciones - Vicidial Partner
Mexico City
ccabrera
 
Posts: 153
Joined: Fri Jan 14, 2011 7:53 pm
Location: Mexico City

Re: Agent unpauses automatically if agent api is used

Postby mflorell » Wed Nov 13, 2019 5:26 pm

Do you have agent debug logging enabled? If so, have you looked at the agent debug log report?

Depending on your campaign settings, there might be issues with the order of commands that you are trying to use.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Agent unpauses automatically if agent api is used

Postby ccabrera » Wed Nov 13, 2019 6:32 pm

Matt,

I didn't have it enabled, but I just did and I repeated the procedure with same results. Immediately logged out after that to stop the debug from collecting more logs.

I tested it with a manual outbound call. The actions which can be seen in the log are


manDiaLnextCaLL (when I started dialing out)
Log_Webform_Click (when the webform which uses the api launched)
custom_form_frame
manDiaLlookCaLL
manDiaLlookCaLL
manDiaLlookCaLL
manDiaLlookCaLL
manDiaLlookCaLL
manDiaLlookCaLL
manDiaLlookCaLL
updateLEAD
updateDISPO
custom_form_frame


This was made in my development server, so no actual clients where involved. However, I tried this before in a client's production server and that's where I first noticed the API not doing what I was expecting. Then I replicated the problem on a different server with different config, with same results.

I even tried invoking the API urls by hand, taking me about 5 seconds between each, and the result was the same. Call gets hangup properly, then dispo is fine, and after dispo you can see the yellow pause button, but after 1 second it goes back to green.


However, I tried changing the order of events and then applying a timeout before sending the next event, and it seems to do the trick:

- Hangup
- Dispo
- Sleep 2 seconds
- Pause
- Sleep 2 seconds
- Set pause code

However, this causes a 2s gap in which agent may receive a new call, thus invalidating the purpose to pause after dispo just like a regular agent screen would do.

Is there any way to solve this?
Christian Cabrera
Enlaza Comunicaciones - Vicidial Partner
Mexico City
ccabrera
 
Posts: 153
Joined: Fri Jan 14, 2011 7:53 pm
Location: Mexico City

Re: Agent unpauses automatically if agent api is used

Postby mflorell » Wed Nov 13, 2019 7:32 pm

We have several clients doing effectively the same thing on different types of campaigns, so I know it's possible. Have you tried Hangup, pause, dispo?

Could you post your pause/ready-related campaign settings?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 92 guests