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 10:15, 7 July 2008.

CS001063 - Telephony Call Information API

From Forum Nokia Wiki


ID CS001063 Creation date July 7, 2008
Platform S60 3rd Edition, FP2 Tested on devices Nokia N78  
Category Symbian C++ Subcategory Telephony


Note!
This API is not part of the public SDK. It can be found in the SDK API Plug-in.


The Telephony Call Information API provides keys to check the Telephony Call Status, such as Dialling, Answering, Ringing, and Hold state, and the Telephony Call Type, such as Data Call, Voice Call, and Fax.

Use cases

The keys can be used to find out the call type and status of an ongoing call.

Example code

Headers

 #include <ctsydomainpskeys.h> // new header for S60 3rd Edition, FP2
 #include<e32property.h>

Call type and status can be checked by passing KPSUidCtsyCallInformation (Telephony call handling PS UID) and KTelephonyCallState or KTelephonyCallType to the Get() method of RProperty, which is the user-side interface to Publish & Subscribe, as shown in the following example.

The RProperty type of the KCTsyCallState and the KCTsyCallType property is EInt.

void CCallStatusAppUi::GetTelephonyStateAndType()
  {
      TBuf<20> printInfo;
      TInt aVal;  
      RProperty iRP;
      iRP.Get(KPSUidCtsyCallInformation ,KCTsyCallState ,aVal);
      switch(aVal)
      {
      	case EPSCTsyCallStateUninitialized:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Status - Uninitialized:"),printInfo);
      	}
      	break;
      	case EPSCTsyCallStateNone:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Status - None:"),printInfo);
      	}  	
      	break;
      	case EPSCTsyCallStateAlerting:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Status - Alert:"),printInfo);
      	}
      	break;
      	case EPSCTsyCallStateRinging:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Status - Ringing:"),printInfo);
      	}
      	break;
      	case EPSCTsyCallStateDialling:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Status - Dialing:"),printInfo);
      	}
        ..............
        ..............
      }
           
      printInfo.Zero();
            
      iRP.Get(KPSUidCtsyCallInformation ,KCTsyCallType ,aVal);
      switch (aVal)
      {
      	case EPSCTsyCallTypeUninitialized:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Type - Uninitialized:"),printInfo);
      	}
      	break;
      	case EPSCTsyCallTypeNone:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Type - None:"),printInfo);
      	}
      	break;
      	case EPSCTsyCallTypeCSVoice:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Type - CSVoice:"),printInfo);
      	}
      	break;
      	case EPSCTsyCallTypeFax:
      	{
      	printInfo.AppendNum(aVal);
      	CEikonEnv::InfoWinL(_L("Call Type - Fax:"),printInfo);
      	}
        ..............
        ..............     	
      }
  }

The enumerations are as follows:

enum TPSCTsyCallState :

   EPSCTsyCallStateUninitialized,
   EPSCTsyCallStateNone,
   EPSCTsyCallStateAlerting,
   EPSCTsyCallStateRinging,
   EPSCTsyCallStateDialling,
   EPSCTsyCallStateAnswering,
   EPSCTsyCallStateDisconnecting,
   EPSCTsyCallStateConnected,
   EPSCTsyCallStateHold

enum TPSCTsyCallType:

   EPSCTsyCallTypeUninitialized,
   EPSCTsyCallTypeNone,
   EPSCTsyCallTypeCSVoice,
   EPSCTsyCallTypeFax,
   EPSCTsyCallTypeData,
   EPSCTsyCallTypeHSCSD,
   EPSCTsyCallTypeH324Multimedia,
   EPSCTsyCallTypeVoIP

Example project

The following application has been tested on the Nokia N78: Image:TelephonyCallInfoAPIFor3rdFP2.zip.

Related Discussions
Thread Thread Starter Forum Replies Last Post
获取NetworkStrength的结果 wenstory Symbian 12 2007-05-16 02:03
The truth of implementing a VoIP client in Symbian er_benji VoIP 9 2007-10-11 14:39
Logging information about outgoing voice calls? paulbynau Mobile Java General 4 2007-03-07 03:52
New VoIP Audio Service APIs published for S60 3.1 nly VoIP 8 2008-09-05 19:30
How to interact with VoIP on E61? masondu VoIP 12 2008-03-25 06:53
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX
     
    
            
            RDF Facets:
            
            
                        qfnZuserE5ftagQSxgetX
                        qfnZuserE5ftagQSximsiX
                        qfnZuserE5ftagQSxkpsuidX
                        qfnZuserE5ftagQSxnumberX