Success!
Here is what I did, and this is all pretty much directly from the link
http://www.orderlyq.com/asteriskqueues.html above.
I do want to stress again that agents only make sense when they are not the same as extensions! Basically, in that scenario, your extensions with the SIP connections, etc, should be only for the phones, no voicemail, etc, and strong passwords. Then the agent "extensions" should have the voicemail (if wanted) and a regular, easy to remember password in the sip password field, or none at all. You do need to have the SIP connection box checked (I assume IAX would work too), or else the GUI thinks critical information is missing, just none of the details are important.
So, to begin:
in Extensions.conf
These two contexts [context-is-within-square-brackets] are added through the file editor in the gui, then the stuff below copy/pasted in:
[macro-phone-login]
exten => s,1,Set(agent=${ARG1})
exten => s,n,Set(phone=${ARG2})
exten => s,n,NoOp(Agent login ${agent} to phone ${phone});
exten => s,n,VMAuthenticate(${agent}) ;comment out this line to disable password authentication.
exten => s,n,Set(oldPhone=${DB(AGENT/${agent}/PHONE)}) ;get the phone this agent used to use, if any
exten => s,n,Set(oldAgent=${DB(PHONE/${phone}/AGENT)}) ;get the agent that used to use this phone, if any
exten => s,n,Set(DB(AGENT/${oldAgent}/PHONE)=) ;log off the old agent.
exten => s,n,Set(DB(PHONE/${oldPhone}/AGENT)=) ;log off from old phone
exten => s,n,Set(DB(AGENT/${agent}/PHONE)=${phone})
exten => s,n,Set(DB(PHONE/${phone}/AGENT)=${agent})
exten => s,n,Playback(agent-loginok)
[macro-phone-logout]
exten => s,1,Set(agent=${ARG1})
exten => s,n,Set(phone=${DB(AGENT/${agent}/PHONE)})
exten => s,n,NoOp(Agent logout ${agent} from phone ${phone});
exten => s,n,VMAuthenticate(${agent}@default) ;comment out this line to disable password authentication.
exten => s,n,Set(DB(AGENT/${agent}/PHONE)=)
exten => s,n,Set(DB(PHONE/${phone}/AGENT)=)
exten => s,n,Playback(agent-loggedoff)
I added the following to another new context, [easylogin]. Please note that all the comment lines will be stripped out by the gui. At the moment, the agent extensions need to be within 2001-2999 (2000 is voicemail checking for me) to work (you can see it is filtering on numbers beginning with a 2 and 3 wildcards afterwards. This makes (I used 2020 extension) 20201 login and 202011 log-out. In my case, I did delete the password lines above.
I am not sure that the lower part, that allows dialing 1 to login, and dialing 11 to login (enter the password after) is that useful or better than the extensions that the GUi sets up....certainly, I would always be using the 20201/202011 method, way easier.
[easylogin]
;Phone Login shortcut
exten => _2XXX1,1,Answer
exten => _2XXX1,n,Macro(phone-login,${EXTEN:0:4},${CALLERID(num)})
exten => _2XXX1,n,Hangup
;Phone Logout shortcut
exten => _2XXX11,1,Answer
exten => _2XXX11,n,Macro(phone-logout,${EXTEN:0:4})
exten => _2XXX11,n,Hangup
;Phone Login
exten => 1,1,Read(agent,agent-user)
exten => 1,n,Read(phone,agent-newlocation)
exten => 1,n,Macro(phone-login,${agent},$phone)
exten => 1,n,Hangup
;Phone Logout (this is a shortcut, I think from the phone you want to logoff from
exten => 11,1,Read(agent,agent-user)
exten => 11,n,Macro(phone-logout,${agent})
exten => 11,n,Hangup
I also needed to add the line, in the default context (not sure if that is the ideal spot), include=easylogin
As I note below, I ended up using 4XXX rather than 2XXX.... I was going to use 25XXX, but that is out of the range I allowed for extensions/agentsI hope this helps others. I will report back if I have any problems.