Urgent - Unhandled Call Status?
| Tue, 2008-09-02 09:36 | |
|
Hello to you all , My app is initiating a call to a number , i can here the ringing on the other side and i want to respond to it by hangup before the other side is responding . which status is the proper one? EStatusConnected? EStatusConnecting? EStatusRinging? It is Urgent!!! Thanx |
|






Forum posts: 672
Why?
Forum posts: 48
why what ?
Forum posts: 672
Why do you want to hang up before the other side answers?
Forum posts: 48
it is a service number which identifies who called and calls back
Forum posts: 672
Ah. Well sorry to disappoint but I do not know. I'd go ahead with
EStatusRinging, hang up after that and see what happens.Forum posts: 48
i will change the question , after reading your answer :
So if you suggest EStatusRinging - should i understand that EStatusRinging works for incoming calls and for outgoing calls (as in i hear the line ringing on the other side ) ?
Forum posts: 672
That's how I understood it. Could be wrong, as I said, never used CTelephony myself. But I'd assume EStatusConnecting means that the call is being connected over the phone network(s), EStatusRinging that connection is done to the point that we can start ringing, and EStatusConnected means that the call is now connected and we can talk.
But someone must Know (tm) how it really is -- anyone?
Forum posts: 48
If anyone else reads this , i am using the same AO , and the RunL looks like this :
void CCallHandler::RunL()
{
if( iStatus==KErrNone )
{
if (( iLineStatus.iStatus == CTelephony::EStatusDialling ) && (iCurrState==EIdle) )
{
CTelephony::TRemotePartyInfoV1 RemInfoUse;
CTelephony::TCallInfoV1 CallInfoUse;
CTelephony::TCallSelectionV1 CallSelectionUse;
CallSelectionUse.iLine = CTelephony::EVoiceLine;
CallSelectionUse.iSelect = CTelephony::EInProgressCall;
CTelephony::TRemotePartyInfoV1Pckg RemParty(RemInfoUse);
CTelephony::TCallInfoV1Pckg CallInfo(CallInfoUse);
CTelephony::TCallSelectionV1Pckg CallSelection(CallSelectionUse);
iTelephony->GetCallInfo(CallSelection,CallInfo,RemParty);
if(iLineStatus.iStatus == CTelephony::EStatusRinging)
{
CallerNumber.Copy(RemInfoUse.iRemoteNumber.iTelNumber);
}
else if(iLineStatus.iStatus == CTelephony::EStatusDialling)
{
CallerNumber.Copy(CallInfoUse.iDialledParty.iTelNumber);
}
iNotifier->NotifyOutgoingCall(iLineStatus.iStatus, CallerNumber);
/* Request the next notification */
iTelephony->NotifyChange( iStatus,CTelephony::EVoiceLineStatusChange,iLineStatusPckg );
SetActive();
}
else if (( iLineStatus.iStatus == CTelephony::EStatusDialling ) && (iCurrState==ECallService) )
{
iCurrState=EWaitForCallBack;
iTelephony->NotifyChange( iStatus,CTelephony::EVoiceLineStatusChange,iLineStatusPckg );
SetActive();
}
else if( iLineStatus.iStatus == CTelephony::EStatusIdle )
{
CTelephony::TCallParamsV1 callParams;
callParams.iIdRestrict = CTelephony::ESendMyId;
CTelephony::TCallParamsV1Pckg callParamsPckg(callParams);
iCurrState=ECallService;
ServiceNumber.Copy(CallBack);
iTelephony->DialNewCall( iStatus, callParamsPckg, CallerNumber, iCallId);
iNotifier->NotifyOutgoingCall(iLineStatus.iStatus, CallerNumber);
SetActive();
}
else if(( iLineStatus.iStatus == CTelephony::EStatusConnected ) && (iCurrState==ESendingDTMF ))
{
//iTelephony->SendDTMFTones(iStatus,CallerNumber);
iTelephony->Hangup(iStatus,iCallId);
SetActive();
}
else if ( ( iLineStatus.iStatus == CTelephony::EStatusRinging ) && (iCurrState==EWaitForCallBack) )
{
iCurrState=ESendingDTMF;
iTelephony->AnswerIncomingCall(iStatus,iCallId);
SetActive();
}
else if ( ( iLineStatus.iStatus == CTelephony::EStatusRinging ) && (iCurrState==ECallService) )
{
iCurrState=EWaitForCallBack;
iTelephony->Hangup(iStatus,iCallId);
SetActive();
}
}
}
Forum posts: 85
EStatusRinging is for incoming calls. What you are looking for is EStatusConnecting (which means ringing on the other end).
Forum posts: 48
i have tried EStatusConnecting , without success
i know for sure that DialNewCall() works and that i can hear the other side , but after that it is a mystery .
1. should i use the following before calling DialNewCall() , followed by SetActive() ?
iTelephony->CancelAsync( CTelephony::EVoiceLineStatusChangeCancel );2. can i Hangup() from the same RunL() ?
3. Does iLine.iLineStatus changes automatically after each CTelephony method being done (DialNewCall , HangUp etc. )
Thanx!