How to identitfy Calls?

Login to reply to this topic.
Sat, 2003-12-27 12:17
Joined: 2003-12-11
Forum posts: 14
hi,

Can i identify the incoming calls ? I need to identify th incoming calls for my application.

How should i get started?

which are the APIs supported?

Is there any documentation or sample codes
which can help me?

thanks

Sun, 2003-12-28 04:45
Joined: 2003-10-11
Forum posts: 15
How to identitfy Calls?
1) You have to load the right phone module

2) open the first line in the first phone of your device
( technically you should enumerate the phones, open the one with voice capability and enumerate the lines in it and open again the line with voice capability )

3) make the request "NotifyHookChange" asynchrously on this line through an active object.

4) In the RunL of the active object , look for the returned value for the hook status obejct passed to "NotifyHookChange"

It could be

RCall::EHookStatusOff
   or
RCall::EHookStatusOn

and are explanative in meaning.

I avoided pasting code hoping that this would help.

Good luck,
Naren
Sat, 2004-01-10 13:48
Anonymous (not verified)
Forum posts: 2043
How to identitfy Calls?
hi Naren,

thanks for info! and sorry for writing a bit late.

I am able to identify the incoming calls through telephony apis exposed by UIQ. It notifies me about the incoming call. But, i am not able to get the incoming call's caller id i.e phone number. Is there any way to get incoming caller's number.

I have seen in the forum that it is possible through log apis but don't know how to go about it. Can you guide me through this. Please help me as i am fairly new to Symbian OS.

Thanks once again!
gsmartphone.
Sat, 2004-01-10 14:11
Joined: 2003-12-11
Forum posts: 14
How to identitfy Calls?
sorry for the above post which got posted as guest
Thu, 2004-06-03 09:40
Joined: 2004-05-20
Forum posts: 52
How to identitfy Calls?
if anyone can share a getting-started on accessing the logs and identifying the sender number of incoming calls and sms...

TIA.
Thu, 2004-06-03 12:04
Anonymous (not verified)
Forum posts: 2043
How to identitfy Calls?
Not possible on the P 800/900.
Thu, 2004-06-03 12:08
Joined: 2003-05-27
Forum posts: 363
How to identitfy Calls?
P800/P900 call log APIs are unexposed. Caller ID is possible though.

-Pawel
Thu, 2004-06-03 18:54
Joined: 2004-05-24
Forum posts: 23
How to identitfy Calls?
Quote from: pawel
P800/P900 call log APIs are unexposed. Caller ID is possible though.
Any suggestions or pointers? I tried the GetMobileCallInfo method on my RMobileCall, and it didn't give me the number. I've also had no luck with Hold or Deflect. The basic Etel phone control functionality is working wonderfully however.

Thanks,

-bhima
Sat, 2004-06-05 15:18
Joined: 2004-06-05
Forum posts: 5
How to identitfy Calls?
Hi,

I have tried to build an app that could retrieve incoming call. I work in Nokia 3650. Here is the code:

///////////////////////////////////////
// ActiveIncomingCallObserver.cpp //
///////////////////////////////////////

#ifndef __ACTIVEINCOMINGCALLOBSERVER__
#define __ACTIVEINCOMINGCALLOBSERVER__

#include <etel.h>
#include <EIKENV.H>

#include "IncomingCallObserverInterface.h"
#include "IncomingCallObserver.h"

#include <e32base.h>

//tel num
#include <logcli.h>
#include <logview.h>
#include <f32file.h>
#include <logwrap.h>
#include <e32svr.h>
#include <aknnotewrappers.h>



class CActiveIncomingCallObserver : public CActive
{
public:
CActiveIncomingCallObserver(MIncomingCallObserverInterface* aObserver);
~CActiveIncomingCallObserver();
void ConstructL();
void StartObserver();

public:
CLogViewRecent* iRecentLogView;
RFs iFs;
CLogClient* iLogClient;
//void GetLatest();

private:
virtual void DoCancel();
virtual void RunL();

private:
TInt InitializePhone();
void ReleasePhone();

private:
MIncomingCallObserverInterface* iObserver;

RCall::TStatus iCallStatus;
TName iName;

TBool iLineInited;
TBuf <40> iTsyName;
RTelServer iTelServer;
RPhone iPhone;
RLine iLine;

TBool iCallActive;
RAdvGsmCall iCall;

};
#endif


////////////////////////////////////
// ActiveIncomingCallObserver.cpp //
////////////////////////////////////

#include "ActiveIncomingCallObserver.h"
#include <apgtask.h>
#include <aknnotewrappers.h>

CActiveIncomingCallObserver::CActiveIncomingCallObserver(MIncomingCallObserverInterface* aObserver)
: CActive(0)
{
iObserver = aObserver;
iLineInited = EFalse;
iCallActive = EFalse;
}

CActiveIncomingCallObserver::~CActiveIncomingCallObserver()
{
// Cancel any request, if outstanding
if (IsActive())
{
Cancel();
}
else
{
ReleasePhone();
}
}

void CActiveIncomingCallObserver::ConstructL()
{
CActiveScheduler::Add(this);
}

void CActiveIncomingCallObserver::DoCancel()
{
ReleasePhone();
//iRecentLogView->Cancel();
}

void CActiveIncomingCallObserver::RunL()
{
if (iStatus == KErrNone)
{
if (iCallActive)
{
// We are polling for the RCall status
if (iCallStatus == RCall::EStatusHangingUp || iCallStatus == RCall::EStatusIdle || iCallStatus == RCall::EStatusUnknown)
{
iCallActive = EFalse;
iCall.Close();
iLine.NotifyIncomingCall(iStatus, iName);
if (iObserver)
{
iObserver->IncomingCallObserverInterface_HandleItL();
}
}
else
{

iCallActive = EFalse;
iCall.NotifyStatusChange(iStatus, iCallStatus);
User::WaitForRequest(iStatus);
}
//GetLatest();
}
else
{
// There's an incoming call!
iCallActive = ETrue;
iCall.OpenExistingCall(iLine, iName);

// I add my function here to answer then hanging up
iCall.AnswerIncomingCall (iStatus);
User::WaitForRequest(iStatus);

iCall.NotifyStatusChange(iStatus, iCallStatus);
User::WaitForRequest(iStatus);
iCall.HangUp(iStatus);
User::WaitForRequest(iStatus);

// Here I add codes for retrieving caller number
iFs.Connect();
iLogClient = CLogClient::NewL(iFs);
iRecentLogView = CLogViewRecent::NewL(*iLogClient);
iRecentLogView->SetRecentListL(KLogNullRecentList,iStatus);
User::WaitForRequest(iStatus);
TBuf<20> iTelNumber;
const CLogEvent& event = iRecentLogView->Event();
iTelNumber.Copy(event.Number());
CAknInformationNote *notify=new (ELeave) CAknInformationNote;
notify->ExecuteLD(iTelNumber);

iCall.NotifyStatusChange(iStatus, iCallStatus);
}
// And we re-enable the polling
SetActive();
}
}

void CActiveIncomingCallObserver::StartObserver()
{
// Just in case - but we should not need it!
Cancel();
if (InitializePhone() == KErrNone)
{
// Tells scheduler a request is active
SetActive();
}
}

TInt CActiveIncomingCallObserver::InitializePhone()
{
TInt theError;
if (iLineInited)
{
return KErrNone;
}
theError = iTelServer.Connect();
if (theError)
{
return theError;
}
// Find the number of phones available from the tel server
TInt numberPhones;
theError = iTelServer.EnumeratePhones(numberPhones);
if (theError)
{
iTelServer.Close();
return theError;
}
// Check there are available phones
if (numberPhones < 1)
{
iTelServer.Close();
return KErrNotFound;
}
// Read the TSY module name
theError = iTelServer.GetTsyName(0, iTsyName);
if (theError != KErrNone)
{
iTelServer.Close();
return theError;
}
// Load in the phone device driver
theError = iTelServer.LoadPhoneModule(iTsyName);
if (theError)
{
iTelServer.Close();
return theError;
}
// Get info about the first available phone
RTelServer::TPhoneInfo info;
theError = iTelServer.GetPhoneInfo(0, info);
if (theError)
{
iTelServer.UnloadPhoneModule(iTsyName);
iTelServer.Close();
return theError;
}
// Use this info to open a connection to the phone, the phone is identified by its name
theError = iPhone.Open(iTelServer, info.iName);
if (theError)
{
iTelServer.UnloadPhoneModule(iTsyName);
iTelServer.Close();
return theError;
}
// Get info about the first line from the phone
RPhone::TLineInfo lineInfo;
theError = iPhone.GetLineInfo(0, lineInfo);
if (theError)
{
iPhone.Close();
iTelServer.UnloadPhoneModule(iTsyName);
iTelServer.Close();
return theError;
}
// Use this to open a line
theError = iLine.Open(iPhone, lineInfo.iName);
if (theError)
{
iPhone.Close();
iTelServer.UnloadPhoneModule(iTsyName);
iTelServer.Close();
return theError;
}
iLine.NotifyIncomingCall(iStatus, iName);
iLineInited = ETrue;

return KErrNone;
}

void CActiveIncomingCallObserver::ReleasePhone()
{
if (iLineInited)
{
if (iCallActive)
{
iCall.NotifyStatusChangeCancel();
iCall.Close();
}
else
{
iLine.NotifyIncomingCallCancel();
}
iLine.Close();
iPhone.Close();
iTelServer.UnloadPhoneModule(iTsyName);
iTelServer.Close();
iLineInited = EFalse;
}
}


but I seem still have a problem. If there's an incoming call to my phone, then I receive the call, the app crash after the call ended. Does anyone find where i do an error? Please help me...


Eric
Fri, 2004-06-11 06:04
Joined: 2004-05-20
Forum posts: 52
How to identitfy Calls?
Quote from: bhima
I tried the GetMobileCallInfo method on my RMobileCall...
-bhima

hi, bhima!

how'd u use GetMobileCallInfo? i ask because these are the only ones i found in my etelmm.h:
IMPORT_C TInt GetMobileCallInfo(TDes8& aCallInfo) const;
IMPORT_C TInt GetMobileCallInfo(TInt aIndex, TDes8& aCallInfo) const;

i need to get TMobileCallInfoV1. if there's another function that does this, please make it obvious to me.

tnx.
Fri, 2004-06-11 09:27
Joined: 2004-05-20
Forum posts: 52
How to identitfy Calls?
does anyone have the file etelmm.lib for wins?
Fri, 2004-06-11 12:58
Joined: 2003-10-22
Forum posts: 100
How to identitfy Calls?
Hey,

TMobileCallInfoV1 class will be returned to to in the aCallInfo member when the method completes. You should already have the etelmm.lib in your epoc32\release\wins\udeb under your Symbian directory.

                                      Regards, Aljaz
Fri, 2004-09-17 09:58
Joined: 2004-02-04
Forum posts: 26
Nokia 6600 & incoming call number
Hi everyone,

does anybody knows is it possible to get the caller number when we recive a data call?

I wrote a class that reads a call list (using the CLogViewRecent and CLogClient classes) and it works fine when I receive a voice call (I tested it on Nokia 6600).

But when I try the same code with a data call, I can't get that caller's number. I tried to read the recent calls list manually and there is no call number either when I receive a data call.

I would appreciate any kind of help!

Thanks in advance,
Sasa

It is always nice to help out people that need help.
http://www.vegaitsourcing.rs
http://www.codeplex.com/aspnetlibrary

Mon, 2004-11-15 11:56
Joined: 2004-11-15
Forum posts: 1
Re: Nokia 6600 & incoming call number
Quote from: sasa
Hi everyone,

does anybody knows is it possible to get the caller number when we recive a data call?

I wrote a class that reads a call list (using the CLogViewRecent and CLogClient classes) and it works fine when I receive a voice call (I tested it on Nokia 6600).

But when I try the same code with a data call, I can't get that caller's number. I tried to read the recent calls list manually and there is no call number either when I receive a data call.

I would appreciate any kind of help!

Thanks in advance,
Sasa



i have the same problem!!! can you help me now??

Thanks in advance
Thu, 2004-12-23 14:54
Joined: 2004-12-23
Forum posts: 239
incoming call
hi sasa
Me 2 have the same problem.I also wants to know the incoming number before connecting to call,since my application need that number.Can anyone help me?

---------------
Bhatt Kavita

Thu, 2004-12-23 15:03
Joined: 2004-02-04
Forum posts: 26
How to identitfy Calls?
Hi everyone,

I didn't manage to solve that problem on older firmware versions but a few days ago I got a Nokia 6600 with newer firmware and the same code I used earlier worked fine.

I checked the calls list manually and it is filled with phone numbers (even in a case of a data call) in that newer version.

It's not much but maybe it can help you.

It is always nice to help out people that need help.
http://www.vegaitsourcing.rs
http://www.codeplex.com/aspnetlibrary

  • Login to reply to this topic.