Revision as of 19:43, 2 March 2010 by jimgilmour1 (Talk | contribs)

How to get incoming voip call sip uri

From Nokia Developer Wiki
Jump to: navigation, search


The CTelephony class does not work for VoIP calls. So we cannot use NotifyCall and GetCallInfo to get notification and caller number for VoIP calls. The workaround is to use Logengine to get incoming VoIP SIP uri.

The following code snippet should be used and this code snippet can be used for Video calls also.

Headers to be included are

#include <LogCli.h>
#include <LOGWRAP.H>
#include <LogViewChangeObserver.h>
#include <LOGVIEW.H>
#include <eikenv.h>

Link against these libraries

logcli.lib logwrap.lib eikcore.lib

1. Make your class an Active object class by deriving from CActive.

2. Derive your class from MLogViewChangeObserver and give implementations for virtual functions HandleLogViewChangeEventAddedL ,HandleLogViewChangeEventChangedL , HandleLogViewChangeEventDeletedL.

3. Declare following member variables

CLogClient* iClient;
CLogEvent* iLogEvent;
CLogViewEvent* iLogViewEvent;
CLogFilter* iLogFilter;

4. In constructL,

// Create LogClient, Logevent, Logfilter, Logviewevent objects
// using already created session instead of creatinga new one
iLogViewEvent = CLogViewEvent::NewL(*iClient,*this);
iLogFilter = CLogFilter::NewL();
// Set filter for call type
//Set filter for Missed call
TBuf<20> string;

5. HandleLogViewChangeEventAddedL will be called when a logevent (Satisfying the filter criteria) is added to a view.

void CNotifyCall::HandleLogViewChangeEventAddedL(TLogId aId, 
TInt /*aViewIndex*/, TInt /*aChangeIndex*/, TInt /*aTotalChangeCount*/)
//Set the incoming id to the logevent
// aId is the Id of the log event which has been added to the view
//Get the event

6. In RunL,

// Number gives the incoming number in case of voice call
TBuf<128> callNameBuf=iLogEvent->Number();
CEikonEnv::InfoWinL(_L("Incoming call Number"),callNameBuf);
// Remote party gives the caller voip sip uri
CEikonEnv::InfoWinL(_L("Remote party"),callNameBuf);
35 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.