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.

Phone Client Extension API

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: ltomuta (16 Jun 2007)
Last edited: hamishwillee (30 May 2013)

Note.pngNote: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.



The general purpose of using Phone Client Extension API is for performing Voice Call related functionalities like muting/unmuting microphone during a call, muting the default ringtone when phone ringing starts. Apart from these, the phone client extension API can also be used for general voice call functionalities like Answer an incoming call, hold up/ resume, hangup call, call transfer, basic Multiparty call. This can also be used to handle VoIP calls.

Phone Client Extension does not provide apis for removing a participant from basic multi party conversation.

To have more control over mutiparty conversation, for example to remove a single participant from multiparty conversation, we have to implement call dialing part with CTelephony. So that we can track individual call with their call ids and removing a particular participant can be easily done with CTelephony Hangup.

Use cases

How to build an application to implement code which does mute the default ring tone and mute/un mute the microphone volume of the phone,basic Call transfer and Multi party conversation.

Sample application is attached which can be used to answer, hangup/resume and hold VoIP calls using phone client extension apis.

Example code

Header files: PhCltExt.h, RPhCltServer.h
Libraries: Phoneclient.LIB

_LIT( KPhCltExtLib, "PhoneClientExt.dll" );
RLibrary iLibrary;
CPhCltExtFactory* iFactory = NULL; // Factory class for creating command handler
User::LeaveIfError( iLibrary.Load( KPhCltExtLib ) ); // Load PhoneClientExt dll
TInt res = 0; TInt err=0;
TRAP(err,res = iLibrary.Lookup( 1 )());
if ( !err )
{// Factory creation was successful.
iFactory = reinterpret_cast< CPhCltExtFactory * >( res );}
CPhCltCommandHandler* iCommandHandler = NULL;
if ( iFactory )
{// Factory creation was successful, create Command Handler.
iCommandHandler = iFactory->CPhCltCommandHandlerLD();
RPhCltServer iPhoneClient;
User::LeaveIfError ( iPhoneClient.Connect() ); //connect to Phone Server
iCommandHandler->Open( iPhoneClient );
// Muting the default ringing tone
TRequestStatus status;
// For Muting microphone volume
TRequestStatus status;
iCommandHandler->MuteMicrophone( status,ETrue);
// For Un muting microphone volume
TRequestStatus status;
iCommandHandler->MuteMicrophone( status,EFalse);
//For Adding new call
//EPhCltChldThree Add a held call to the conversation.
//This Code adds a participant to Multi party conversation
//For hold/resume call
//EPhCltChldTwo Place all active calls on hold and accept the other
//(held or waiting) call.
//For Hang up call
iPhCommandHandler->Chup( iStatus );
//For Transfering call
//EPhCltChldFour Connect the two calls and disconnect the subscriber from both
//calls (Explicit call transfer).

Example Application

This page was last modified on 30 May 2013, at 04:35.
107 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.