Click or drag to resize

ChannelResourceCallProgress Property

Gets or Sets the Call Progress Mode for this channel.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax
public CallProgress CallProgress { get; set; }

Property Value

Type: CallProgress
Remarks
This property is typically used to set the Call Progress Mode before dialing a call.

Speed of Return vs Dial Result

The way you set this 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 for the balance between speed of return and the switches you need in your application based on Dial Result. Before deciding carefully evaluate the Call Progress Modes and Dial Results. Maybe You Should Try the Beep Detector to Improve Accuracy

The way you set this 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 for the balance between speed of return and the switches you need in your application based on Dial Result. Before deciding carefully evaluate the Call Progress Modes and Dial Results.

Examples
The samples below shows two of the three options. The first method sets to analyze call which will get all possible Dial Results. The second method only gets Connected or not connected.
public void DialOutAnalyze()
{
  // 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 call progress for the maximum number of possible dial results
  m_ChannelResource.CallProgress = CallProgress.AnalyzeCall;

  // 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.HumanDetected:
        // Put your script for connecting to a live person here
        break;
    case DialResult.MachineDetected:
        // Put your script for connecting to a machine or voicemail here
        break;
    case DialResult.NoAnswer:
      // Put code to move on or do what you want with a No Answer here
      break;
    case DialResult.Busy:
      // Put code to move on or do what you want with a Busy here
      break;
    default:
      // Handle all other dial results
      break;
  }
}

public void DialOutJustConnect()
{
  // 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 call progress for just connected, not connected
  m_ChannelResource.CallProgress = CallProgress.WaitForConnect;

  // 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
      break;
    default:
      // Handle no connection here
      break;
  }
}
See Also