Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 05:48, 27 November 2007.

How to get incoming voip call sip uri

From Forum Nokia Wiki

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

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
iClient=CLogClient::NewL(CEikonEnv::Static()->FsSession(),CActive::EPriorityHigh); 
iLogEvent=CLogEvent::NewL();
iLogViewEvent = CLogViewEvent::NewL(*iClient,*this);
iLogFilter = CLogFilter::NewL();
 
// Set filter for call type
iLogFilter->SetEventType(KLogCallEventTypeUid);
 
//Set filter for Missed call
TBuf<20> string;
iClient->GetString(string,R_LOG_DIR_MISSED);
iLogFilter->SetDirection(string);
iLogViewEvent->SetFilterL(*iLogFilter,iStatus);
SetActive();

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
 
iLogEvent->SetId(aId);
 
//Get the event
iClient->GetEvent(*iLogEvent,iStatus);
SetActive();
}

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
callNameBuf.Copy(iLogEvent->RemoteParty());
CEikonEnv::InfoWinL(_L("Remote party"),callNameBuf);
Related Discussions
Thread Thread Starter Forum Replies Last Post
Hold and Un-hold problem with Nokia VoIP vvsnaresh VoIP 0 2007-07-24 09:45
Handle Incoming Call jguzman General Symbian C++ 10 2007-03-14 05:53
ask for stun using e65 buaa_yy VoIP 2 2008-04-29 10:52
Incoming sip messages ecio83 Symbian Networking & Messaging 1 2007-07-19 13:24
Nokia N75 -Config Voip problem- atila696 VoIP 3 2008-06-23 07:42
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX