outgoing call listener!!!
| Sat, 2005-03-05 11:01 | |
|
Hi all,
I have a RunL method in my outgoing call observer, I want this observer, can these jobs inorder: detect outgoing call, disconnect it, diall a new number and then write '1000' to a file, This RunL has tested in nokia 3650(symbian ver6.1), SonyEricsson p900(UIQ2.1), this works cool in those platforms, now I am testing it for Nokia6600(SymbianVer7), But when I run it, it act in this order: detect call, disconnect it, dial a new number but it can't write 1000 to file, I traced it and I found that after Dialing a new number it can't detect another Call State, it writes '2000' to file which means there is an error in iState, but the Dial method returns 0(means KNonErr) ![]() I don't know what is wrong??? Can u help me to find it? here is the RunL: (iIsMakedDial is set to False at first) void CCallObserver::RunL() { if (iStatus == KErrNone) { if (iCallStatus == RCall::EStatusHangingUp || iCallStatus == RCall::EStatusIdle || iCallStatus == RCall::EStatusUnknown) { iCall.Close(); if(iIsMakedDial) { TBuf <100> newCallName; iCall.OpenNewCall(iLine, newCallName); iCall.Dial(_L("054879659")); iLine.NotifyStatusChange(iStatus, iCallStatus); } else { iLine.NotifyStatusChange(iStatus, iCallStatus); } } else if(iCallStatus == RCall::EStatusDialling) { if(iIsMakedDial) { iIsMakedDial = EFalse; WriteToFile(1000); } else { iIsMakedDial = ETrue; RLine::TLineInfo lineInfo; iLine.GetInfo(lineInfo); iCall.OpenExistingCall(iLine, lineInfo.iNameOfLastCallAdded); iCall.HangUp(); iLine.NotifyStatusChange(iStatus, iCallStatus); } } else if(iCallStatus == RCall::EStatusConnecting) { iLine.NotifyStatusChange(iStatus, iCallStatus); } else if(iCallStatus == RCall::EStatusConnected) { iLine.NotifyStatusChange(iStatus, iCallStatus); } else if(iCallStatus == RCall::EStatusAnswering) { iLine.NotifyStatusChange(iStatus, iCallStatus); } else if(iCallStatus == RCall::EStatusRinging) { iLine.NotifyStatusChange(iStatus, iCallStatus); } else { iLine.NotifyStatusChange(iStatus, iCallStatus); } SetActive(); } else { WriteToFile(2000); } } |
|







Forum posts: 67
I tested all situation and now I have detected when the call disconnects whethear manually or by calling iCall.HangUp(), the iState will be get an error code, so the RunL can't be continued,
But I don't know why,
I also comment the first if block of RunL:
if (iCallStatus == RCall::EStatusHangingUp || iCallStatus == RCall::EStatusIdle || iCallStatus == RCall::EStatusUnknown)......
But whenever the call gets a disconnection the I got 2000 in the file
what should I do?
Guide me please!!!
Forum posts: 67
please listen my question as new from here:
I have a simple RunL of my outgoing call observer:
if I call Dial method in RunL, the iState set to -9 means: KErrOverflow
The simple RunL is here:
void CCallObserver::RunL()
{
if (iStatus == KErrNone)
{
if (iCallStatus == RCall::EStatusHangingUp || iCallStatus ==
RCall::EStatusIdle || iCallStatus == RCall::EStatusUnknown)
{
iCall.Close();
if(iIsMakedDial)
{
TBuf <100> newCallName;
iCall.OpenNewCall(iLine, newCallName);
iCall.Dial(_L("088784454"));
iLine.NotifyStatusChange(iStatus, iCallStatus);
}
else
{
iLine.NotifyStatusChange(iStatus, iCallStatus);
}
}
else if(iCallStatus == RCall::EStatusDialling)
{
iIsMakedDial = true;
RCall iCall;
RLine::TLineInfo lineInfo;
iLine.GetInfo(lineInfo);
TInt aResult = User::LeaveIfError(iCall.OpenExistingCall(iLine, lineInfo.iNameOfLastCallAdded));
iCall.HangUp();
iLine.NotifyStatusChange(iStatus, iCallStatus);
}
SetActive();
}
else
{
WriteToFile(iStatus.Int());// I get -9 here when Dial method is called
}
}
what does it mean?