Click or drag to resize

ChannelResourceIsConnected Method

Returns the status of any current call. True if a call is connected, false if not connected.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version:
public bool IsConnected()

Return Value

Type: Boolean
True if a call is connected. Otherwise, false.
This method can be helpful if your application has lost state of a Channel Resource and/or call. However, it is worth mentioning that you should maintain state of your channels at all times and if you are falling back on this method for this purpose, consider reviewing and refactoring your code.

Use the Disconnect Event

It is much more efficient to subscribe to Disconnect Events and put your hang up handling code there.

The example below shows a simple check and switch on a channel state.
public void CheckConnected()
  bool IsCallConnected = m_ChannelResource.IsConnected();

  switch (IsCallConnected)
    case true:
      // Handle what you will if connected
    case false:
      // Handle what you will if not connected
See Also