Can a user login/logout from a device via shell script?

If it is possible, then I would like to know how to login/logout a user via a shell script. The reason I want to do this is to use a cron job to login my user on an extra device every night at 6PM and logout the next morning at 9AM.

Presently I have a desk phone, a soft phone and a home phone that I use. I’d like my desk and soft phones to ring any time my extension is dialed, but during the evening I would ALSO like my home phone to ring. The way I have achieved this (with much help from drmessano) is to create 4 separate users as follows:

Rick (104) -> goes straight to Follow Me with 0 initial ring time, so it drops to a Time Condition. If the Time Condition matches, then it uses Ring Group “rick-day” and rings my desk and soft phones. If the Time Condition doesn’t match, it uses Ring Group “rick-night” which rings my desk (1001), soft (1002), and home (1003) phones. There’s a separate user for each of desk, soft and home phones so they can be included as part of the Ring Groups.

This elaborate setup wouldn’t be necessary if I could login my “Rick” user to my home phone device via a cron job at 6PM each night, and then logout again at 9AM the next morning. I would have one user logged on to either 2 or 3 devices according to time of day, and they would all ring at the appropriate times.

If there’s a cleaner way to achieve this, then I would love to learn it. For the moment, it appears I will need a scriptable call that can be invoked by a cron job to login/logout my user from my home device. Any help appreciated. Thanks!

Rick

sure, take a look at the AGI script that is currently used, user_login_out.agi, to login/out. It would be fairly minor to modify this script. All you would have to do is to change the database access routines to go through the manager instead of the AGI, and it already uses the manager for some of what it does.