Hi Pravin,
You can login/out agents and change their state using the ThirdPartyCallController.SetAgentState() method.
For example, using the .Net SDK, you can do something like this:
ThirdPartyCallController.SetAgentStateParameters param= new ThirdPartyCallController.SetAgentStateParameters();
param.AgentId = "20000";
param.Password = "1234";
param.Device = stationID;
param.RequestedAgentState = ThirdPartyCallController.RequestedAgentState.AM_LOG_OUT;
serviceProvider.getThirdPartyCallController.SetAgentState(param, null);
The required parameters will vary, depending on the new state.
I would also suggest that you use the DMCC Dashboard to experiment and see all the possibilities.
I suspect that you also want to be able to get Agent State change events. You can get Agent Login/Logout events by monitoring one of an agent's skills (Hunt Group). You will not get agent events by monitoring a station. You will also not be able to get events for other agent state changes (other than login/logout) such as Ready/Not Ready. These are not available for third party applications and you would need to regularly poll AE Services using getAgentState() to be able to keep up-to-date.
You may find it useful to search this forum as this topic comes up quite often.
As for recording calls, I suggest you get a copy of "Developing Client-side IP Call Recording Applications using Avaya Application Enablement Services". You can find it at
https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_application_enablement_services/educational_resources/index.gsp
Martin
Martin