This page was last modified 08:28, 4 January 2008.
How to terminate call
From Forum Nokia Wiki
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: Etel3rdParty.lib and euser.lib
- Asynchronous call
Since, this is done using an asynchronous call, one can cancel this using CTelephony::EHangupCancel.
#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(); }; 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
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New call problem | Bill_Murray | General Symbian C++ | 4 | 2007-05-27 15:30 |
| How to reject incoming call while ringing | sriramadasu | General Symbian C++ | 5 | 2007-10-05 07:28 |
| My application should call | mayankkedia | General Symbian C++ | 1 | 2006-11-28 04:34 |
| kern-exec 3 problem | noam segal | General Symbian C++ | 10 | 2008-03-03 18:47 |
| outgoing call | matelo | Mobile Java General | 5 | 2007-02-25 19:29 |
