Force Logout User with Admin Through API or JavaScript()

Discussions about development of VICIDIAL and astGUIclient

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

Force Logout User with Admin Through API or JavaScript()

Postby arye » Sun Aug 02, 2015 11:34 am

Hi All,

I have a routine that I found myself "forcing Logout" users all the time. Sometimes it is at 4 o'clock in the morning and sometimes it is 10 to 20 users within an hour.

I have a question:
I would like to be able to FORCE LOGOUT an agent that was NOT on Pause and sees the following message on the screen:
Agent ($agentname) is currently in use or improper logout. Contact Administrator.

I have tried to call an API using this (i.e. $agentname is arye) I used this:
10.0.0.1/agc/api.php?source=test&user=admin&pass=admin&agent_user=arye&function=logout&value=LOGOUT
Where 10.0.0.1 is the address of the ViciDial Server. and admin:admin are the credentials of the admin user.

It DID NOT worked at all.
I could NOT force logout the agent (arye). To me it looks like this API call meant to logout users that in Pause and NOT in "red" situation (that needs Admin to FORCE the logout).

I would be happy if I could write down an HTML page that I can leave it open and click the users when needed.
API call or JavaScript() that I can use to FORCE the logout of a user - would be great.

An HTML (JS/PHP etc..) that I can do Submit buttons would be also a solution that I would be happy to implement.
Any one had a solution for that?
Is there an API that I can use with Force??

That would be a great help
Thanks.
Arye
arye
 
Posts: 1
Joined: Sun Aug 02, 2015 11:22 am

Re: Force Logout User with Admin Through API or JavaScript()

Postby williamconley » Sat Aug 15, 2015 1:48 pm

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 and vicidial version with 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 "from scratch" you must post your operating system and should also post the .iso version from which you installed your original operating system. 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) What is the result of your attempt? The api should give success or fail (with reason). Is the admin user's API setting "Y" under user settings?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Development

Who is online

Users browsing this forum: No registered users and 34 guests