Click or drag to resize

ChannelResourceStopDial Method

Instructs the channel to stop a currently in progress dial.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version:
public void StopDial()
This method will tell the channel reousrce on which it is called to abort any dial in progress. Note that this will cause the dial to return a dial result of "Failed."

Commonly Used from Another Thread

Most often your main thread will be waiting for a dial result from a dial you have fired off. Therefore StopDial is normally called from another thread, such as a monitor or manager thread which has determined it needs to pull the dialing thread out for some reason.

Warning: Stop Dial Needs to be Called, Not Just Dispose

The Dispose on a channel will not stop a dialing call. Make sure you call Stop Dial first to make sure channels get properly disposed.

The example below shows a sample collection of channels that would be stopped from another thread.
public void StopDialOnAllChannels()
// This code is probably in a monitor or master thread, typically you would have a chhanel resources in a collection,
// determine that a dial needs to stop on a channel or group of channels.  Here we have a list of channels for example.
  ChannelList = new List<ChannelResource>();

    // Loop through the whole list
    foreach (ChannelResource cr in ChannelList)
        // Stop dial on every channel one at a time.
See Also