How to resume a call
Article Metadata
If the call is on hold, one can resume the call using CTelephony::Resume(). It is very similar to CTelephony::Hold(). Pass CTelephony::Resume() the call ID to resume the call.
- Asynchronous call
Since, CTelephony::Resume() is asynchronous, CTelephony::EResumeCancel is used to cancel.
Libraries Needed:
Etel3rdParty.lib and euser.lib
Source:
#include <e32base.h>
#include <Etel3rdParty.h>
class CClientApp : public CActive
{
private:
CTelephony* iTelephony;
CTelephony::TCallId iCallId;
public:
CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId);
TInt ResumeCall();
private:
void RunL();
void DoCancel();
};
CClientApp::CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId)
: CActive(EPriorityStandard),
iTelephony(aTelephony),
iCallId(aCallId)
{
//Constructor
}
TInt CClientApp::ResumeCall()
{
//Check that the phone supports Resuming calls.
CTelephony::TCallCapsV1 callCapsV1;
CTelephony::TCallCapsV1Pckg callCapsV1Pckg(callCapsV1);
iTelephony->GetCallDynamicCaps(iCallId, callCapsV1Pckg);
if( callCapsV1.iControlCaps & CTelephony::KCapsResume )
{
//The call represented by 'iCallId' can be resumed
iTelephony->Resume(iStatus, iCallId);
SetActive();
return KErrNone;
}
else
{
//The call cannot be resumed;
//return an error indicate this.
return KErrNotSupported;
}
}
void CClientApp::RunL()
{
if(iStatus==KErrNone)
{
//The call has been resumed successfully;
}
}
void CClientApp::DoCancel()
{
iTelephony->CancelAsync(CTelephony::EResumeCancel);
}


(no comments yet)