Click or drag to resize

ChannelResourceMaximumTime Property

Sets the maximum time in seconds to wait for a Dial to complete. Default is 30.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version:
public int MaximumTime { get; set; }

Property Value

Type: Int32
Once you have fired a Dial, if this time expires, the Dial Result will not return a meaningful result.

Don't Set Too Low for Intended Call Progress Mode

The way you set the Call Progress Mode Property will directly affect how quickly your dial returns and how many possible outcomes are available. For example, if you set this to DialOnly, your code will not get a "Human Detected" Dial Result. Make sure you understand which mode to use and how much time needs to be alotted so as not to set this property too low and not allow Dial Result to be properly determined.

Note: Your Dial May Be Cancelled

If you set this value too low and your call is not picked up in time, your dial will be cancelled. Take account of this in your code.

The example below shows a chunk of code that sets the Max Time Property to one minute, dials a call and then switches based on the Dial Result.
public void DialOut()
  // To get a channel, you must first get a link to a Telephony Server.  You may need to pass a username password here.
  TelephonyServer m_TelephonyServer = new TelephonyServer();

  // Get your channel resource from the server
  ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();

  // Put the phone number in a variable
  string m_PhoneNumber = "2135551212";

  // Set the maximum time to one minute
  m_ChannelResource.MaximumTime = 60;

  // Dial the call and put the result in a variable
  DialResult dialResult = m_ChannelResource.Dial(m_PhoneNumber);

  // Branch based on what happens to the call
  switch (dialResult)
    case DialResult.Connected:
    // Put your script for a connection here
    case DialResult.NoAnswer:
    // Put code to move on or do what you want with a No Answer here
    case DialResult.Busy:
    // Put code to move on or do what you want with a Busy here
    // Handle all other dial results
See Also