Hi
I try this code in order to detect a dialling status and hang up the call.
This code works on the Sony Ericsson P900 but it doesn't work on the Nokia 6600 !!!
please help me understand what to change or add in order to succeed also on the Nokia 6600 ,
Thanks in advance , TE
Code:void CActiveClass::RunL() { if (iStatus == KErrNone) { if (iCallStatus == RCall::EStatusHangingUp || iCallStatus == RCall::EStatusIdle || iCallStatus == RCall::EStatusUnknown) { iCall.Close(); //iCall is declared as RMobileCall } else if(iCallStatus == RCall::EStatusDialling) { RLine::TLineInfo lineInfo; iLine.GetInfo(lineInfo); //iCall is declared as RMobileCall TInt aResult = User::LeaveIfError(iCall.OpenExistingCall(iLine, lineInfo.iNameOfLastCallAdded)); iCall.HangUp(); iCall.Close(); } iLine.NotifyStatusChange(iStatus, iCallStatus); SetActive(); } } CActiveClass* CActiveClass::NewL() { CActiveClass* self = new (ELeave) CActiveClass(); CleanupStack::PushL(self); self->ConstructL(); CleanupStack::Pop(self); return self; } CActiveClass::CActiveClass() : CActive(0) { iLineInited = EFalse; iCallActive = EFalse; } void CActiveClass::ConstructL() { User::LeaveIfError(iTimer.CreateLocal()); TRequestStatus aStatus; iEnv = CEikonEnv::Static(); CActiveScheduler::Add(this); StartObserver(); } void CActiveClass::StartObserver() { Cancel(); if (InitializePhone() == KErrNone) { iLine.NotifyStatusChange(iStatus, iCallStatus); SetActive(); } } TInt CActiveClass::InitializePhone() { TInt theError; if (iLineInited) { return KErrNone; } theError = iTelServer.Connect(); // Find the number of phones available from the tel server TInt numberPhones; theError = iTelServer.EnumeratePhones(numberPhones); // Read the TSY module name theError = iTelServer.GetTsyName(0, iTsyName); // Load in the phone device driver theError = iTelServer.LoadPhoneModule(iTsyName); // Get info about the first available phone RTelServer::TPhoneInfo info; theError = iTelServer.GetPhoneInfo(0, info); // Use this info to open a connection to the phone, the phone is identified by its name theError = iPhone.Open(iTelServer, info.iName); RPhone::TLineInfo lineInfo; theError = iPhone.GetLineInfo(0, lineInfo); theError = iLine.Open(iPhone, lineInfo.iName); iLineInited = ETrue; return KErrNone; }



