Anruf übertragen
Im folgenden Codebeispiel wird eine Anrufübertragung veranschaulicht.
Bevor Sie dieses Codebeispiel verwenden, muss ein Aufruf ausgeführt werden, und Sie müssen die Vorgänge unter Anruf tätigen oder Anruf empfangen ausführen.
Hinweis
Dieses Beispiel verfügt nicht über die Fehlerüberprüfung und -releases, die für Produktionscode geeignet sind.
// From elsewhere in your code, you have obtained pAddress and pBasicCall,
// which are pointers to the ITAddress and ITBasicCallControl interfaces
// of the call in progress that will be transferred.
// Create the call object for transfer. bstrAddressToCall and dwAddressType
// have been retrieved from a UI.
ITBasicCallControl * pConsultCall
HRESULT hr = pAddress->CreateCall(
bstrAddressToCall,
dwAddressType,
&pConsultCall
);
// If ( hr != S_OK ) process the error here.
// Start the transfer.
hr = pBasicCall->Transfer(
pConsultCall,
VARIANT_TRUE
);
// If ( hr != S_OK ) process the error here.
// Depending on the service provider, additional operations may be available
// or required.
// Finish the transfer.
hr = pConsultCall->Finish(FM_ASTRANSFER);
// If ( hr != S_OK ) process the error here.
// The consultation call transitions to CS_DISCONNECTED.
// The objects associated with pConsultCall and pBasicCall can be released immediately or
// used for information purposes and released later.
Zugehörige Themen
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für