dial a number after hangingup
| Thu, 2007-11-15 00:24 | |
|
Hi I encounter 2 problems: 2) When DialNewCall succeeds ,if for some reason I get an Idle event (for e.g if dest is shut down),I use CancelAsync(),DialCancel() and than Close() the call,but many times the device gets stuck after doing that. What would you suggest me to change in order to make this code more stable? (without the device getting stuck and calls that doesn't work) Thank you //Event:Dialing RLine::TLineInfo lineInfo; iLine.GetInfo(lineInfo); TInt openExisting = User::LeaveIfError(iCall.OpenExistingCall(iLine,lineInfo.iNameOfLastCallAdded)); RMobileCall::TMobileCallInfoV1 iRemotePartyInfo; RMobileCall::TMobileCallInfoV1Pckg des(iRemotePartyInfo); iCall.GetMobileCallInfo(des); iRemotePartyInfo = des(); TBuf<30> callerNumber; callerNumber.Append(iRemotePartyInfo.iDialledParty.iTelNumber); //Hangup the call (from AppUi class): TKeyEvent key2; TRawEvent ev1; TRawEvent ev2; RWsSession ws; ws.Connect(); key2.iCode =EKeyNo; key2.iModifiers = 0; key2.iRepeats = 0; key2.iScanCode =EStdKeyNo; ws.SimulateKeyEvent(key2); ws.Flush(); ev1.Set(TRawEvent::EKeyDown, EStdKeyNo); UserSvr::AddEvent(ev1); ev2.Set(TRawEvent::EKeyUp, EStdKeyNo); UserSvr::AddEvent(ev2); ws.Close(); //Event:Idle - make a new call iCall.Close(); TBuf <100> newCallName; User::LeaveIfError(iCall.OpenNewCall(iLine, newCallName)); CTelephony::TTelNumber telNumber(tsdNum->Des()); CTelephony::TCallParamsV1 callParams; callParams.iIdRestrict = CTelephony::ESendMyId; CTelephony::TCallParamsV1Pckg callParamsPckg(callParams); iTelephony->DialNewCall(iStatus,callParamsPckg,telNumber,iCallId,CTelephony::EVoiceLine); //if I dont get connecting event (number not available) iCall.DialCancel(); iTelephony->CancelAsync(CTelephony::EDialNewCallCancel); iCall.Close(); User::WaitForRequest(iStatus); Cancel() |
|






Forum posts: 127
Hi
Update:
it seems that these problems occures on Dual mode.
switching to GSM is not a good solution cause I need this code to work also in Dual.
Have a great Week !
Forum posts: 127
I think that maybe "restarting" the active object after the call hangs up would solve many problems.
Does it sound like a possible solution?
if it is a possible solution,the question is how do I restart the Active object from the active object itself?
Any tips would help