Incoming call number OS 9.1
| Mon, 2006-06-19 07:11 | |
|
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 |
|






Forum posts: 30
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
Forum posts: 71
i done it .
thanks to all.
Regards,
Jitendra Kumar
Forum posts: 1
Can you let us know, how you have done it. I am also trying the same code , but not able to retrive the number.
Forum posts: 71
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
Forum posts: 85
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.
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Â
Thanks in advance,
Luca
Forum posts: 1913
instead of
Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant
Forum posts: 85
I' ve noticed that I' ve KErrNotFound here:
Thanks for any clue !
Forum posts: 85
The issue is in GetCallInfo(); I used iCallStatusV1Pckg instead of iCallSelectionV1Pckg, so the right code is:
Bye