Hi Stephan,
The feature was designed such that CiscoProvTerminalRegisteredEv/CiscoProvTerminalUnRegisteredEv will be delivered for devices which register/unregister only after Provider state changes to IN_SERVICE. This was done to reduce the surge of such events at application start. If in case you are seeing such events before Provider is IN_SERVICE then i would call it a wrong behavior and can take a look into it if you have logs for that.
As far as your posting in other thread(
http://developer.cisco.com/web/jtapi/forums/-/message_boards/message/1672197) is concerned:
We had a bug in 7.1.3 release where JTAPI use to return EM Login name as null even if device was EM logged in. This issue is already fixed in later releases and We were in discussion with our developer support where someone had raised a case for this with them. Based on that case, we are in process of porting the fix to 7.1(3). I am not sure if it is the same case which you had raised but the fix for that will be available in latest 7.1(3) by feb'2010 end.
Once the above fix is available, i believe you can have your application logic based on following:
At app start, once Provider comes IN_SERVICE, check whether CiscoTerminal is registered or not through isRegistered() API, you will also be able to check for EM Login information through getEMLoginUsername() API. From then on(i.e After the app start) you can rely on CiscoProvTerminalRegisteredEv/CiscoProvTerminalUnRegisteredEv and update your application for EM user login name information again on getting CiscoProvTerminalRegisteredEv.
Please let me know if you have any questions.
Regards,
Abhishek