Incoming call number OS 9.1

Login to reply to this topic.
Mon, 2006-06-19 07:11
Joined: 2005-11-18
Forum posts: 71
HI!

all senior member i am trying to get an incoming call number in symbian os9.1 for 3250. i write some code below all works perfectly but when an incoming call is there on the phone it goes to Telephony::ERemoteIdentityUnknown.
i don't know whats the resaon behind this.

Please help me it is urgent.


CPhoneCapsListener* CPhoneCapsListener :: NewL()
{
   CPhoneCapsListener *self = new(ELeave)CPhoneCapsListener;
   CleanupStack::PushL(self);
   self->ConstructL();
   CleanupStack::Pop();
   return self;   
}



CPhoneCapsListener :: CPhoneCapsListener():CActive(CActive::EPriorityStandard),
iCallStatusV1Pckg(iCallStatusV1), iCallInfoV1Pckg(iCallInfoV1), iCallSelectionV1Pckg(iCallSelectionV1), iRemotePartyInfoV1Pckg(iRemotePartyInfoV1)
{
}


void CPhoneCapsListener :: ConstructL()
{
   iTelephony = CTelephony::NewL();
   CActiveScheduler::Add(this);
}


CPhoneCapsListener :: ~CPhoneCapsListener()
{
   Cancel(); // Cancel any request, if outstanding
   delete iTelephony;
}

void CPhoneCapsListener :: DoCancel()
{
   iTelephony->CancelAsync(CTelephony::EVoiceLineStatusChangeCancel);   
}

void CPhoneCapsListener :: ListenL()
{
   Cancel(); // Cancel any request, just to be sure
   iTelephony->NotifyChange(iStatus, CTelephony::EVoiceLineStatusChange, iCallStatusV1Pckg);   
   SetActive();
}
             

void CPhoneCapsListener :: RunL()
{
if(iStatus == KErrNone)
   {
   CAknInformationNote* note = new (ELeave) CAknInformationNote;
   note->ExecuteLD(_L("hello"));
   User::After(1000000);
   GetNumberL();
   }
else if(iStatus == KRequestPending)
   {
   CAknInformationNote* note = new (ELeave) CAknInformationNote;
   note->ExecuteLD(_L(" "));
   SetActive();
   }
}

void CPhoneCapsListener :: GetNumberL()
{
      iCallSelectionV1.iLine = CTelephony::EVoiceLine;
      iCallSelectionV1.iSelect = CTelephony::EInProgressCall;
      
      iTelephony->GetCallInfo( iCallStatusV1Pckg, iCallInfoV1Pckg, iRemotePartyInfoV1Pckg );

      if(iRemotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentityAvailable)
      {
         iNumber = iRemotePartyInfoV1.iRemoteNumber.iTelNumber;
      }
      else if(iRemotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentityUnknown)
      {
                  //**it always come here
      }
      else if(iRemotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentitySuppressed)
      {
      }

}


Thanks and Regards
Jitendra Kumar

Tue, 2006-06-20 09:55
Forum Nokia Champion
Joined: 2004-08-31
Forum posts: 30
Re: Incoming call number OS 9.1
Caveat: I haven't worked on 9.1 yet.

Two things you could try are:
1. Wait until the call status changes to X, instead of trying to get the number on the first status change (at least on earlier Symbian releases this was necessary for outgoing calls).
2. Try different call selection: EActiveCall instead of EInProgressCall.

(and of course you can check if there _is_ a phone number in the reply, even if it claims that the information is not available).

Please report back if you have any success, I'd be quite interested to know this as well.

   Mika
Tue, 2006-06-20 11:12
Joined: 2005-11-18
Forum posts: 71
Re: Incoming call number OS 9.1
Thanks for the reply mikaraento

i done it .


thanks to all.

Regards,
Jitendra Kumar
Tue, 2006-06-27 18:16
Joined: 2006-06-27
Forum posts: 1
Re: Incoming call number OS 9.1
Hi Jitendra,
   Can you let us know, how you have done it. I am also trying the same code , but not able to retrive the number.
Sat, 2006-07-15 14:03
Joined: 2005-11-18
Forum posts: 71
Re: Incoming call number OS 9.1
hi!
gauravpalvia

the above code of incoming call number work fine.

can anyone help me to find out the soultion whenever any incoming call is therir this exe is closed.
can any one help me how to craete an exe in OS 9.1 or my error in the code given below.

//constructor
CMagicListener::CMagicListener():CActive(EPriorityStandard),
iCallStatusV1Pckg(iCallStatusV1), iCallInfoV1Pckg(iCallInfoV1), iCallSelectionV1Pckg(iCallSelectionV1), iRemotePartyInfoV1Pckg(iRemotePartyInfoV1)
{
}



//destructor
CMagicListener::~CMagicListener()
{
   delete iLight;
   delete iTelephony;
}



//Second phase constructor
CMagicListener* CMagicListener::NewL()
{
   CMagicListener *self=new (ELeave) CMagicListener();
   CleanupStack::PushL(self);
   self->ConstructL();
   CleanupStack::Pop();
   return self;
}



//Second phase constructor ConstructL
void CMagicListener::ConstructL()
{   
   iTelephony = CTelephony::NewL();   
   iLight = CHWRMLight::NewL();
}


void CMagicListener :: ListenL()
{
   
   ErrorFileL(_L("c:\\a_4_1"));
   //iCallStatusV1.iStatus = CTelephony::EStatusUnknown;
   ///iRequestStatus = KRequestPending;
   
   iTelephony->NotifyChange(iRequestStatus, CTelephony::EVoiceLineStatusChange, iCallStatusV1Pckg);
   SetActive();
}

void CMagicListener :: RunL()
{
   ErrorFileL(_L("c:\\a_5_1"));
   if(iRequestStatus != KErrNone)   
      return;
   
   ErrorFileL(_L("c:\\a_5_2"));
   while(1)
   {
      iLight->LightOffL(1);
   }
   
}

void CMagicListener :: DoCancel()
{
   
}

Thanx and Regards
JKS
Tue, 2007-04-17 12:06
Joined: 2006-10-17
Forum posts: 85
Re: Incoming call number OS 9.1
Hi Jitendra,
I' m also trying to get incoming call number on 3250. I can detect ringing status, but when I call GetCallInfo() I also have ERemoteIdentityUnknown.
I've required capabilty (ReadUserData) and I've also tried to add others ones but with the same result.

Code:

void CCallHangup::ListenL()
{
  Cancel(); // Cancel any request, just to be sure
    iTelephony->NotifyChange(iStatus, CTelephony::EVoiceLineStatusChange, iLineStatusPckg);   
  SetActive();
}
             

void CCallHangup::RunL()
{
if(iStatus == KErrNone)
{
if(iLineStatus.iStatus == CTelephony::EStatusRinging)
{
CAknInformationNote* info = new (ELeave) CAknInformationNote;
            info->ExecuteLD(_L("RINGING"));
GetNumberL();
}
    }
}


void CCallHangup::GetNumberL()
{
    iCallSelectionV1.iLine = CTelephony::EVoiceLine;
    iCallSelectionV1.iSelect = CTelephony::EActiveCall;
     
    iTelephony->GetCallInfo(iCallStatusV1Pckg, iCallInfoV1Pckg, iRemotePartyInfoV1Pckg);

iCallId = iCallInfoV1.iCallId;
    if(iRemotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentityAvailable)
    {
        iNumber = iRemotePartyInfoV1.iRemoteNumber.iTelNumber;
    }
   
    else if(iRemotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentityUnknown)
    {
        CAknInformationNote* info = new (ELeave) CAknInformationNote;
info->ExecuteLD(_L("RemoteIdentityUnknown"));
    }
}

Could anybody help me? I really can't find the issue  Cry

Thanks in advance,
Luca
Tue, 2007-04-17 13:34
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 1913
Re: Incoming call number OS 9.1
Use

Code:
iCallSelectionV1.iSelect =CTelephony::EInProgressCall

instead of

Code:
iCallSelectionV1.iSelect = CTelephony::EActiveCall;

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Tue, 2007-04-17 14:05
Joined: 2006-10-17
Forum posts: 85
Re: Incoming call number OS 9.1
Hi Eric, I' ve tried, but with the same result.

I' ve noticed that I' ve KErrNotFound here:

Code:
TInt error = iTelephony->GetCallInfo(iCallStatusV1Pckg, iCallInfoV1Pckg, iRemotePartyInfoV1Pckg);

Thanks for any clue !
Tue, 2007-04-17 14:19
Joined: 2006-10-17
Forum posts: 85
Re: Incoming call number OS 9.1
Problem solved!

The issue is in GetCallInfo(); I used iCallStatusV1Pckg instead of iCallSelectionV1Pckg, so the right code is:

Code:
iTelephony->GetCallInfo(iCallSelectionV1Pckg, iCallInfoV1Pckg, iRemotePartyInfoV1Pckg);

Bye
  • Login to reply to this topic.