Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Make call with CTelephony

From Wiki
Jump to: navigation, search

CCallDialer example illustrates how to dial a new call using CTelephony. Note that this example is intended to be used only with S60 3rd Edition devices, and does not work with pre-3rd Edition devices.

Article Metadata
CompatibilityPlatform Security
Signing Required: Self-Signed
Capabilities: NetworkServices
Created: symbianyucca (27 Mar 2007)
Last edited: hamishwillee (30 May 2013)

To use this example first implement the callback interface function in the implementing class and then construct an instance of the CCallDialer. The call dialing starts automatically after the construction. In case the process is successful and the callee answers the call, RunL() will be called with KErrNone; otherwise the aError argument variable will indicate the error.

Headers required:

#include <Etel3rdParty.h>

Library required:

LIBRARY etel3rdparty.lib

Capabilities required:

CAPABILITY NetworkServices

To instantiate the CCallDialer, from the observing class, use something like this:

iCallDialer = CCallDialer::NewL(*this, phoneNumber1);

Then, in the notifier method of the instantiating class, you may remove the dialer and optionally check status:

void CBoopCtlContainer::CallDialedL(TInt aError)
delete iCallDialer, iCallDialer = NULL;

You may subsequently dial another number by going try the same sequence:

iCallDialer = CCallDialer::NewL(*this, phoneNumber2);


#include "MakeCall.h"
CCallDialer* CCallDialer::NewL(MDialObserver& aCallBack, const TDesC& aNumber)
CCallDialer* self = CCallDialer::NewLC(aCallBack, aNumber);
return self;
CCallDialer* CCallDialer::NewLC(MDialObserver& aCallBack, const TDesC& aNumber)
CCallDialer* self = new (ELeave) CCallDialer(aCallBack);
return self;
delete iTelephony;
void CCallDialer::ConstructL(const TDesC& aNumber)
iTelephony = CTelephony::NewL();
CTelephony::TTelNumber telNumber(aNumber);
iCallParams.iIdRestrict = CTelephony::ESendMyId;
iTelephony->DialNewCall(iStatus, iCallParamsPckg, telNumber, iCallId);
CCallDialer::CCallDialer(MDialObserver& aObserver)
: CActive(EPriorityNormal),iObserver(aObserver), iCallParamsPckg(iCallParams)
void CCallDialer::RunL()
void CCallDialer::DoCancel()


#include <Etel3rdParty.h>
// link to etel3rdparty.lib
class MDialObserver
virtual void CallDialedL(TInt aError) = 0;
class CCallDialer : public CActive
static CCallDialer* NewL(MDialObserver& aCallBack, const TDesC& aNumber);
static CCallDialer* NewLC(MDialObserver& aCallBack, const TDesC& aNumber);
CCallDialer(MDialObserver& aObserver);
void ConstructL(const TDesC& aNumber);
void RunL();
void DoCancel();
MDialObserver& iObserver;
CTelephony* iTelephony;
CTelephony::TCallId iCallId;
CTelephony::TCallParamsV1 iCallParams;
CTelephony::TCallParamsV1Pckg iCallParamsPckg;
This page was last modified on 30 May 2013, at 03:53.
53 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.