Call Completion to Busy Subscriber Tutorial

This tutorial describes how to get the Call Completion to Busy Subscriber (CCBS) supplementary service information from the network.

GSM network (CCBS) supplementary service repeatedly calls a destination that is busy at the time of the initial call attempt.

The RMobilePhone methods are at phone-level because the mobile station must interrogate the network for the status of all CCBS requests at once. Each CCBS subscriber can have up to five CCBS requests outstanding at a time.

The high level steps to get the CCBS information are shown here:

  1. Get the current status of the CCBS service using RMobilePhone::GetCCBSStatus(). Status is described by RMobilePhone::TMobilePhoneCCBSStatus.
  2. Use RMobilePhone::NotifyCCBSStatusChange() to get the notification of any changes in the status of the CCBS service.
  3. Deactivate all CCBS requests using RMobilePhone::DeactivateCCBS()
  4. Get a list of active CCBS requests using CRetrieveMobilePhoneCcbsList. The list of active CCBS requests is a CMobilePhoneCcbsList object that contains:

    1. 0 or more RMobilePhone::TMobilePhoneCCBSEntryV1 objects for each request

    2. the name of the call that represents the CCBS request

    3. the service group

    4. a network-allocated index number

    5. the phone number of the remote party

CCBS example

The following code gets the list of active CCBS requests and prints the remote number for each.

The code assumes iMobilePhone is an RMobilePhone object.

void CClientApp::CCBSL()
    {

    // Create and start CCBS retriever
    CRetrieveMobilePhoneCcbsList* retrieveCCBSList = CRetrieveMobilePhoneCcbsList::NewL(iMobilePhone);

    CleanupStack::PushL(retrieveCCBSList);

    TRequestStatus status;
    retrieveCCBSList->Start(status);
    User::WaitForRequest(status);
    User::LeaveIfError(status.Int());

    // Get the list of active CCBS requests
    CMobilePhoneCcbsList* ccbsList = retrieveCCBSList->RetrieveListL();
    CleanupStack::PushL(ccbsList);

    // Print each remote number for which a CCBS request is active
    TInt nEntries = ccbsList->Enumerate();
    RMobilePhone::TMobilePhoneCCBSEntryV1 ccbsEntry;

    for (TInt i=0; i<=nEntries; i++)
        {
         ccbsEntry = ccbsList->GetEntryL(i);
         console->Printf(_L("CCBS request to %S active\n"), ccbsEntry.iDestination.iTelNumber);
        }

    // Clean up
    CleanupStack::PopAndDestroy(2); // ccbsList, retrieveCCBSList    

    }
Related tasks
CCBS Control Tutorial
Related reference
Multimode lists