This tutorial describes how to manipulate the call status and control call information.
The two diagrams below show the call state transitions for:
RMobileCall provides the functions to manipulate and control call actions.
The high level steps to use the call control information are:
The following code declares an enumeration that lists the various call control commands, and provides a switch function that carries out the specified command.
/// Call control commands enum TCallControlCommand { EPutOnHold, // Put call on hold EResumeHeld, // Resume on hold call ESwapHoldAndOngoing,// Swap an on-hold and an ongoing call EDeflectIncoming, // Redirect an incoming call ETransferToRemote, // Transfer one call to remote party of another call EConferenceOneToOne // Go "one-to-one" within a conference call }; // Execute a call control command void CClientApp::CallControlL(RMobileCall& aCall, TCallControlCommand aCommand, TRequestStatus& aStatus) { // Get call capabilities to check can execute command RMobileCall::TMobileCallCapsV1 callCaps; RMobileCall::TMobileCallCapsV1Pckg callCapsPckg(callCaps); User::LeaveIfError(aCall.GetMobileCallCaps(callCapsPckg)); switch (aCommand) { case EPutOnHold: if (callCaps.iCallControlCaps & RMobileCall::KCapsHold) { aCall.Hold(aStatus); } break; case EResumeHeld: if (callCaps.iCallControlCaps & RMobileCall::KCapsResume) { aCall.Resume(aStatus); } break; case ESwapHoldAndOngoing: if (callCaps.iCallControlCaps & RMobileCall::KCapsSwap) { aCall.Swap(aStatus); } break; case EDeflectIncoming: if (callCaps.iCallControlCaps & RMobileCall::KCapsDeflect) { aCall.Deflect(aStatus, RMobileCall::EDeflectRegisteredNumber, RMobilePhone::TMobileAddress()); } break; case ETransferToRemote: if (callCaps.iCallControlCaps & RMobileCall::KCapsTransfer) { aCall.Transfer(aStatus); } break; case EConferenceOneToOne: if (callCaps.iCallControlCaps & RMobileCall::KCapsOneToOne) { aCall.GoOneToOne(aStatus); } break; default: break; }; };
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.