Click or drag to resize

ChannelResourceDropTime Property

A time at which the server should automatically drop the call whether it is disonnected or not. This value is Universal Time.

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

Property Value

Type: DateTime
Remarks
The server will drop the current call at the specified time in Universal Time. This property has two typical uses, but of course may be used for your applications specific needs:

Safety Net to Avoid Long Calls and Charges

This can be is used as a safety net to ensure that calls do not end up connected for long periods of time. You can take a setting for maximum call length and calucluate the drop time from the time of the call and set it to ensure all calls stay within a prescibed duration.

End Calls Based on Usage Purchased

Some applications have a caller who has purchased time and the call must be dropped when the customer's purchased time expires. This property works to solve this as well.

Examples
The example below shows a chunk of code that sets the drop time to 8AM univeral time, 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 drop time to 8AM exactly Universal Time
    m_ChannelResource.DropTime = Convert.ToDateTime("08:00:00");

  // 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;
    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;
  }
}
See Also