You Are Here:

Community: Wiki

This page was last modified on 17 September 2009, at 04:42.

Automatic Voice Call Recording

From Forum Nokia Wiki

Reviewer Approved   

Introduction

This article describes how we can record a voice call automatically by 3rd party application. When ever we receive a phone call then there are state change in CTelephony class. If we monitor the state and when the state is changed is detected to CTelephony::EStatusConnected then we can start recording (for example). When the state is changed to CTelephony::EStatusDisconnecting then we can stop recording. Following code example shows how to do this.

// We get a notification from telephony subsytem.
void CHelloWorldBasicAppUi::CallStatusChangedL(CTelephony::TCallStatus& aStatus, TInt aError)
{
if(aError != KErrNone) // Some thing wrong, we should handle though this example doesn't
{
return;
}
switch(aStatus)
{
case CTelephony::EStatusConnected:
{
//Recording start by HandleCommandL() method
HandleCommandL(EProgCmdRecord);
}
break;
case CTelephony::EStatusDisconnecting:
case CTelephony::EStatusHold:
{
//Recording stop by HandleCommandL() method
HandleCommandL(EProgCmdStop);
}
break;
default:
break;
}
}

Call status is updated to the previous class by the following code.

void CCallMonitor::RunL()
{
iCallBack.CallStatusChangedL(iCurrentStatus.iStatus, iStatus.Int());
StartListening();
}
 
void CCallMonitor::StartListening()
{
Cancel();
iCurrentStatus.iStatus = CTelephony::EStatusUnknown;
iTelephony->NotifyChange(iStatus,CTelephony::EVoiceLineStatusChange,iCurrentStatusPckg);
SetActive();
}

We need to create CMdaAudioRecorderUtility class with a priority and preferences as shown by the following code.

#define KAudioPriority   80
#define KAudioPreference 0x00060001
 
iRecorderUtility = CMdaAudioRecorderUtility::NewL(
*this,
NULL,
KAudioPriority,
(TMdaPriorityPreference)KAudioPreference);

Example Applications

When we receive a call the call is automatically recorded to a file. That file can be played with a player. The application is tested with N95 8GB, complete source code can be found here: File:CallAudioRecord 31.zip

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fFileE3aMicrokernelE5fArchitectureE2eGIFX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ
User Rating: qfnZuserE5FratingQNx1E2E0000X
RDF Facets: qfnZuserE5FtagQSxautomaticE20voiceE20callE20recordingX