|
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: 8.6.1.1
Syntax public bool IsConnected()
Public Function IsConnected As Boolean
public:
bool IsConnected()
member IsConnected : unit -> bool
Return Value
Type:
BooleanTrue if a call is connected. Otherwise, false.
Remarks
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.
Examples
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:
break;
case false:
break;
}
}
Public Sub CheckConnected()
Dim IsCallConnected As Boolean = m_ChannelResource.IsConnected()
Select Case IsCallConnected
Case True
Exit Select
Case False
Exit Select
End Select
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also