This set of seven example applications demonstrate the use of the Telephony ISV API provided by the CTelephony public interface to the phone’s telephony system. This interface enables developers to access common mobile telephony services, such as finding phone information, dialling and answering voice calls.
Each example demonstrates a different set of mobile telephony services, and is stored in a subdirectory of ETel3rdPartyExample . These subdirectories are explained in the description section.
Click on the following link to download the example: ETel3rdParty.zip
Click browse to view the example code.
AutoDTMFDialler
This example performs the following operations:
Retrieves the line status using the CTelephony::GetLineStatus(const TPhoneLine& , TDes8&) function.
Retrieves the call status using the CTelephony::GetCallStatus(const TCallId& , TDes8&) function
Retrieves the current network registration status using the CTelephony::GetNetworkRegistrationStatus(TRequestStatus& , TDes8&) function
Retrieves the current flight mode status using the CTelephony::GetFlightMode(TRequestStatus& , TDes8&) function.
Initiates a call using the CTelephony::DialNewCall(TRequestStatus& , TDes8& , const TTelNumber& , TCallId& , const TPhoneLine) function
Transmits DTMF tones across all the current active voice calls one after the other using the CTelephony::SendDTMFTones(TRequestStatus& , const TDesC&) function
Disconnects a call using the CTelephony::Hangup(TRequestStatus& , const TCallId&) function.
Configs
This example directory contains the config.txt and the TelephonyISVAppConfig.cfg files, which are required to configure the SIM TSY to run the application. For more information, see the Configuring the Simulator TSY section.
IncomingCalls
This example answers incoming calls using the CTelephony::AnswerIncomingCall(TRequestStatus& , TCallId& , const TPhoneLine) function. It also retrieves information about the call using the CTelephony::GetCallInfo(TDes8& , TDes8& , TDes8&) function. It uses a test plug-in named Simulator TSY (SIMTSY) which simulates telephony functions like phonebook, voicecall, SMS etc.
NetworkInformation
This example retrieves the over-the-air network information about the currently registered mobile network using the CTelephony::GetCurrentNetworkInfo(TRequestStatus& , TDes8&) function and also requests notification of changes to this information using the CTelephony::NotifyChange(TRequestStatus& , const TNotificationEvent& , TDes8&) function.
OutgoingCalls
This uses a test plug-in named Simulator TSY (SIMTSY) which simulates telephony functions like phonebook, voicecall, SMS etc. This example performs the following operations:
Initiates a call using the CTelephony::DialNewCall(TRequestStatus& , TDes8& , const TTelNumber& , TCallId& , const TPhoneLine) function.
Places a call on hold using the CTelephony::Hold(TRequestStatus& , const TCallId&) function.
Swaps between calls using the CTelephony::Swap(TRequestStatus& , const TCallId& , const TCallId&) function.
Resumes a call on hold using the CTelephony::Resume(TRequestStatus& , const TCallId&) function.
Retrieves the status of ICC locks using the CTelephony::GetLockInfo(TRequestStatus& , const TIccLock& , TDes8&) function.
Retrieves ICC-stored information about the (preferred) name of the currently registered mobile network using the CTelephony::GetCurrentNetworkName(TRequestStatus& , TDes8& ) function and the network name using the CTelephony::GetOperatorName(TRequestStatus& , TDes8&) function.
Retrieves the dynamic call capabilities for the calls that was dialled or answered using the CTelephony::GetCallDynamicCaps(const TCallId&, TDes8&) function.
PhoneId
This example retrieves information about a phone, such as the manufacturer name, serial number, phone and SIM card number using the CTelephony::GetPhoneId(TRequestStatus& , TDes8&) function, and current subscriber information using the CTelephony::GetSubscriberId(TRequestStatus& , TDes8&) function. It then prints this information to the console.
PhoneMonitoring
This example performs the following operations:
Retrieves the status and charge level of the phone battery using the CTelephony::GetBatteryInfo(TRequestStatus& , TDes8&) function.
Indicates whether a phone battery is being charged using the CTelephony::GetIndicator(TRequestStatus& , TDes8&) function.
Retrieves the current signal strength of the phone using the CTelephony::GetSignalStrength(TRequestStatus& , TDes8&) function.
Retrieves the current flight mode status using the CTelephony::GetFlightMode(TRequestStatus& , TDes8&) function.
Shared
This example directory contains the shared files to be used by other directories for synchronous and asynchronous operations.
SuppleServices
This example retrieves the current status of the following services:
call barring services using the CTelephony::GetCallBarringStatus(TRequestStatus& , const TCallBarringCondition , TDes8& , const TServiceGroup) function,
call forwarding services using the CTelephony::GetCallForwardingStatus(TRequestStatus& , const TCallForwardingCondition , TDes8& , const TServiceGroup) function,
call waiting services using the CTelephony::GetCallWaitingStatus(TRequestStatus& , TDes8& , const TServiceGroup) function,
call identity services using the CTelephony::GetIdentityServiceStatus(TRequestStatus& , const TIdentityService& , TDes8&) function.
To run the application you must configure the Simulator TSY. To do this, install the configuration files by performing the following steps:
Copy the config.txt file and the TelephonyISVAppConfig.cfg file into the \epoc32\winscw\c\ directory of the phone.
From the command prompt, go to the source root directory.
Change directory to \epoc32\release\winscw\udeb and run the following command:
ced c:\TelephonyISVAppConfig.cfg
Check the ced.log file to ensure that the configuration file has been read successfully.
The Symbian build process describes how to build an application.
The ETel3rdPartyExample builds the following executables in the standard location ( \epoc32\release\winscw\<build_variant> for CodeWarrior):
phoneid.exe
phonemonitor.exe
networkinformation.exe
suppleservices.exe
outgoingcalls.exe
autodtmf.exe
incomingcalls.exe
Each executable must be run separately.
Note: Set the StartUpMode mode to 1 in the \epoc32\data\epoc.ini file to start the emulator in text shell mode as the applications use a console based interface.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.