Voice Line Status Tutorial

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

  1. create a new instance of CTelephony
  2. use CTelephony::GetLineStatus() to get the simple voice line status
  3. use CTelephony::GetCallStatus() to get the status of any voice call owned by the client application
  4. use CTelephony::GetCallInfo() to get the detailed call information about the call pass the following parameters for the required information
    Parameter Function

    TCallStatus

    To get the status of a call like idle, on-hold, dialling and ringing

    TDateTime

    To get the data and time of a call

    TTimeIntervalSeconds

    To get the duration of a call

    TTelAddress

    To get the destination number

    TPhoneNetworkSecurity

    To get the ciphering information from the network

    TCallRemoteIdentityStatus

    To determine if the remote caller status is available

    TCallDirection

    To determine the call direction

  5. use GetCallDynamicCaps() to get the dynamic capability information about the call.

Voice call information example

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