Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 08:32, 4 January 2008.

How to hold a call

From Forum Nokia Wiki

To hold a call we can use CTelephony::Hold(). Pass the call ID to CTelephony::Hold(). The ID is the CTelephony::TCallId returned when you dialled or answered the call.

  • Libraries Needed: Etel3rdParty.lib and euser.lib
  • Asynchronous call

Since, this is done using an asynchronous call, one can cancel this using CTelephony::EHoldCancel.


#include <e32base.h>
#include <Etel3rdParty.h>
 
class CClientApp : public CActive
{
private:
    CTelephony* iTelephony;
    CTelephony::TCallId iCallId;
 
public:
    CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId);
    TInt HoldCall();
 
private:
    void RunL();
    void DoCancel();
   };
 
CClientApp::CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId)
    : CActive(EPriorityStandard),
      iTelephony(aTelephony),
      iCallId(aCallId)
    {
    //Constructor
    }
 
TInt CClientApp::HoldCall()
    {
    //Check that the phone supports holding calls.
    CTelephony::TCallCapsV1 callCapsV1;
    CTelephony::TCallCapsV1Pckg callCapsV1Pckg(callCapsV1);
    iTelephony->GetCallDynamicCaps(iCallId, callCapsV1Pckg);
 
    if( callCapsV1.iControlCaps & CTelephony::KCapsHold )
       {
       //The call represented by 'iCallId' can be put on hold
       iTelephony->Hold(iStatus, iCallId);
       SetActive();
       return KErrNone;
       }
    else
       {
       //The call cannot be put on hold;
       //Return an error indicate this.
       return KErrNotSupported;
       }
}
 
void CClientApp::RunL()
    {
    if(iStatus==KErrNone)
       {
         //The call has been held successfully;
       }
    }
 
void CClientApp::DoCancel()
    {
    iTelephony->CancelAsync(CTelephony::EHoldCancel);
    }





Wiki Internal Links


Related Discussions
Thread Thread Starter Forum Replies Last Post
call settings nsivach General Symbian C++ 9 2007-09-07 14:45
Can't launch task manager from app ten foot ninja General Symbian C++ 5 2006-07-10 17:36
Nokia 7610 DDF vreddy@intellisync.com OMA DM/DS/CP 3 2005-11-14 18:48
N70 BT problem: Can't find other devices!!! bimbalas Bluetooth Technology 5 2008-01-27 19:26
Help Required(Calling a number when in browser) santy563 General Browsing 2 2008-05-11 15:49
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX