×
Namespaces

Variants
Actions

How to terminate call

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: polaka_sr (30 Dec 2007)
Last edited: hamishwillee (26 Jul 2012)

This is done using CTelephony using CTelephony::Hangup().

Pass the call ID to CTelephony::Hangup() to terminate the call. The ID is the CTelephony::TCallId returned when you dialled or answered the call.

Libraries Needed:

LIBRARY Etel3rdParty.lib euser.lib

Capabilities Needed:

CAPABILITY NetworkServices

Header

#include <e32base.h>
#include <Etel3rdParty.h>
 
class CClientApp : public CActive
{
 
private:
CTelephony* iTelephony;
CTelephony::TCallId iCallId;
 
public:
CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId);
void TerminateCall();
 
private:
void RunL();
void DoCancel();
};

Source

CClientApp::CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId)
: CActive(EPriorityStandard),
iTelephony(aTelephony),
iCallId(aCallId)
{
//Constructor
}
 
void CClientApp::TerminateCall()
{
iTelephony->Hangup(iStatus, iCallId);
SetActive();
}
 
void CClientApp::RunL()
{
if(iStatus==KErrNone)
{
//The call has been terminated successfully;
}
}
 
void CClientApp::DoCancel()
{
iTelephony->CancelAsync(CTelephony::EHangupCancel);
}

Wiki Internal Links

This page was last modified on 26 July 2012, at 02:03.
43 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.

×