Putting a call on hold

To put a call on hold, you:

  1. Create a line handle.
  2. Create a feature control.
    Before you create the feature control, you might want to verify the availability of the feature. You can verify the feature through the line configuration or directly through the line.
  3. Create a call instance.
  4. Activate the hold feature.
    Reconnect the call to take the call off hold.
      // Create a line handle.
      TStandardText   lineNumber = TStandardText("777-7777");
      TTelephoneLineConfigurationData     lineConfiguration(lineNumber);
      TTelephoneLineHandle    aLineHandle(lineConfiguration);
      
      // Create a feature control.
      TTelephoneHoldFeatureControl*   holdControl;
      holdControl = aLineHandle.CreateFeatureControl(TTelephonLineFeature::kHold);
      
      // Create and place a call.
      TStandardText   aNumber = TStandardText("974-0001")
      TTelephoneCallHandle*   aPhoneCall = aLineHandle.CreateAndPlaceCall(aNumber);
      
      // Activate the feature.
      if ((aPhoneCall->GetStatus() == TTelephoneStatusNotification::kCallActive) 
          && (canHold)) {
      holdControl->PutOnHold();
      
      // Reconnect the call.
      holdControl->Reconnect(*aPhoneCall);
      }

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker