For question a:
The following code will get the agent(s) logged in at station 12345.
LucentTerminal agentTerminal = (LucentTerminal)myProvider.getTerminal("12345");
Agent agents = agentTerminal.getAgents();
Note that it is not possible to inject or alter UUI during a call using JTAPI. You can only inject it while making a new call. So, if your application were to transfer the call (or conference it), it could inject new UUI into theis new call.
I am not familiar with One-X Agent. Have a look at http://www.devconnectprogram.com/site/global/products_resources/avaya_one_x_agent/overview/index.gsp
. If this does not answer our query, open a Tech Support ticket and a colleague will respond.