Creating video and VoIP calls on Symbian

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): All 3.0 Devices & some 3.1 Devices
Platform(s): Symbian
Keywords: AIW (Application Interworking), CAiwServiceHandler, CAiwCriteriaItem
Created: User:Technical writer 2 (July 4, 2007; Updated March 23, 2011)
Last edited: hamishwillee (02 Jul 2012)



It is possible to initiate video and Internet telephony (VoIP) calls with the AIW Service Handler API, included in the Extensions plug-in package for S60 3rd Edition SDKs.

Note.pngNote: 1. This API is not part of the public SDK.

2. This works fine in S60 3rd Edition and S60 3rd Edition FP1 devices, but ExecuteServiceCmdL fails with error code(-6),KErrArgument on the Nokia N95 8GB. There is already a Known Issue regarding this, see the following link: Archived:Dialing a voice call using AIW fails in Nokia N95 8GB (Known Issue).
3. This will also not work on S60 3rd Edition FP2, S60 5th Edition, or Symbian ^3.

4.Use the 3rd Party Telephony API or Phone Client Dial APIs (part of API Plug-in package) instead of AIW.

MMP file


 CAPABILITY	NetworkControl ReadDeviceData WriteDeviceData NetworkServices


 LIBRARY servicehandler.lib 
LIBRARY ws32.lib

Header file

System Includes

 #include <AiwDialDataTypes.h>
#include <AiwCommon.hrh>
#include <AiwCommon.h>
#include <AiwGenericParam.h>
#include <AiwVariant.h>
#include <aiwservicehandler.h>

In Header File

   void MakeAiwCallL(const TDesC& aNumber,const TDesC& aName,
TAiwCallType aCallType );
TAiwNameBuffer iNameBuffer;
CAiwCriteriaItem* iCriteria;
CAiwServiceHandler* iServiceHandler;

Source file

In ConstructL of Source File

   // Create AIW service handler
iServiceHandler = CAiwServiceHandler::NewLC();
// Create AIW iCriteria
iCriteria =CAiwCriteriaItem::NewLC( KAiwCmdCall,KAiwCmdCall,_L8( "*" ) );

MakeAiwCallL(const TDesC& aNumber,const TDesC& aName,TAiwCallType
                                                          aCallType )      
  // Create AIW interest
  RCriteriaArray interest;
  CleanupClosePushL( interest );      
  const TUid KUidAiwBase = { KAiwClassBase };
  iCriteria->SetServiceClass( KUidAiwBase );
  User::LeaveIfError( interest.Append( iCriteria ) );
  // Attach to AIW interest
  iServiceHandler->AttachL( interest );
  // Create AIW param package
  TAiwDialDataV1 data;
  TAiwDialDataV1Pckg dataPckg( data );
  iNameBuffer = aName.Left( iNameBuffer.MaxLength() );
  data.SetName( iNameBuffer );
  TAiwTelephoneNumber iTelNumber(aNumber);
  iTelNumber = aNumber.Left( iTelNumber.MaxLength() );
  data.SetTelephoneNumber( iTelNumber );
  data.SetCallType( aCallType );
  CAiwGenericParamList& paramList = iServiceHandler->InParamListL();
  TPtrC8 ptr;
  ptr.Set( dataPckg );
  TAiwVariant variant( ptr );
  TAiwGenericParam param(EGenericParamCallDialDataV1,variant);
  paramList.AppendL( param );
  // Execute AIW command
  iServiceHandler->ExecuteServiceCmdL( KAiwCmdCall,
  // destroy interest
  CleanupStack::PopAndDestroy( 1 ); 

Using the above function, it is possible to initiate a Voice, Video, and VoIP call as follows:

   //To make Voice call
   MakeAiwCallL( _L("345672323"), _L("FirstName LastName"),EAiwVoice);
   //To make VoIP call
   MakeAiwCallL( _L("user@sip.server.com")("FirstName LastName") ,EAiwVoIP);
   //To make Video call
   MakeAiwCallL( _L("345672323"), _L("FirstName LastName"),EAiwVideo);

   //Memory clean up.
      delete iCriteria;
      iCriteria = NULL;
      delete iServiceHandler;
      iServiceHandler = NULL;

This page was last modified on 2 July 2012, at 14:40.
53 page views in the last 30 days.