You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#16 Old 2004-11-04, 04:01

Join Date: Jul 2003
Posts: 2
pinchiang
Offline
Registered User
Hi, sevih,

I add a line to solve the problem:

CActiveScheduler::Add(this);


Good luck !
Reply With Quote

#17 Old Re: How to obtain telephone number from call - 2005-12-11, 23:24

Join Date: Dec 2005
Posts: 5
Symbian_Programmer
Offline
Registered User
Hi pinchiang,

a. Where did you add CActiveScheduler::Add(this); to fix the problem ? It's already in the code:

CGetCallerId::CGetCallerId(): CActive(EPriorityStandard)
{
CActiveScheduler::Add(this);
}

When I try this code and try to add your line I get same error as other guys in this thread.

Has anybody been able to make this working ? If Yes could you please put the working and corrected CPP file here ?

b. If I call this from my Hello world app UI can I call this function to get the phone call any time (assume the log in my phone has some phone numbers saved) ? Or did you guys test it when there is incoming/outgoing call or after a termination ?

I mean when do you call this function from the Hello World App UI ? Can you call it anytime ?

Btw, what SDK do you use SDK 1.2 (for example phone 3650) or 2.0 (phone 6600).

Best Regards,
Symbian_porgrammer
Reply With Quote

#18 Old Re: How to obtain telephone number from call - 2005-12-12, 07:37

Join Date: Mar 2003
Posts: 88
mikaraento's Avatar
mikaraento
Offline
Forum Nokia Champion
If you don't need to support 6.1 devices (like the 7650), you can use
RMobileCall to get the caller id, which is quicker and more reliable.
To use RMobileCall you Etelmm headers and LIBs, they are available
from the Motorola A925 SDK (although they are for 7.0, these features
are compatible with Series 60 phones based on 7.0s and 8.0a).

See http://db.cs.helsinki.fi/~mraento/lx...l_listener.cpp
for an example implementation.

Miak
Reply With Quote

#19 Old Re: How to obtain telephone number from call - 2005-12-12, 10:39

Join Date: Dec 2005
Posts: 1
oz.mortimer
Offline
Registered User
Hi sorry, I am quite new to this. would it be possible for someone to send me the full code of an application that will answer a call based on incoming number?

Cheers
Oz.
Reply With Quote

#20 Old Re: How to obtain telephone number from call - 2005-12-15, 11:05

Join Date: Mar 2003
Posts: 88
mikaraento's Avatar
mikaraento
Offline
Forum Nokia Champion
Sometimes I wonder what's the use of putting up information. The link
I gave has at the top of the page a link for
'Building instructions and source code packages'. If that's enough, I
don't know what is.

Mika
Reply With Quote

#21 Old Re: How to obtain telephone number from call - 2005-12-16, 06:28

Join Date: Mar 2004
Posts: 1,927
Location: Czech Republic
stenlik's Avatar
stenlik
Offline
Forum Nokia Champion
Hi,

I didn't go throught whole discussion, I only look on title, so sorry if I will not answer it properly. I once develop the Call Engine and:

- on S60 I used Call Log engine and other ETEL classes without any problems for capturing calls, getting dialed and remote party MSISDN - works perfectly on N6680, N6630...

- on SE900 it also works, but you must copy here some libs and headers from Sendo(gsmadv.lib,gsmbas.lib) and Nokia 9200 SDK(etelagsm.h,etelbgsm.h) as I remember....

- on Motorola 925/A1000 you can easily get remote party dialed number, but it is not possible to get dialed NUMBER!!!!!! Don't know why? I didn't found a way how to do it.

My advice:
========
Collect all SDK you can: Sendo, Motorola, old Nokia SDK. Sometimes they're useful....

If you need some source codes or more detailed description, I can put here something.... Just ask.

Bye
STeN
Reply With Quote

#22 Old Re: How to obtain telephone number from call. Please help me, I'm desperate... - 2006-12-11, 14:54

Join Date: Jul 2006
Posts: 36
Location: Italy
Soldolux
Offline
Registered User
Hi to all, I've tried to get the telephone number from a call but I can't do this...
I've got an active object that listen to the line and when answering a call it record the call.
I put the code found in this thread, but if I call GetLatest() from HandleCommand of a view, the program quit. If I remove the GetLatest() and I try to see the content of the descriptor iTelNumber it is blank...
This is my code
//
// iPhoneObserver.cpp
//

#include <e32base.h>
#include <e32std.h>
#include <etel.h>
#include "phoneobserver.h"
#include "recorderview.h"
#include "recorder.hrh"
#include <aknnotewrappers.h>


CPhoneObserver::CPhoneObserver(): CActive(EPriorityStandard)
{
}

CPhoneObserver::~CPhoneObserver()
{
Cancel();
}


CPhoneObserver* CPhoneObserver::NewL(CRecorderView* aRecView, RLine* aLine)
{
CPhoneObserver* self = NewLC(aRecView, aLine);
CleanupStack::Pop(self);
return self;
}

CPhoneObserver* CPhoneObserver::NewLC(CRecorderView* aRecView, RLine* aLine)
{
CPhoneObserver* self = new (ELeave) CPhoneObserver();
CleanupStack::PushL(self);
self->ConstructL(aRecView, aLine);
return self;
}

void CPhoneObserver::RunL()
{
if (iStatus.Int() == KErrNone)
{
//here I put the code of the threads
const CLogEvent& event = iRecentLogView->Event();
iTelNumber.Copy(event.Number());

if (iLineStatus == RCall::EStatusConnected)
{
//key event for muting the microphone
RWsSession sess=CCoeEnv::Static()->WsSession();
TWsEvent event;
TInt id=sess.FindWindowGroupIdentifier( 0, _L("*Phone?") );

event.SetType(EEventKey);
event.SetTimeNow();
event.Key()->iCode = EKeyMenu;
event.Key()->iModifiers = 0;
event.Key()->iRepeats = 0;
event.Key()->iScanCode = EStdKeyNull;
sess.SendEventToWindowGroup( id, event );

event.SetType(EEventKey);
event.SetTimeNow();
event.Key()->iCode = EKeyDownArrow;
event.Key()->iModifiers = 0;
event.Key()->iRepeats = 0;
event.Key()->iScanCode = EStdKeyNull;
sess.SendEventToWindowGroup( id, event );

event.SetType(EEventKey);
event.SetTimeNow();
event.Key()->iCode = EKeyDownArrow;
event.Key()->iModifiers = 0;
event.Key()->iRepeats = 0;
event.Key()->iScanCode = EStdKeyNull;
sess.SendEventToWindowGroup( id, event );

event.SetType(EEventKey);
event.SetTimeNow();
event.Key()->iCode = EKeyDownArrow;
event.Key()->iModifiers = 0;
event.Key()->iRepeats = 0;
event.Key()->iScanCode = EStdKeyNull;
sess.SendEventToWindowGroup( id, event );

event.SetType(EEventKey);
event.SetTimeNow();
event.Key()->iCode = EKeyEnter;
event.Key()->iModifiers = 0;
event.Key()->iRepeats = 0;
event.Key()->iScanCode = EStdKeyNull;
sess.SendEventToWindowGroup( id, event );


//If line is connected, recording may start.
iRecView -> HandleCommandL(EProgCmdRecord);

}
else if (iLineStatus == RCall::EStatusHangingUp)
{
//If line is hanging up, recorder must stop.
iRecView -> HandleCommandL(EProgCmdStop);
}

Start();
}


else
{
Cancel();
}
}


TInt CPhoneObserver::RunError(TInt Error)
{
return Error;
}

void CPhoneObserver::DoCancel()
{
iLine -> NotifyStatusChangeCancel();

//here code of the threads
iRecentLogView->Cancel();
}


void CPhoneObserver::ConstructL(CRecorderView* aRecView, RLine* aLine)
{
iRecView = aRecView;
iLine = aLine;

CActiveScheduler::Add(this);

// Connect to the Log Server
iFs.Connect();
iLogClient = CLogClient::NewL(iFs);
iRecentLogView = CLogViewRecent::NewL(*iLogClient);
}



void CPhoneObserver::Start()
{
Cancel();

iLine -> NotifyStatusChange(iStatus, iLineStatus);
SetActive();
}


void CPhoneObserver::Deactivate()
{
DoCancel();
}

//here the get latest from the threads
void CPhoneObserver::GetLatest()
{
// Cancel any outstanding requests.
iRecentLogView->Cancel();
// Make a call into the Log server to get the latest call event.
if( iRecentLogView->SetRecentListL(KLogNullRecentList,iStatus))
{
// Notify the Log server that we're ready
SetActive();
}
}


In the view object I try to call:
iPhoneObserver.getLatest() //this quit the program
CAknInformationNote *notify;
notify = new (ELeave) CAknInformationNote;
notify->ExecuteLD(iPhoneObserver->iTelNumber);

Can someone help me?Please, it's very important
Reply With Quote

#23 Old Re: How to obtain telephone number from call - 2006-12-12, 10:05

Join Date: Jul 2006
Posts: 36
Location: Italy
Soldolux
Offline
Registered User
Nobody can help me?
Reply With Quote

#24 Old Re: How to obtain telephone number from call - 2006-12-12, 10:16

Join Date: Aug 2004
Posts: 803
Location: Hyderabad,India
S.S.Sudhakar's Avatar
S.S.Sudhakar
Offline
Super Contributor
hi,

through logs you won't get call being answered or call in ringing status.

BR,
Sudhakar
Reply With Quote

#25 Old Re: How to obtain telephone number from call - 2006-12-12, 10:29

Join Date: Jul 2006
Posts: 36
Location: Italy
Soldolux
Offline
Registered User
Ok, I've understand that...I've understand that in the method constructL of my observer I can inizialize the lo with
iFs.Connect();
iLogClient = CLogClient::NewL(iFs);
iRecentLogView = CLogViewRecent::NewL(*iLogClient);

I don't understand where I have to put
const CLogEvent& event = iRecentLogView->Event();
iTelNumber.Copy(event.Number());
(I think it's the code that copy the caller number from the log to the descriptor)
and
iRecentLogView->SetRecentListL(KLogNullRecentList,iStatus);
(this place in the last log event)

Excuse me for troubling you...
Reply With Quote

#26 Old Re: How to obtain telephone number from call - 2008-02-06, 13:30

Join Date: Feb 2005
Posts: 68
arunpirku
Offline
Regular Contributor
hi,
you can use CTelephony in symbian 7.0 onwards as per the link
http://developer.symbian.com/main/do...ianOS_cat.html

I have not trtied this out but as soon as i will i post more details.

regards
arun
Reply With Quote

#27 Old Re: How to obtain telephone number from call - 2008-02-06, 19:44

Join Date: Feb 2006
Posts: 16,442
Location: Zürich, Switzerland
wizard_hu_'s Avatar
wizard_hu_
Offline
Forum Nokia Champion
In fact you can not. etel3rdparty.dll is not present on most 2nd edition S60 devices (due to security reasons), thus CTelephony produces exotic errors instead of working.
Reply With Quote

#28 Old Re: How to obtain telephone number from call - 2008-02-13, 18:26

Join Date: Feb 2005
Posts: 68
arunpirku
Offline
Regular Contributor
I found this working with 2nd edition FP 3 device (N72).

regards
arun
Reply With Quote

#29 Old Re: How to obtain telephone number from call - 2008-02-13, 18:46

Join Date: Feb 2006
Posts: 16,442
Location: Zürich, Switzerland
wizard_hu_'s Avatar
wizard_hu_
Offline
Forum Nokia Champion
Yes, I have seen it in the other related post. However note that although there are more than one S60 2nd ed. FP3 devices (http://www.forum.nokia.com/devices/m...2ed_fp3_1.html), they are still not that widespread in fact.
Reply With Quote

#30 Old Re: How to obtain telephone number from call - 2008-02-22, 11:52

Join Date: Feb 2005
Posts: 68
arunpirku
Offline
Regular Contributor
Hi,

For symbian 7 and 8.
using RLine, RCall get the handle to the call. How to do this is available in wiki pages.
iSession.Connect();
iSession.LoadPhoneModule(KTSY);
iSession.GetPhoneInfo(0, phoneInfo);
iPhone.Open(iSession, phoneInfo.iName);
iPhone.EnumerateLines(numberLines);
iLine.Open(iPhone, lineInfo.iName);
iLine.NotifyIncomingCall(iStatus,iName);


You should be using RLine::NotifyIncomingCall(). When an incoming call arrives, the RunL will be activated and in it
if the calli is ringing (if(iLineStatus == RCall::EStatusRinging))

iFsSession.Connect();
iLogClient = CLogClient::NewL(iFsSession);
iLogView = CLogViewRecent::NewL(*iLogClient);
iLogFilter = CLogFilter::NewL();
iLogFilter->SetEventType(KLogCallEventTypeUid);
TRAP(err,iLogView->SetRecentListL(KLogNullRecentList ,*iLogFilter, iStatus));

The runL will be called once the recent list is built and in runL

const CLogEvent& event = iLogView->Event();
iCallerNumber.Copy(event.Number());

This gives the caller number.
Wiki pages give enough information to do this.

hope this helps
arun

Symbian 9 devices, you can CTelephony class and it is straight forward.
Last edited by arunpirku : 2008-02-22 at 11:53. Reason: Additional info
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2010 Nokia