Archived:Telephony Call Information Symbian API
The article is believed to be still valid for the original topic scope.
Article Metadata
Code Example
Tested with
Compatibility
Article
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: File:TelephonyCallInfoAPIFor3rdFP2.zip.

