This tutorial describes how to get the voice line status with the telephony API for applications.
The CTelephony functions provide a detailed information on the voice line status. The detailed call information provides the information about:
call status
date of the call
time of the call
duration of the call
destination number
caller identification
dynamic call capabilities
The example code describes the steps to get the detailed call information.
CTelephony* telephony = CTelephony::NewLC(); CTelephony::TCallInfoV1 callInfoV1; CTelephony::TCallInfoV1Pckg callInfoV1Pckg( callInfoV1 ); CTelephony::TCallSelectionV1 callSelectionV1; CTelephony::TCallSelectionV1Pckg callSelectionV1Pckg( callSelectionV1 ); CTelephony::TRemotePartyInfoV1 remotePartyInfoV1; CTelephony::TRemotePartyInfoV1Pckg remotePartyInfoV1Pckg( remotePartyInfoV1 ); callSelectionV1.iLine = CTelephony::EVoiceLine; callSelectionV1.iSelect = CTelephony::EActiveCall; telephony->GetCallInfo( callSelectionV1Pckg, callInfoV1Pckg, remotePartyInfoV1Pckg ); CleanupStack::PopAndDestroy( telephony );
The example code to get the dynamic call capability information
CTelephony::TCallCapsV1 callCapsV1; CTelephony::TCallCapsV1Pckg callCapsV1Pckg( callCapsV1 ); telephony->GetCallDynamicCaps( callId, callCapsV1Pckg ); TUint32 caps = callCapsV1.iControlCaps; if( caps & CTelephony::KCapsHold ) {} // The call represented by 'callId' can be put on hold