Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Handling two calls at once

This state diagram shows how to dial or answer one or two calls at a time. It presume that no other code is making any calls; only you are making calls.

The boxes are states. The 'E...' value in each box is the status of the phone's voice line. Voice line status describes these states and their meaning. You can also find the status of individual calls; see Status of voice calls you own

The arrows show events that trigger a change of state. In these events, a word in bold indicates a CTelephony method that you can call.

To dial or answer a call:

  1. Check for other calls by getting the Voice line status.

  2. Dialling a call

    While no calls are in progress, the line's status is CTelephony::EStatusIdle. To dial a call, use CTelephony::DialNewCall(); see Dial a call. If dialling was successful and the remotes party answers the call then the line's status will become CTelephony::EStatusConnected.

    Answering a call

    While no calls are in progress, the line's status is CTelephony::EStatusIdle. When a remote party calls your phone, the voice line's status will change to CTelephony::EStatusRinging. Detect an incoming call describes how to detect this change.

    When the status is CTelephony::EStatusRinging, use CTelephony::AnswerIncomingCall() to answer the call. The status will change to CTelephony::EStatusConnected and the phone user can talk to the remote party.

  3. What next?

    When you successfully dial or answer a call, you will be given a CTelephony::TCallId the identifies the call. You must keep this safe. To control your call (hang-up, hold, resume etc) you call CTelephony methods. Each method must be passed the ID of a call to operate on.

    Once a call is connected you have a number of options. You can perform these operations on your call. They are the same as those in Handling one call at a time:

    In addition, you can dial or answer a second call:

    Answer a second call

    At some point, a remote party might try to ring your phone. It is answered in the same way as the first.

    The voice line state will change to CTelephony::EStatusRinging. You can receive notification when this occurs; see Detect an incoming call. Before answering the second call, you must put the original call on hold. This is shown in the diagram above.

    Dial a second call

    You can also dial a second call in the same way as the first. Once again, you must put your original call on hold before dialling the second call.

  4. A CTelephony::TCallId will be given to you when you successfully connect a second call. You will also have a CTelephony::TCallId from the first call. Now you will be the owner of two calls: at any one time, one will always be active and one will always be on hold.

    Now you can: