Page 1 of 1

External pause ineffective when requested right after call

PostPosted: Mon Jul 29, 2013 7:24 pm
by pinney
What must I do to enable a sequence of external dials?

I'm making use of the AGENT API, and I find that my requests for the function external_pause do not yield a status change, at least not when I request external_pause right after concluding a phone call.

The API doc reads:

To hangup the call, disposition it and then pause the agent, do the following in order:
?source=test&user=6666&pass=1234&agent_user=1000&function=external_pause&value=PAUSE
?source=test&user=6666&pass=1234&agent_user=1000&function=external_hangup&value=1
?source=test&user=6666&pass=1234&agent_user=1000&function=external_status&value=A


When I follow this prescription (even throwing in additional requests to external_pause after external_hangup and/or external_status), my status ends up READY instead of PAUSED. This would be fine, but I often need the application on which I am working to immediately begin another external_dial, and an external_dial will not execute unless my status is PAUSED.

If I wait a second or two, however, and then issue an external_pause request, then my status successfully changes to PAUSED, and the next external_dial can execute.

(I have spent almost two days reading the php files, yet I cannot discover the entire mechanism that actually changes my status to PAUSE after an external_pause request. I see that an external_pause request sets the external_pause column in my asterisk.vicidial_live_agents table, but I don't see what becomes of that.)

Re: External pause ineffective when requested right after ca

PostPosted: Mon Jul 29, 2013 7:35 pm
by mflorell
vicidial.php verison and build?

Installation method?

Timing between API requests in the order specified?

Re: External pause ineffective when requested right after ca

PostPosted: Mon Jul 29, 2013 7:42 pm
by pinney
Vici 2.6b0.5

PHP 5.3.3

Installation is ViciBox Server v.3.1. ViciBox Redux v.3.1.15 release (I couldn't say whether it's a preload or standard version, as the whole machine was purchased as a system before I got my hands on it).

Timing is 0 seconds between requests. I wrote a shell script that runs curl to execute the API calls, so I just execute three or four in sequence. (You can see my script on pastie(dot)org. Since I'm a new member at this forum, I can't post anything that looks like a URL, but here's the path: /8188379) My homebrew application will likewise not delay between requests.

Re: External pause ineffective when requested right after ca

PostPosted: Mon Jul 29, 2013 8:09 pm
by williamconley
1) consider an upgrade (your version is a bit old)

2) consider setting "Agent Pause After Each Call" to Y for the campaign. Then you'll need to resume when you want to make a call, but at least you should be paused when you want to. 8-)

Re: External pause ineffective when requested right after ca

PostPosted: Tue Jul 30, 2013 9:47 am
by pinney
Awesome! Thank you so much, williamconley!

For anyone coming later, I found these four campaign settings to be significant in empowering my homebrew application control dialing:

    Dial Method = MANUAL
    Auto Dial Level = 0
    Manual Dial Override = ALLOW_ALL (Recommended. This means that any user in this campaign gets the campaign settings for Manual dialing, even if their user settings would preclude this feature.)
    Manual Dial API = QUEUE_AND_AUTOCALL (At least don't use just QUEUE because that will allow numbers to be added to the queue via the API, but that queue will not be automatically executed, instead requiring the user to interface with the Vicidial browser application)