Endpoint Draining

In Microsoft Unified Communications Managed API (UCMA) 2.0, routing of calls to another application instance during shutdown was possible only if the application had knowledge of the other application instances. Applications then had to incorporate tedious transfer and fail-over logic to allow an application to drain, that is, gracefully decline incoming calls by routing them to another application instance.

In Microsoft Unified Communications Managed API (UCMA) 3.0 and Microsoft Lync Server 2010, methods on the ApplicationEndpoint class can be used to drain existing calls: BeginDrain(AsyncCallback, Object) and EndDrain(IAsyncResult). These methods cause all incoming calls to be automatically routed to another application instance, provided that this other application instance is available and is not draining. If the targeted application instance is unavailable or is draining, the incoming calls will be declined.

Existing conversations will continue normally (including modality addition and escalation to conference), so an application may use this feature during its shutdown phase while still completing existing calls. The application can then shut down, perform maintenance as needed, and restart. After the application restarts, new calls are again routed to it.