I have been using ODBC to get the Remote Agent login and logout from the phone itself, without using computers. Just by dialling extensions.
ODBC for asterisk can be installed with help at this link.
http://www.asteriskdocs.org/en/3rd_Edit ... _odbc.htmlOnce done, this you put in the context your phone uses. all you have to do is keep the phone, user and remote agent as same. and this trick works.
exten => 543,1,Answer()
exten => 543,n,SET(_CLI=${CALLERID(num)})
exten => 543,n,SET(ODBC_REMOTELOGIN(${CLI})=)
exten => 543,n,Playback(agent-loginok)
exten => 543,n,Hangup()
exten => 544,1,Answer()
exten => 544,n,SET(_CLI=${CALLERID(num)})
exten => 544,n,SET(ODBC_REMOTELOGOUT(${CLI})=)
exten => 544,n,Playback(agent-loggedoff)
exten => 544,n,Hangup()
In func_odbc.conf you can put the sql query as below.
[REMOTELOGIN]
dsn=asterisk
write=UPDATE vicidial_remote_agents SET status = 'ACTIVE' WHERE user_start=${ARG1} LIMIT 1;
[REMOTELOGOUT]
dsn=asterisk
write=UPDATE vicidial_remote_agents SET status = 'INACTIVE' WHERE user_start=${ARG1} LIMIT 1;