Connection managers and endpoint types in UCMA

I have a sneaking suspicion that many of you who use UCMA do not truly know when one should use SipPeerToPeerEndpoint vs SipEndpoint and when one should use RealTimeClientConnectionManager vs one of the RealTimeServerConnectionManagers.  In this post I will try to clear up some of the confusion here.

In general, to decide which of these classes you should use, follow this logic.

Do I need to register with the server?

If yes, then use SipEndpoint.  If no, then use SipPeerToPeerEndpoint and stop.  If you are using SipPeerToPeerEndpoint, then you cannot use RealTimeClientConnectionManager - you must use one of the RealTimeServerConnectionManager derived classes.  Which you use depends on whether you are using Tls or Tcp.

Will the LCS server be configured to treat my machine as a trusted SIP peer?

If the answer is yes, then you can use one of the RealTimeServerConnectionManager classes.  If no, then you must use RealTimeClientConnectionManager.

There are other differences between RealTimeServerConnectionManager (also called 'server mode') and RealTimeClientConnectionManager (also called 'client mode').  For instance, given an existing connection, what happens if it is closed by the remote client.

In client mode, a new connection is immediately established and registered if necessary.  In server mode, a new connection is created the next time a request occurs.