Namespaces
Variants
Actions

Archived:Dialing a phone number with pause characters on Symbian

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata

Compatibility
Platform(s): S60 2nd Edition, S60 3rd Edition

Article
Created: User:Technical writer 1 (31 Oct 2007)
Last edited: hamishwillee (15 Jun 2012)

Description

Dialing a phone number with an extension (with, for example, characters like 'p') is not possible using CTelephony or RPhone. This can, however, be done using the CPhCltDialer and TPhCltExtPhoneDialData classes.


Solution

CTelephony and RPhone classes support only dialing a phone number (numeric only). Dialing a string, that is, a phone number with pause characters like 'p' or 'w', is not supported by CTelephony and RPhone and is possible only with CPhCltDialer and TPhCltExtPhoneDialData. These classes are not part of the public S60 2nd Edition SDK. However, the classes are exposed in S60 3rd Edition with the SDK API Plug-in.

An example of a number with the extension: 121p2

See the following code snippet for an example.

HEADER FILES

 #include<CPhCltDialer.h>
 #include<BAUTILS.H>
 #include<CPhCltExtPhoneBase.h>
 #include<TPhCltExtPhoneDialData.h>
 #include<PhCltTypes.h>

LIBRARIES

 PhoneClient.lib
 Efsrv.lib
 Bafl.lib
 void DialStringL( const TDesC& aNumber )
   {
   // Load the resource into CONE environment
   // Use "z:\\resource\\PhoneClient.rsc" on S60 3rd Ed
   _LIT(KPhoneClientResourceFile, "z:\\system\\data\\PhoneClient.rsc");
   TFileName resFile(KPhoneClientResourceFile);
   BaflUtils::NearestLanguageFile(CCoeEnv::Static()->FsSession(), resFile);
   const TInt offset = CCoeEnv::Static()->AddResourceFileL(resFile);
       
   // You need instance of CPhCltDialer
   CPhCltDialer* dialer = CPhCltDialer::NewL();
       
   TPhCltTelephoneNumber phoneNumber(aNumber);
   TPhCltExtPhoneDialData& dialData = dialer->DialData();
       
   // Set telephone number with pause character
   dialData.SetTelephoneNumber(phoneNumber);
   dialData.SetContactId(KPhCltNoContact);
   dialData.SetCallType(EPhCltVoice);
   dialer->ExecuteLD();
       
   // Now remove the resource file lock
   CCoeEnv::Static()->DeleteResourceFile(offset);
   }
This page was last modified on 15 June 2012, at 04:02.
109 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved