
Chapter 19: Wireless Wide-Area Networking
Processing Voice Calls
Psion Mobile Devices Developers Guide
222
19.13.7 Processing Voice Calls
This section outlines the voice call states.
Incoming Call
An incoming call generates a VoiceCallManager incoming call event with a voice call state of Incoming if it
is the only call being received.
Call Waiting
Call waiting must be available from the WWAN network provider and enabled on the computer before an
incoming call can be placed in this state. Use GetCallWaitingEnabled to check this status. If call waiting is
not already enabled, use SetCallWaitingEnabled to enable call waiting.
An incoming call generates a VoiceCallManager incoming call event with a voice call state of Call waiting if
another call is in the voice call state of Active. There can be only one call at a time in the call waiting state.
Placing The Active Call On Hold And Answering The Waiting Call
If there is an active call, use AnswerIncoming to place the active call on hold, and to answer the
waiting call.
If there is one or more calls on hold, then the active call joins them on hold. The held calls can converse in a
multiparty call excluding you. The incoming call becomes the new active call. If you do not want this to
happen either the active call or the held call must be disconnected before AnswerIncoming is called.
Placing The Active Call On Hold And Answering The Held, Or The Waiting, Call
Use SwapHeldAndActive. This function does one of the following:
• Places the active call on hold, and makes the held call active, or
• Places the active call on hold, and makes the waiting call active.
This function fails if there is both a held call and a waiting call.
L"Answer incoming call from: \"%s\"?\r\nPress NO to reject the call.",
incomingCall.GetOtherPartyCallerId().c_str());
// Please note: It is not recomended that you block this thread,
// the next event will not be received untill this handler returns.
// This blocking message box is here to keep this demo app simple.
int rc = MessageBox(0, messageBuffer, L"Incoming Call",
(MB_YESNOCANCEL | MB_TOPMOST | MB_SETFOREGROUND));
// The user responded, don't need to play the ring tone any more.
// From the PsionTeklogix::Sound namespace.
StopRepeatingWave();
if (rc == IDYES)
{
// answer the incoming call
incomingCall.AnswerIncoming();
}
else if (rc == IDNO)
{
// reject the incoming call
incomingCall.RejectIncoming();
}
else
{
// call was ignored
}
}
catch(std::runtime_error&)
{
// If we are here, the call was probably terminated before the user responded
// to the messagebox, the object is no longer valid.
}
}
};
Comentarios a estos manuales