agent API logout not working as expected

Any and all non-support discussions

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

agent API logout not working as expected

Postby Two8nine » Mon Jun 19, 2017 1:44 pm

Hi, we're currently in the midst of getting a Vicidial testing environment running for our site, having an issue I'm hoping I can get some input on.

We're pretty specialized, and have some pretty complex calling rules, so rather than try to adapt Vicidial to this, we intend on using our inhouse campaign management software, with Vicidial being the replacement for agent and phone management. (previously UCCX)

I'm developing a desktop app that integrates the two systems, and having issues with the log-in/log-out functions. We cannot allow agents access to campaign selection, so logging in is handled internally. This we've got working ok, they just submit a username and password, and they are logged into whatever campaign the manager has selected for them. (HTTP post request handled by apacheclient 4.3).

This works, the agent conference initiates ok, and they are shown logged-in on the server/admin page.

However, if I submit the logout request as per the api, the server responds ok, i.e: SUCCESS: logout function set - LOGOUT|1497895547|102

But the agent call does not change, nor are they logged out of the server. If I repeat the above steps in say, Chrome, it all works fine -- but the logout php does nothing if run in our app. (java mostly) I'm thinking it has to do with the session id not matching, but not sure.

Appreciate any thoughts.
Two8nine
 
Posts: 33
Joined: Wed May 24, 2017 10:11 am

Re: agent API logout not working as expected

Postby mflorell » Mon Jun 19, 2017 4:12 pm

I don't really have a clear picture of how you are running things. The Agent APIs were designed to work with agents logging in through standard web browsers(Firefox, Chrome, etc...) We have never tested them running in different environments, and the agent screen needs a full Javascript-enabled web browser to run properly.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: agent API logout not working as expected

Postby Two8nine » Mon Jun 19, 2017 5:20 pm

The main thing I've been instructed to do is bypass the agent screen entirely, as under no circumstances are the agents to be able to see the campaign selection screen.

I do understand that it has to be running regardless, so what I'm trying to do is run it in a hidden state, passing in the login data through our own login screen (campaigns are selected by admin), this works, and calls can be made ok, but the api doesn't work. (more and more I suspect it's because the session id's don't match when doing it this way.) I don't think the programming environment is causing issue, as I can run the site ok within our app, and everything works as long as it's visible. (This is a javafx webview) The only snag we seem to hit it the api commands don't seem to do anything unless the agent screen is actively visible. (i.e. running it in the background logs in and allows calling, but doesn't recognize things like logout and external_hangup, despite the server responding that the commands were successful.

The other option I suppose is to just run the agent screen in it's own tab inside of our app, which already works, but still need a way to prevent agent campaign selection.

This may end up being more of a java/apacheclient question however, so I've got some feeling off there as well.
Two8nine
 
Posts: 33
Joined: Wed May 24, 2017 10:11 am

Re: agent API logout not working as expected

Postby mflorell » Mon Jun 19, 2017 9:59 pm

You can run the agent screen in a hidden IFRAME, there is an example of how to do this in the extras/crm_iframe folder in the codebase.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: agent API logout not working as expected

Postby Two8nine » Tue Jun 20, 2017 8:18 am

Will give that a go, appreciate the responses.
Two8nine
 
Posts: 33
Joined: Wed May 24, 2017 10:11 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 60 guests