Revision: 201011
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Mar 2010 09:55:57 +0200
changeset 19 1f776524b15c
parent 0 3553901f7fa8
child 20 244d7c5f118e
Revision: 201011 Kit: 201011
smsprotocols/smsstack/gsmu/test/te_gsmu_ems/Te_gsmu_emsSuiteStepBase.h
smsprotocols/smsstack/smsu/group/bld.inf
smsprotocols/smsstack/smsu/inc/smsuaddr.H
smsprotocols/smsstack/wapprot/test/Te_wapprot/WapProtSuiteStepBase.h
telephonyprotocols/gprsumtsqosinterface/inc/UmtsNifControlIf.h
telephonyprotocols/pdplayer/group/bld.inf
telephonyprotocols/pdplayer/inc/PDPParamMapper.h
telephonyprotocols/pdplayer/inc/PDPProvision.h
telephonyprotocols/pdplayer/inc/PDPSCPR.h
telephonyprotocols/pdplayer/inc/pdpmcpr.h
telephonyprotocols/pdplayer/src/PDPConfig.cpp
telephonyprotocols/pdplayer/src/PDPSCPR.cpp
telephonyprotocols/pdplayer/src/PDPSCPRStates.cpp
telephonyprotocols/pdplayer/src/pdpmcpr.cpp
telephonyprotocols/pdplayer/src/pdpmcprfactory.cpp
telephonyprotocols/pdplayer/src/pdpmcprstates.cpp
telephonyprotocols/pdplayer/src/psdavailabilitylistener.cpp
telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside1.xml
telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside_config.txt
telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside_test28.ini
telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside_test29.ini
telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworksideloopbackcsy.ini
telephonyprotocols/pdplayer/test/controlplane/group/BLD.INF
telephonyprotocols/pdplayer/test/controlplane/scripts/te_PDP-ControlPlane.script
telephonyprotocols/pdplayer/test/controlplane/scripts/te_PDP-ControlPlane28.script
telephonyprotocols/pdplayer/test/controlplane/scripts/te_PDP-ControlPlane29.script
telephonyprotocols/pdplayer/umts/spudfsm/src/cpdpfsmfactory.cpp
telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp
telephonyprotocols/pdplayer/umts/spudtel/src/eteldriverstrategies.cpp
telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_SpudNetworkSide.xml
telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide.ini
telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide_config_9x.txt
telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/scripts/TE_spudNetworkSide.script
telephonyprotocols/qos3gppcpr/inc/Qos3GPP_subconparams.h
telephonyprotocols/rawipnif/rawipnif2/src/IPv6Binder.cpp
telephonyprotocols/rawipnif/src/IPv6Binder.cpp
telephonyprotocols/rawipnif/src/RawIPFlow.cpp
telephonyserver/etelpacketdata/group/bld.inf
telephonyserver/etelpacketdata/inc/etelQoS.h
telephonyserver/etelpacketdata/inc/eteldefaultqos.h
telephonyserver/etelserverandcore/group/BLD.INF
telephonyserverplugins/common_tsy/commontsy/exportinc/serviceapi/MmTsy_IPCdefs.h
telephonyserverplugins/common_tsy/commontsy/inc/mmcustomtsy/CMmCustomTsy.h
telephonyserverplugins/common_tsy/commontsy/inc/mmcustomtsy/CMmSIMTsy.h
telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmsmstsy.h
telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmonstoretsy.h
telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmphonebookstoretsy.h
telephonyserverplugins/common_tsy/commontsy/inc/mmtsy/cmmphonetsy.h
telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmCustomTsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmSIMTsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaext.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaextwithdispatcher.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmconferencecallgsmwcdmaext.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmstsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmenstoretsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmonstoretsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmphonetsy.cpp
telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmvoicelinetsy.cpp
telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp
telephonyserverplugins/common_tsy/systemstateplugin/src/ctsysystemstateplugin.cpp
telephonyserverplugins/common_tsy/test/component/group/component_test.pkg
telephonyserverplugins/common_tsy/test/component/inc/cctsycustomipcfu.h
telephonyserverplugins/common_tsy/test/component/inc/cctsyfixeddiallingfu.h
telephonyserverplugins/common_tsy/test/component/inc/cctsymailboxnumbersfu.h
telephonyserverplugins/common_tsy/test/component/inc/cctsyonstorefu.h
telephonyserverplugins/common_tsy/test/component/inc/cctsyphonebookstorefu.h
telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/inc/CMmCustomMessHandlerGsmExt.h
telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/Cmmcustommesshandlergsmext.cpp
telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmmmessagerouter.cpp
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_callemergency_individual.script
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_conferencecallcontrol_individual.script
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_customipc_individual.script
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_fixeddialling_individual.script
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_knownfailures_individual.script
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_mailboxnumbers_individual.script
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_onstore_individual.script
telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_phonebookstore_individual.script
telephonyserverplugins/common_tsy/test/component/src/cctsycallemergencyfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsyconferencecallcontrolfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsycustomipcfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsyenstorefu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsyfixeddiallingfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsymailboxnumbersfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsynetworkcontrolfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsyonstorefu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsyphonebookstorefu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsysmsmessagingfu.cpp
telephonyserverplugins/common_tsy/test/component/src/cctsyussdmessagingfu.cpp
telephonyserverplugins/common_tsy/test/integration/group/integration_test.pkg
telephonyserverplugins/ctsydispatchlayer/exportinc/mltsydispatchcallcontrolinterface.h
telephonyserverplugins/ctsydispatchlayer/inc/ccallcontroldispatcher.h
telephonyserverplugins/ctsydispatchlayer/src/ccallcontroldispatcher.cpp
telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsycallcontrolfu.h
telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookfu.h
telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookonfu.h
telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookonfunegative.h
telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsycallcontrolfu.cpp
telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsyphonebookonfu.cpp
telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsyphonebookonfunegative.cpp
telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/inc/cltsycallcontrolhandler.h
telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/src/cltsycallcontrolhandler.cpp
telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/src/cltsyfactoryv1.cpp
telephonyserverplugins/ctsydispatchlayer/test/mockltsy_under_ctsydispatch/src/cmockcallcontrolmesshandler.cpp
telephonyserverplugins/ctsydispatchlayer/test/mockltsy_under_ctsydispatch/src/cmockltsyengine.cpp
telephonyserverplugins/licenseetsystub/licensee_tsy_stub/inc/cmmmockmesshandler.h
telephonyserverplugins/licenseetsystub/licensee_tsy_stub/src/cmmmockmesshandler.cpp
telephonyserverplugins/simatktsy/tests/src/ccsatcomponenttestbase.cpp
telephonyserverplugins/simatktsy/tests/src/ccsatsendssfu.cpp
telephonyserverplugins/simtsy/inc/CSimPacketContext.h
telephonyserverplugins/simtsy/src/CSimPacketContext.cpp
telephonyserverplugins/simtsy/src/CSimPhone.cpp
telephonyserverplugins/simtsy/test/Te_SimPacket/Te_SimPacket.cpp
telephonyutils/telephonywatchers/group/signalstrengthwatcher.mmp
--- a/smsprotocols/smsstack/gsmu/test/te_gsmu_ems/Te_gsmu_emsSuiteStepBase.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/smsprotocols/smsstack/gsmu/test/te_gsmu_ems/Te_gsmu_emsSuiteStepBase.h	Fri Mar 19 09:55:57 2010 +0200
@@ -27,6 +27,7 @@
 #include <test/testexecutestepbase.h>
 // Please add your include here if you have
 #include <fbs.h>
+#include <etelmm.h>
 #include <e32math.h>
 #include "gsmumsg.h"
 #include "gsmubuf.h"
--- a/smsprotocols/smsstack/smsu/group/bld.inf	Tue Feb 02 01:41:59 2010 +0200
+++ b/smsprotocols/smsstack/smsu/group/bld.inf	Fri Mar 19 09:55:57 2010 +0200
@@ -30,7 +30,7 @@
 ../inc/smsuset.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(smsuset.h)
 ../inc/smsuset.inl SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(smsuset.inl)
 ../inc/smsustrm.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(smsustrm.h)
-../inc/smsustrm.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(smsustrm.inl)
+../inc/smsustrm.inl SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(smsustrm.inl)
 ../inc/smsulog.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(smsulog.h)
 ../inc/smsulog.inl SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(smsulog.inl)
 ../inc/smsuact.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(smsuact.h)
--- a/smsprotocols/smsstack/smsu/inc/smsuaddr.H	Tue Feb 02 01:41:59 2010 +0200
+++ b/smsprotocols/smsstack/smsu/inc/smsuaddr.H	Fri Mar 19 09:55:57 2010 +0200
@@ -28,7 +28,6 @@
 
 #include <e32property.h>
 #include <es_sock.h>
-#include <etelmm.h>
 
 /** SMS sockets family identifier.*/
 const TUint KSMSAddrFamily = 0x010;
--- a/smsprotocols/smsstack/wapprot/test/Te_wapprot/WapProtSuiteStepBase.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/smsprotocols/smsstack/wapprot/test/Te_wapprot/WapProtSuiteStepBase.h	Fri Mar 19 09:55:57 2010 +0200
@@ -37,6 +37,7 @@
 #include <e32property.h>
 #include <simtsy.h>
 #include <smsuaddr.h>
+#include <etelmm.h>
 #include "WapProtSuiteDefs.h"
 #include "wap_sock.h"
 #include "smsustrm.h"
--- a/telephonyprotocols/gprsumtsqosinterface/inc/UmtsNifControlIf.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/gprsumtsqosinterface/inc/UmtsNifControlIf.h	Fri Mar 19 09:55:57 2010 +0200
@@ -19,7 +19,7 @@
 #define __UMTSNIF_CONTROL__
 
 #include <nifman.h>
-
+#include <es_prot.h>
 #if MM_ETEL_API
 #include "uscl_packet.h"	// RPacketContext from UMTSSim
 #include "uscl_qos.h"		// RPacketQoS from UMTSSim
--- a/telephonyprotocols/pdplayer/group/bld.inf	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/group/bld.inf	Fri Mar 19 09:55:57 2010 +0200
@@ -29,5 +29,8 @@
 
 PRJ_TESTMMPFILES
 
+
+#include "..\test\controlplane\group\bld.inf"
+
 #endif
 
--- a/telephonyprotocols/pdplayer/inc/PDPParamMapper.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/PDPParamMapper.h	Fri Mar 19 09:55:57 2010 +0200
@@ -23,6 +23,7 @@
 #ifndef SYMBIAN_PDPPARAMMAPPER_H
 #define SYMBIAN_PDPPARAMMAPPER_H
 
+#include <etelqos.h>
 #include <comms-infras/ss_parameterfamilybundle.h>
 
 #include <networking/qos3gpp_subconparams.h>
--- a/telephonyprotocols/pdplayer/inc/PDPProvision.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/PDPProvision.h	Fri Mar 19 09:55:57 2010 +0200
@@ -27,9 +27,9 @@
 #ifndef PDPPROVISION_H_
 #define PDPPROVISION_H_
 
+#include <etelqos.h>
 #include <comms-infras/metadata.h>
 #include <metadatabase.h>		// TMDBElementId
-#include <etelqos.h>
 
 namespace ESock 
 	{
--- a/telephonyprotocols/pdplayer/inc/PDPSCPR.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/PDPSCPR.h	Fri Mar 19 09:55:57 2010 +0200
@@ -23,6 +23,7 @@
 #ifndef SYMBIAN_PDPSPR_H
 #define SYMBIAN_PDPSPR_H
 
+#include <etelqos.h>
 #include <comms-infras/corescpr.h>
 #include <comms-infras/corescprstates.h>
 #include <networking/qos3gpp_subconparams.h>
@@ -30,9 +31,11 @@
 #include <networking/pdpprovision.h>
 #include <comms-infras/linkprovision.h>
 #include <networking/ipaddrinfoparams.h>
+#include <comms-infras/commsdebugutility.h>
+
 #include "PDPFSM.h"
 #include "PDPParamMapper.h"
-#include <comms-infras/commsdebugutility.h>
+
 namespace PDPSCprStates
     {
     class TSelfInit;
@@ -154,6 +157,7 @@
 
     //quite a big structure so kept here to avoid stack overflow.
     RPacketContext::TDataChannelV2 iTempDataChannelV2;
+    TInt  iProvisionFailure;
 protected:
     __FLOG_DECLARATION_MEMBER;
     TInt iLinkUps;
--- a/telephonyprotocols/pdplayer/inc/pdpmcpr.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/inc/pdpmcpr.h	Fri Mar 19 09:55:57 2010 +0200
@@ -23,6 +23,7 @@
 #ifndef SYMBIAN_PDPMCPR_H
 #define SYMBIAN_PDPMCPR_H
 
+#include <etelqos.h>
 #include <comms-infras/ss_mcprnodemessages.h>
 #include <comms-infras/linkprovision.h>
 #include <networking/pppconfig.h>
@@ -31,8 +32,10 @@
 
 #include <comms-infras/agentmcpr.h>
 #include <comms-infras/coremcprstates.h>
+
+#include "PDPProvision.h"
 #include "pdpmcprfactory.h"
-#include "PDPProvision.h"
+
 
 #if defined __CFLOG_ACTIVE || defined SYMBIAN_TRACE_ENABLE
 #define KPdpMCprTag KESockMetaConnectionTag
--- a/telephonyprotocols/pdplayer/src/PDPConfig.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/PDPConfig.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -82,6 +82,10 @@
 	    getErr = KErrNone;
 	    iUmtsGprsRelease = TPacketDataConfigBase::KConfigGPRS;
 	    }
+	    
+	TBool useEdge = EFalse;
+	
+	aIapView->GetBoolL(KCDTIdWCDMAUseEdge | KCDTIdOutgoingGprsRecord, useEdge);
 	
 	getErr = InitialiseScratchContext(iUmtsGprsRelease);
 	//-====================================================
@@ -104,7 +108,7 @@
             // GPRS specific
         	RetrieveGprsCompression(contextGPRS.iPdpCompression, aIapView);
         	RetrieveGprsAnonymousAccess(contextGPRS.iAnonymousAccessReqd, aIapView);
-        	contextGPRS.iUseEdge = EFalse;
+        	contextGPRS.iUseEdge = useEdge;
 			}
 			break;
 	    case TPacketDataConfigBase::KConfigRel5:
@@ -119,7 +123,7 @@
             		contextR5.iProtocolConfigOption.iDnsAddresses.iPrimaryDns,
             		contextR5.iProtocolConfigOption.iDnsAddresses.iSecondaryDns, aIapView);
             RetrieveAuthenticationInfoL(contextR5.iProtocolConfigOption, aIapView);
-            contextR5.iUseEdge = EFalse;
+            contextR5.iUseEdge = useEdge;
 
     		RetrieveUmtsPacketFlowIdentifierL(contextR5.iPFI, aIapView);
 			}
@@ -134,7 +138,7 @@
                 contextUMTS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns,
                 contextUMTS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns, aIapView);
             RetrieveAuthenticationInfoL(contextUMTS.iProtocolConfigOption, aIapView);
-            contextUMTS.iUseEdge = EFalse;
+            contextUMTS.iUseEdge = useEdge;
             RetrieveUmtsPacketFlowIdentifierL(contextUMTS.iPFI, aIapView);
 			}
 			break;
--- a/telephonyprotocols/pdplayer/src/PDPSCPR.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/PDPSCPR.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -243,7 +243,8 @@
 :CCoreSubConnectionProvider(aFactory, PDPSCprActivities::activityMap::Self()),
  iPDPFsmContextId(EInvalidContextId),
  iPdpFsmInterface(NULL),
- iActivityAwaitingResponse(KActivityNull)
+ iActivityAwaitingResponse(KActivityNull),
+ iProvisionFailure(KErrCorrupt)
     {
     LOG_NODE_CREATE1(KPDPSCprSubTag, CPDPSubConnectionProvider, " [factory=%08x]", &aFactory)
     __FLOG_OPEN(KCFNodeTag, KPDPSCprSubTag);
--- a/telephonyprotocols/pdplayer/src/PDPSCPRStates.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/PDPSCPRStates.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -177,7 +177,12 @@
 DEFINE_SMELEMENT(TSelfInit, NetStateMachine::MStateTransition, PDPSCprStates::TContext)
 void TSelfInit::DoL()
     {
-    if (iContext.Node().iPdpFsmInterface == NULL)
+    CPDPSubConnectionProvider &tNode = static_cast<CPDPSubConnectionProvider&>(iContext.Node());
+    
+    // if the FSM interface is null, this means that we're initializing a secondary context
+    // as this code is common for both
+    
+    if (tNode.iPdpFsmInterface == NULL)
         {
         //Non-default SCPR running this code
         ASSERT(iContext.Node().ControlProvider());
@@ -193,60 +198,58 @@
         }
     else
         {
-        //default SCPR running this code
-        const CTSYProvision* tsyProvision = static_cast<const CTSYProvision*>(
-	        iContext.Node().AccessPointConfig().FindExtension(CTSYProvision::TypeId()));
+        //default SCPR running this code (i.e. primary context)
+        const CTSYProvision* tsyProvision =\
+                static_cast<const CTSYProvision*>(tNode.AccessPointConfig().FindExtension(CTSYProvision::TypeId()));
+        
         if (tsyProvision == NULL)
         	{
+            // we do not have to set provision failure here
+            // as it was set in the base class constructor
+            // svg will show the leave error code though
         	User::Leave(KErrCorrupt);
         	}
+        
         CGPRSProvision* gprsProvision = const_cast<CGPRSProvision*>(static_cast<const CGPRSProvision*>(
-        	    iContext.Node().AccessPointConfig().FindExtension(STypeId::CreateSTypeId(CGPRSProvision::EUid,CGPRSProvision::ETypeId))));
+        	    tNode.AccessPointConfig().FindExtension(STypeId::CreateSTypeId(CGPRSProvision::EUid,CGPRSProvision::ETypeId))));
+        
         if (gprsProvision == NULL)
-                	{
-                	User::Leave(KErrCorrupt);
-                	}
-        switch(gprsProvision->UmtsGprsRelease())
+            {
+            tNode.iProvisionFailure = KErrCorrupt;
+            User::Leave(KErrCorrupt);
+            }
+        
+        TInt configType = TPacketDataConfigBase::KConfigGPRS;
+        
+        switch (gprsProvision->UmtsGprsRelease())
         	{
         	case TPacketDataConfigBase::KConfigGPRS:
-                iContext.Node().iPdpFsmInterface->NewL(tsyProvision->iTsyName, TPacketDataConfigBase::KConfigGPRS);
+        	    configType = TPacketDataConfigBase::KConfigGPRS;
         		break;
         	case TPacketDataConfigBase::KConfigRel99Rel4:
-                iContext.Node().iPdpFsmInterface->NewL(tsyProvision->iTsyName, TPacketDataConfigBase::KConfigRel99Rel4);
+        	    configType = TPacketDataConfigBase::KConfigRel99Rel4;
         		break;
         	case TPacketDataConfigBase::KConfigRel5:
-                iContext.Node().iPdpFsmInterface->NewL(tsyProvision->iTsyName, TPacketDataConfigBase::KConfigRel5);
+        	    configType = TPacketDataConfigBase::KConfigRel5;
         		break;
         	default:
+        	    // we do not have to set provision failure here
+        	    // as it was set in the base class constructor
+        	    // svg will show the leave error code though
         		User::Leave(KErrNotSupported);
+        		break;
         	}
-
-        iContext.Node().iDefaultSCPR = static_cast<CPDPDefaultSubConnectionProvider*>(&iContext.Node());
+        
+        // a provisioning failure would be unrecoverable as this only happens
+        // we cannot create memory, access etel or there is a configuration
+        // problem - however, leaving with an error here does not stop the
+        // sequence of events because the handler for provision config is not
+        // expecting a response. if there is a failure then it will be errored in 
+        // the next activity in the sequence, i.e. DataClientStart
+        TRAP(tNode.iProvisionFailure,tNode.iPdpFsmInterface->NewL(tsyProvision->iTsyName,configType));
+        
+        tNode.iDefaultSCPR = static_cast<CPDPDefaultSubConnectionProvider*>(&tNode);
         }
-
-    //Replace the BCA provision - we'll be overriding the portname (the rest stays the same).
-  
-    // BA: This doesn't make sense, the port name is copied too so just replaces one CBCAProvision
-    // with another identical one!!
-//    const CBCAProvision* bcaExtension = static_cast<const CBCAProvision*>(
-//        iContext.Node().AccessPointConfig().FindExtensionL(CBCAProvision::TypeId()));
-
-/*    
-	CBCAProvision* bcaExtension2 = new (ELeave) CBCAProvision;
-	CleanupStack::PushL(bcaExtension2);
-
-	//Could optimise it one day.
-	bcaExtension2->SetBCAStack(bcaExtension->GetBCAStack());
-	bcaExtension2->SetBCAName(bcaExtension->GetBCAName());
-	bcaExtension2->SetIAPid(bcaExtension->GetIAPid());
-	bcaExtension2->SetPortName(bcaExtension->GetPortName());
-	bcaExtension2->SetCommRole(bcaExtension->GetCommRole());
-	bcaExtension2->SetHandShaking(bcaExtension->GetHandShaking());
-
-	iContext.Node().iAccessPointConfig->RemoveAndDestroyExtension_INTERNALTECH(CBCAProvision::TypeId());
-    iContext.Node().iAccessPointConfig->AppendExtensionL(bcaExtension2);
-    CleanupStack::Pop(bcaExtension2); //Ownership with the list
-*/ 
     }
 
 
@@ -447,7 +450,15 @@
 
 void TCreatePrimaryPDPCtx::DoL()
     {
-    ASSERT(iContext.Node().iPdpFsmInterface);
+    // if the provisionconfig failed, there is no way to inform the CPR of the failure
+    // as the framework doesn't expect a response from provisionconfig, so error here
+    // if there was a problem so that the appropriate clean up can happen.
+    
+    CPDPDefaultSubConnectionProvider &tNode = static_cast<CPDPDefaultSubConnectionProvider&>(iContext.Node());
+    
+    User::LeaveIfError(tNode.iProvisionFailure);
+    
+    ASSERT(tNode.iPdpFsmInterface);
 
     iContext.Node().PostToClients<TDefaultClientMatchPolicy>(
             iContext.NodeId(),
--- a/telephonyprotocols/pdplayer/src/pdpmcpr.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/pdpmcpr.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -20,15 +20,16 @@
  @internalComponent
 */
 
+#include <etelqos.h>
+#include <comms-infras/agentmcpractivities.h>
+#include <comms-infras/coremcpractivities.h>
+#include <comms-infras/ss_msgintercept.h>
+#include <elements/nm_messages_errorrecovery.h>
 #include <comms-infras/ss_log.h>
 #include "pdpmcpr.h"
 #include "pdpmcprstates.h"
 #include "PDPProvision.h"
 #include "psdavailabilitylistener.h"
-#include <comms-infras/agentmcpractivities.h>
-#include <comms-infras/coremcpractivities.h>
-#include <comms-infras/ss_msgintercept.h>
-#include <elements/nm_messages_errorrecovery.h>
 
 using namespace Messages;
 using namespace MeshMachine;
@@ -153,17 +154,26 @@
 	mec.AppendExtensionL(gprsProvision);
 	CleanupStack::Pop(gprsProvision);
 	
-	//It's legal for the qos defaults to be absent.
-	//in this case they're going to be supplied by
-	//GuQoS.
+	//It's not legal for the qos defaults to be absent.
 	CDefaultPacketQoSProvision* defaultQoS = NULL;
-	TRAP_IGNORE(defaultQoS = CDefaultPacketQoSProvision::NewL(iapView));
-	if (defaultQoS)
-    	{
-    	CleanupStack::PushL(defaultQoS);
-     	mec.AppendExtensionL(defaultQoS);
-     	CleanupStack::Pop(defaultQoS);
-    	}
+	TRAPD(ret, defaultQoS = CDefaultPacketQoSProvision::NewL(iapView));	  
+    if ((KErrNone == ret) && defaultQoS)           
+        {
+        CleanupStack::PushL(defaultQoS);
+        mec.AppendExtensionL(defaultQoS);
+        CleanupStack::Pop(defaultQoS);
+        }
+    else
+        {
+        if (KErrNoMemory == ret)
+            {
+            User::Leave(KErrNoMemory);
+            }
+        else
+            {
+            User::Leave(KErrCorrupt);
+            }          
+        }    
 	
 	CRawIpAgentConfig* rawIpAgentConfig = CRawIpAgentConfig::NewLC(iapView, &gprsProvision->GetScratchContextAs<TPacketDataConfigBase>());
 	mec.AppendExtensionL(rawIpAgentConfig);
--- a/telephonyprotocols/pdplayer/src/pdpmcprfactory.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/pdpmcprfactory.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -20,15 +20,19 @@
  @internalComponent
 */
 
+#include <etelqos.h>
 #include <ecom/implementationproxy.h>
-#include "pdpmcprfactory.h"
-#include "pdpmcpr.h"
 #include <comms-infras/ss_log.h>
 #include <ss_glob.h>
 #include <ecom/ecom.h>
 
 #include <comms-infras/ss_msgintercept.h>
 
+#include "pdpmcprfactory.h"
+#include "pdpmcpr.h"
+
+
+
 #ifdef _DEBUG
 #define KPdpMCprFactoryTag KESockMetaConnectionTag
 _LIT8(KPdpMCprFactorySubTag, "pdpmcprfactory");
--- a/telephonyprotocols/pdplayer/src/pdpmcprstates.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/pdpmcprstates.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -13,6 +13,7 @@
 // Description:
 //
 
+#include <etelqos.h>
 #include <comms-infras/ss_metaconnprov.h>
 #include <comms-infras/ss_nodeinterfaces.h>
 #include <elements/nm_messages_errorrecovery.h>
--- a/telephonyprotocols/pdplayer/src/psdavailabilitylistener.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/src/psdavailabilitylistener.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -204,6 +204,7 @@
 		}
 	else
 		{
+        // Kick off this class' mini state machine in the RunL
 		TRequestStatus* status = &iStatus;
 		User::RequestComplete(status, KErrNone);
 		}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside1.xml	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,669 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ All rights reserved.
+ This component and the accompanying materials are made available
+ under the terms of "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ Nokia Corporation - initial contribution.
+
+ Contributors:
+
+ Description:
+ CommDB Settings File for GT0233 PREQ398 Raw IP NIF testing.
+ All Rights Reserved
+
+-->
+
+
+
+<CommDB:Config xmlns="SymbianOS.Generic.Comms-Infras.CommDB"
+               xmlns:CommDB="SymbianOS.Generic.Comms-Infras.CommDB"
+               xmlns:xlink="http://www.w3.org/1999/xlink"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="SymbianOS.Generic.Comms-Infras.CommDB CommDB.xsd">
+
+<InformationTable>
+</InformationTable>
+
+<NetworkTable>
+    <Network operation="add">
+        <Name>Intranet</Name>
+    </Network>
+    
+    <Network operation="add">
+        <Name>Intranet2</Name>
+    </Network>
+    
+    <Network operation="add">
+        <Name>Intranet3</Name>
+    </Network>
+    
+    <Network operation="add">
+        <Name>Intranet4</Name>
+    </Network>
+
+    <Network operation="add">
+        <Name>Intranet5</Name>
+    </Network>
+
+    <Network operation="add">
+        <Name>Intranet6</Name>
+    </Network>
+
+</NetworkTable>
+
+<IAPTable>
+    <IAP operation="add">
+        <Name>Loopback_GRPS_1</Name>
+        <IAPService>OutgoingGPRS.RawIP_Bounce_1</IAPService>
+        <IAPBearer>ModemBearer.Loopback_RawIP_1</IAPBearer>
+        <IAPNetwork>Network.Intranet</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>    
+    <IAP operation="add">
+        <Name>Loopback_GRPS_2</Name>
+        <IAPService>OutgoingGPRS.SPUD_Echo_2</IAPService>
+        <IAPBearer>ModemBearer.Loopback_SPUD_2</IAPBearer>
+        <IAPNetwork>Network.Intranet</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>
+    
+    <IAP operation="add">
+        <Name>Loopback_GRPS_3</Name>
+        <IAPService>OutgoingGPRS.RawIP_Bounce_3</IAPService>
+        <IAPBearer>ModemBearer.Loopback_RawIP_3</IAPBearer>
+        <IAPNetwork>Network.Intranet2</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>    
+    <IAP operation="add">
+        <Name>Loopback_GRPS_4</Name>
+        <IAPService>OutgoingGPRS.SPUD_Echo_4</IAPService>
+        <IAPBearer>ModemBearer.Loopback_SPUD_4</IAPBearer>
+        <IAPNetwork>Network.Intranet2</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>
+    <IAP operation="add">
+        <Name>Loopback_GRPS_5</Name>
+        <IAPService>OutgoingGPRS.RawIP_Bounce_1</IAPService>
+        <IAPBearer>ModemBearer.Loopback_RawIP_3</IAPBearer>
+        <IAPNetwork>Network.Intranet2</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>    
+    <IAP operation="add">
+        <Name>Loopback_GRPS_6</Name>
+        <IAPService>OutgoingGPRS.SPUD_Multi_1</IAPService>
+        <IAPBearer>ModemBearer.Loopback_SPUD_5</IAPBearer>
+        <IAPNetwork>Network.Intranet3</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>
+    <IAP operation="add">
+        <Name>Loopback_GRPS_7</Name>
+        <IAPService>OutgoingGPRS.SPUD_Multi_2</IAPService>
+        <IAPBearer>ModemBearer.Loopback_SPUD_6</IAPBearer>
+        <IAPNetwork>Network.Intranet4</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>
+    <IAP operation="add">
+        <Name>Loopback_GRPS_8</Name>
+        <IAPService>OutgoingGPRS.SPUD_Multi_3</IAPService>
+        <IAPBearer>ModemBearer.Loopback_SPUD_7</IAPBearer>
+        <IAPNetwork>Network.Intranet5</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>
+    <IAP operation="add">
+        <Name>Loopback_GRPS_9</Name>
+        <IAPService>OutgoingGPRS.SPUD_Multi_4</IAPService>
+        <IAPBearer>ModemBearer.Loopback_SPUD_8</IAPBearer>
+        <IAPNetwork>Network.Intranet6</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>
+</IAPTable>
+
+
+<ModemBearerTable>
+    <ModemBearer operation="template">
+        <Name>Default Loopback Modem</Name>
+        <Agent>NULLAGT</Agent>
+        <CSYName>PKTLOOPBACK</CSYName>
+        <BCAStack>C32Bca</BCAStack>
+        <TSYName>SIM</TSYName>
+        <DataBits>8</DataBits>
+        <StopBits>1</StopBits>
+        <Parity>NONE</Parity>
+        <Rate>115200</Rate>
+        <Handshaking>0</Handshaking>
+        <SpecialRate>0</SpecialRate>
+        <XonChar>0</XonChar>
+        <XoffChar>0</XoffChar>
+        <FaxClassPref>AUTO</FaxClassPref>
+        <SpeakerPref>NEVER</SpeakerPref>
+        <SpeakerVolPref>QUIET</SpeakerVolPref>
+        <ModemInitString>AT</ModemInitString>
+        <DataInitString>AT</DataInitString>
+        <FaxInitString>AT</FaxInitString>
+        <DialPauseLength>S8=</DialPauseLength>
+        <SpeakerVolContorlLow>L0</SpeakerVolContorlLow>
+        <SpeakerVolControlMedium>L1</SpeakerVolControlMedium>
+        <SpeakerVolControlHigh>L2</SpeakerVolControlHigh>
+        <SpeakerAlwaysOff>M0</SpeakerAlwaysOff>
+        <SpeakerOnUntilCarrier>M1</SpeakerOnUntilCarrier>
+        <SpeakerAlwaysOn>M2</SpeakerAlwaysOn>
+        <SpeakerOnAfterUntilCarrier>M3</SpeakerOnAfterUntilCarrier>
+        <DialToneWaitModifier>W</DialToneWaitModifier>
+        <CallProgress1>X1</CallProgress1>
+        <CallProgress2>X2</CallProgress2>
+        <CallProgress3>X3</CallProgress3>
+        <CallProgress4>X4</CallProgress4>
+        <EchoOff>E0</EchoOff>
+        <VerboseText>V1</VerboseText>
+        <QuietOff>Q0</QuietOff>
+        <QuietOn>Q1</QuietOn>
+        <DialCommandStateModifier>;</DialCommandStateModifier>
+        <OnLine>O</OnLine>
+        <ResetConfiguration>Z</ResetConfiguration>
+        <ReturnToFactoryDefs>&amp;F</ReturnToFactoryDefs>
+        <DCDOnDuringLink>&amp;C1</DCDOnDuringLink>
+        <DTRHangUp>&amp;D2</DTRHangUp>
+        <DSRAlwaysOn>&amp;S0</DSRAlwaysOn>
+        <RTSCTSHandshake>&amp;K3</RTSCTSHandshake>
+        <XonXoffHandshake>&amp;K4</XonXoffHandshake>
+        <EscapeCharacter>+</EscapeCharacter>
+        <EscapeGuardPeriod>S12</EscapeGuardPeriod>
+        <NoDialTone>NO DIAL TONE</NoDialTone>
+        <Busy>BUSY</Busy>
+        <NoAnswer>NO ANSWER</NoAnswer>
+        <Carrier>CARRIER</Carrier>
+        <Connect>CONNECT</Connect>
+        <CompressionClass5>COMPRESSION:CLASS 5</CompressionClass5>
+        <CompressionV42bis>COMPRESSION:V.42 bis</CompressionV42bis>
+        <CompressionNone>COMPRESSION:NONE</CompressionNone>
+        <ProtocolLAPD>PROTOCOL:LAPD</ProtocolLAPD>
+        <ProtocolALT>PROTOCOL:ALT</ProtocolALT>
+        <ProtocolALTCELLULAR>PROTOCOL:ALT-CELLULAR</ProtocolALTCELLULAR>
+        <ProtocolNone>PROTOCOL:NONE</ProtocolNone>
+        <MessageValidityPeriod>0</MessageValidityPeriod>
+        <MessageDeliveryReport>FALSE</MessageDeliveryReport>
+        <LastSessionClosedTimeout>4</LastSessionClosedTimeout>
+        <LastSocketClosedTimeout>6</LastSocketClosedTimeout>
+        <LastSocketActivityTimeout>180</LastSocketActivityTimeout>
+        <CommRole>0</CommRole>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>Loopback_RawIP_1</Name>
+        <IfName>RAWIP</IfName>
+        <CSYName>PKTLOOPBACK</CSYName>
+        <PortName>PKTLOOPBACK::501</PortName>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>Loopback_SPUD_2</Name>
+        <IfName>SPUD</IfName>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>Loopback_RawIP_3</Name>
+        <IfName>RAWIP</IfName>
+        <CSYName>PKTLOOPBACK</CSYName>
+        <PortName>PKTLOOPBACK::503</PortName>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>Loopback_SPUD_4</Name>
+        <IfName>SPUD</IfName>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>WinTunnel_SPUD_5</Name>
+        <Agent>NULLAGT</Agent>
+        <IfName>SPUD</IfName>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>Loopback_SPUD_5</Name>
+        <IfName>SPUD</IfName>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>Loopback_SPUD_6</Name>
+        <IfName>SPUD</IfName>
+    </ModemBearer>
+    
+    <ModemBearer operation="add">
+        <Name>Loopback_SPUD_7</Name>
+        <IfName>SPUD</IfName>
+    </ModemBearer>
+
+    <ModemBearer operation="add">
+        <Name>Loopback_SPUD_8</Name>
+        <IfName>SPUD</IfName>
+    </ModemBearer>
+
+</ModemBearerTable>
+
+<LANBearerTable>
+</LANBearerTable>
+
+<LANServiceTable>
+</LANServiceTable>
+
+<DialInISPTable>
+</DialInISPTable>
+
+<DialOutISPTable>
+</DialOutISPTable>
+
+<AgentLookupTable>
+</AgentLookupTable>
+
+<CDMA2000PacketServiceTable>
+</CDMA2000PacketServiceTable>
+
+<DefaultCDMA2000Table>
+</DefaultCDMA2000Table>
+
+<ChargecardTable>
+</ChargecardTable>
+
+<ConnectionPreferencesTable>
+    <!-- We must have at least one record with ranking of 1, else Netcon fails. -->
+    <ConnectionPreferences operation="add">
+        <Name>ConnectionPreferencesTable1</Name>
+        <Ranking>1</Ranking>
+        <Direction>OUTGOING</Direction>
+        <DialogPref>DONOTPROMPT</DialogPref>
+        <BearerSet>PSD</BearerSet>
+        <IAPRef>IAP.Loopback_GRPS_2</IAPRef>
+    </ConnectionPreferences>    
+</ConnectionPreferencesTable>
+
+<GlobalSettingsTable>
+    <GlobalSettings operation="add">
+        <Name>GlobalSettingsTable1</Name>
+        <RedialAttempts>3</RedialAttempts>
+        <SmsReceiveMode>2</SmsReceiveMode>
+        <GPRSAttachMode>1</GPRSAttachMode>
+        <AcceptIncomingGprs>1</AcceptIncomingGprs>
+        <ConnectionAttempts>2</ConnectionAttempts>
+        <ModemForDataAndFax>2</ModemForDataAndFax>
+        <ModemForPhoneServicesAndSMS>2</ModemForPhoneServicesAndSMS>
+        <LocationForDataAndFax>Location.Mobile</LocationForDataAndFax>
+        <LocationForPhoneServicesAndSMS>Location.Mobile</LocationForPhoneServicesAndSMS>
+        <GPRSClassCBearer>GSM</GPRSClassCBearer>
+        <DefaultNetwork>Network.Intranet</DefaultNetwork>
+        <BearerAvailabilityCheckTSY>mm</BearerAvailabilityCheckTSY>
+    </GlobalSettings>
+</GlobalSettingsTable>
+
+<IncomingGPRSTable>
+</IncomingGPRSTable>
+
+<OutgoingGPRSTable>
+    <OutgoingGPRS operation="template">
+    	<Name>Default Outgoing GPRS</Name>
+        <APN>Test</APN>
+        <PDPType>IPV4</PDPType>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>FALSE</IpAddrFromServer>
+        <IpDNSAddrFromServer>FALSE</IpDNSAddrFromServer>
+        <ReqPrecedence>2</ReqPrecedence>
+        <ReqDelay>4</ReqDelay>
+        <ReqReliability>3</ReqReliability>
+        <ReqPeakThroughput>3</ReqPeakThroughput>
+        <ReqMeanThroughput>31</ReqMeanThroughput>
+        <MinPrecedence>2</MinPrecedence>
+        <MinDelay>4</MinDelay>
+        <MinReliability>3</MinReliability>
+        <MinPeakThroughput>3</MinPeakThroughput>
+        <MinMeanThroughput>31</MinMeanThroughput>
+        <DataCompression>FALSE</DataCompression>
+        <HeaderCompression>FALSE</HeaderCompression>
+        <AnonymousAccess>FALSE</AnonymousAccess>
+        <IpNetMask>255.255.255.0</IpNetMask>
+        <IfNetworks>ip</IfNetworks>
+      	<IfAuthName>RasUser</IfAuthName>
+        <AuthRetries>1</AuthRetries>
+        <IpNameServer1>194.72.6.51</IpNameServer1>
+        <IpNameServer2>194.72.6.51</IpNameServer2>
+        <EnableLCPExtension>FALSE</EnableLCPExtension>
+        <DisablePlainTextAuth>FALSE</DisablePlainTextAuth>
+        <GprsUseEdge>FALSE</GprsUseEdge>
+        <UmtsR99QoSAndOnRef>UmtsR99QoSAndOn.PRIMARY1</UmtsR99QoSAndOnRef>         
+    </OutgoingGPRS>
+    
+    <OutgoingGPRS operation="add">
+        <Name>RawIP_Bounce_1</Name>
+        <PDPType>IPV4</PDPType>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>FALSE</IpAddrFromServer>
+        <IpDNSAddrFromServer>FALSE</IpDNSAddrFromServer>
+        <IpAddr>192.168.1.1</IpAddr>
+    </OutgoingGPRS>
+    
+    <OutgoingGPRS operation="add">
+        <Name>SPUD_Echo_2</Name>
+      	<PDPType>IPV4</PDPType>
+        <IfParams>lowernif=RAWIP</IfParams>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>TRUE</IpAddrFromServer>
+        <IpDNSAddrFromServer>TRUE</IpDNSAddrFromServer>  
+        <IpAddr>192.168.1.2</IpAddr>
+    </OutgoingGPRS>
+    
+    <OutgoingGPRS operation="add">
+        <Name>RawIP_Bounce_3</Name>
+        <PDPType>IPV4</PDPType>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>FALSE</IpAddrFromServer>
+        <IpDNSAddrFromServer>FALSE</IpDNSAddrFromServer>
+        <IpAddr>192.168.2.3</IpAddr>
+    </OutgoingGPRS>
+    
+    <OutgoingGPRS operation="add">
+        <Name>SPUD_Echo_4</Name>
+      	<PDPType>IPV4</PDPType>
+        <IfParams>lowernif=RAWIP</IfParams>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>FALSE</IpAddrFromServer>
+        <IpDNSAddrFromServer>FALSE</IpDNSAddrFromServer>  
+        <IpAddr>192.168.2.4</IpAddr>        
+    </OutgoingGPRS>
+    <OutgoingGPRS operation="add">
+        <Name>SPUD_Multi_1</Name>
+      	<PDPType>IPV4</PDPType>
+        <IfParams>lowernif=RAWIP</IfParams>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>TRUE</IpAddrFromServer>
+        <IpDNSAddrFromServer>TRUE</IpDNSAddrFromServer>  
+        <IpAddr>192.168.1.10</IpAddr>
+    </OutgoingGPRS>
+    <OutgoingGPRS operation="add">
+        <Name>SPUD_Multi_2</Name>
+      	<PDPType>IPV4</PDPType>
+        <IfParams>lowernif=RAWIP</IfParams>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>TRUE</IpAddrFromServer>
+        <IpDNSAddrFromServer>TRUE</IpDNSAddrFromServer>  
+        <IpAddr>192.168.1.11</IpAddr>
+    </OutgoingGPRS>
+    <OutgoingGPRS operation="add">
+        <Name>SPUD_Multi_3</Name>
+      	<PDPType>IPV4</PDPType>
+        <IfParams>lowernif=RAWIP</IfParams>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>TRUE</IpAddrFromServer>
+        <IpDNSAddrFromServer>TRUE</IpDNSAddrFromServer>  
+        <IpAddr>192.168.1.12</IpAddr>
+    </OutgoingGPRS>
+    <OutgoingGPRS operation="add">
+        <Name>SPUD_Multi_4</Name>
+      	<PDPType>IPV4</PDPType>
+        <IfParams>lowernif=RAWIP</IfParams>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>TRUE</IpAddrFromServer>
+        <IpDNSAddrFromServer>TRUE</IpDNSAddrFromServer>  
+        <IpAddr>192.168.1.13</IpAddr>
+    </OutgoingGPRS>
+</OutgoingGPRSTable>
+
+<DefaultGPRSTable>
+    <DefaultGPRS operation="add">
+        <Name>Dummy Default GPRS Settings</Name>
+        <APN>Access point name</APN>
+        <PDPType>IPV6</PDPType>
+        <PDPAddress>www.wid.com</PDPAddress>
+        <Usage>1</Usage>
+        <Precedence>1</Precedence>
+        <Delay>1</Delay>
+        <Reliability>1</Reliability>
+        <PeakThroughput>1</PeakThroughput>
+        <MeanThroughput>1</MeanThroughput>
+        <MinPrecedence>1</MinPrecedence>
+        <MinDelay>1</MinDelay>
+        <MinReliability>1</MinReliability>
+        <MinPeakThroughput>1</MinPeakThroughput>
+        <MinMeanThroughput>1</MinMeanThroughput>
+        <DataCompression>TRUE</DataCompression>
+        <HeaderCompression>TRUE</HeaderCompression>
+        <GprsUseEdge>FALSE</GprsUseEdge>
+        <AnonymousAccess>TRUE</AnonymousAccess>
+    </DefaultGPRS>
+</DefaultGPRSTable>
+
+<ProxyTable>
+</ProxyTable>
+
+<LocationTable>
+    <Location operation="template">
+        <Name>Default Location</Name>
+        <Mobile>TRUE</Mobile>
+        <UsePulseDial>FALSE</UsePulseDial>
+        <WaitForDialTone>FALSE</WaitForDialTone>
+        <PauseAfterDialout>0</PauseAfterDialout>
+        <IntlPrefixCode>+</IntlPrefixCode>
+        <NatPrefixCode>0</NatPrefixCode>
+        <NatCode>44</NatCode>
+    </Location>
+ 
+    <Location operation="add">
+        <Name>Office</Name>
+        <Mobile>FALSE</Mobile>
+        <UsePulseDial>FALSE</UsePulseDial>
+        <WaitForDialTone>FALSE</WaitForDialTone>
+        <PauseAfterDialout>0</PauseAfterDialout>
+        <IntlPrefixCode>00</IntlPrefixCode>
+        <NatPrefixCode>0</NatPrefixCode>
+        <NatCode>44</NatCode>
+        <AreaCode>171</AreaCode>
+        <DialOutCode>9,</DialOutCode>
+    </Location>
+ 
+    <Location operation="add">
+        <Name>Mobile</Name>
+        <Mobile>TRUE</Mobile>
+        <UsePulseDial>FALSE</UsePulseDial>
+        <WaitForDialTone>FALSE</WaitForDialTone>
+        <PauseAfterDialout>0</PauseAfterDialout>
+        <IntlPrefixCode>+</IntlPrefixCode>
+        <NatPrefixCode>0</NatPrefixCode>
+        <NatCode>44</NatCode>
+    </Location>
+
+</LocationTable>
+
+<SecureSocketTable>
+</SecureSocketTable>
+
+<UmtsR99QoSAndOnTable>
+	<UmtsR99QoSAndOn operation ="add">
+	  	<Name>PRIMARY1</Name>
+		<ReqTrafficClass>1</ReqTrafficClass>
+		<MinTrafficClass>1</MinTrafficClass>
+		<ReqDeliveryOrder>1</ReqDeliveryOrder>
+		<MinDeliveryOrder>1</MinDeliveryOrder>
+		<ReqDeliverErroneousSDU>1</ReqDeliverErroneousSDU>
+		<MinDeliverErroneousSDU>1</MinDeliverErroneousSDU>
+		<ReqMaxSDUSize>0</ReqMaxSDUSize>
+		<MinAcceptableMaxSDUSize>0</MinAcceptableMaxSDUSize>
+		<ReqMaxUplinkRate>0</ReqMaxUplinkRate>
+		<ReqMinUplinkRate>0</ReqMinUplinkRate>
+		<ReqMaxDownlinkRate>0</ReqMaxDownlinkRate>
+		<ReqMinDownlinkRate>0</ReqMinDownlinkRate>
+		<ReqBER>1</ReqBER>
+		<MaxBER>1</MaxBER>
+		<ReqSDUErrorRatio>1</ReqSDUErrorRatio>
+		<MaxSDUErrorRatio>1</MaxSDUErrorRatio>
+		<ReqTrafficHandlingPriority>1</ReqTrafficHandlingPriority>
+		<MinTrafficHandlingPriority>1</MinTrafficHandlingPriority>
+		<ReqTransferDelay>0</ReqTransferDelay>
+		<MaxTransferDelay>0</MaxTransferDelay>
+		<ReqGuaranteedUplinkRate>0</ReqGuaranteedUplinkRate>
+		<MinGuaranteedUplinkRat>0</MinGuaranteedUplinkRat>
+		<ReqGuaranteedDownlinkRate>0</ReqGuaranteedDownlinkRate>
+		<MinGuaranteedDownlinkRate>0</MinGuaranteedDownlinkRate>
+		<SignallingIndication>FALSE</SignallingIndication>
+		<IMCNSignallingIndication>FALSE</IMCNSignallingIndication>
+		<SourceStatisticsDescriptor>0</SourceStatisticsDescriptor>
+	</UmtsR99QoSAndOn>
+
+	<UmtsR99QoSAndOn operation ="add">
+		<Name>SECONDARY1</Name>
+		<ReqTrafficClass>4</ReqTrafficClass>
+		<MinTrafficClass>4</MinTrafficClass>
+		<ReqDeliveryOrder>1</ReqDeliveryOrder>
+		<MinDeliveryOrder>1</MinDeliveryOrder>
+		<ReqDeliverErroneousSDU>8</ReqDeliverErroneousSDU>
+		<MinDeliverErroneousSDU>8</MinDeliverErroneousSDU>
+		<ReqMaxSDUSize>768</ReqMaxSDUSize>
+		<MinAcceptableMaxSDUSize>512</MinAcceptableMaxSDUSize>
+		<ReqMaxUplinkRate>1024</ReqMaxUplinkRate>
+		<ReqMinUplinkRate>1024</ReqMinUplinkRate>
+		<ReqMaxDownlinkRate>1024</ReqMaxDownlinkRate>
+		<ReqMinDownlinkRate>1024</ReqMinDownlinkRate>
+		<ReqBER>0</ReqBER>
+		<MaxBER>0</MaxBER>
+		<ReqSDUErrorRatio>1</ReqSDUErrorRatio>
+		<MaxSDUErrorRatio>1</MaxSDUErrorRatio>
+		<ReqTrafficHandlingPriority>1</ReqTrafficHandlingPriority>
+		<MinTrafficHandlingPriority>1</MinTrafficHandlingPriority>
+		<ReqTransferDelay>250</ReqTransferDelay>
+		<MaxTransferDelay>250</MaxTransferDelay>
+		<ReqGuaranteedUplinkRate>1024</ReqGuaranteedUplinkRate>
+		<MinGuaranteedUplinkRat>1024</MinGuaranteedUplinkRat>
+		<ReqGuaranteedDownlinkRate>1024</ReqGuaranteedDownlinkRate>
+		<MinGuaranteedDownlinkRate>1024</MinGuaranteedDownlinkRate>
+		<SignallingIndication>FALSE</SignallingIndication>
+		<IMCNSignallingIndication>FALSE</IMCNSignallingIndication>
+		<SourceStatisticsDescriptor>0</SourceStatisticsDescriptor>
+	</UmtsR99QoSAndOn>
+
+	<UmtsR99QoSAndOn operation ="add">
+	  	<Name>PRIMARY2</Name>
+		<ReqTrafficClass>1</ReqTrafficClass>
+		<MinTrafficClass>1</MinTrafficClass>
+		<ReqDeliveryOrder>1</ReqDeliveryOrder>
+		<MinDeliveryOrder>1</MinDeliveryOrder>
+		<ReqDeliverErroneousSDU>1</ReqDeliverErroneousSDU>
+		<MinDeliverErroneousSDU>1</MinDeliverErroneousSDU>
+		<ReqMaxSDUSize>0</ReqMaxSDUSize>
+		<MinAcceptableMaxSDUSize>0</MinAcceptableMaxSDUSize>
+		<ReqMaxUplinkRate>0</ReqMaxUplinkRate>
+		<ReqMinUplinkRate>0</ReqMinUplinkRate>
+		<ReqMaxDownlinkRate>0</ReqMaxDownlinkRate>
+		<ReqMinDownlinkRate>0</ReqMinDownlinkRate>
+		<ReqBER>1</ReqBER>
+		<MaxBER>1</MaxBER>
+		<ReqSDUErrorRatio>1</ReqSDUErrorRatio>
+		<MaxSDUErrorRatio>1</MaxSDUErrorRatio>
+		<ReqTrafficHandlingPriority>1</ReqTrafficHandlingPriority>
+		<MinTrafficHandlingPriority>1</MinTrafficHandlingPriority>
+		<ReqTransferDelay>0</ReqTransferDelay>
+		<MaxTransferDelay>0</MaxTransferDelay>
+		<ReqGuaranteedUplinkRate>0</ReqGuaranteedUplinkRate>
+		<MinGuaranteedUplinkRat>0</MinGuaranteedUplinkRat>
+		<ReqGuaranteedDownlinkRate>0</ReqGuaranteedDownlinkRate>
+		<MinGuaranteedDownlinkRate>0</MinGuaranteedDownlinkRate>
+		<SignallingIndication>FALSE</SignallingIndication>
+		<IMCNSignallingIndication>FALSE</IMCNSignallingIndication>
+		<SourceStatisticsDescriptor>0</SourceStatisticsDescriptor>
+	</UmtsR99QoSAndOn>
+
+	<UmtsR99QoSAndOn operation ="add">
+		<Name>SECONDARY2</Name>
+		<ReqTrafficClass>4</ReqTrafficClass>
+		<MinTrafficClass>4</MinTrafficClass>
+		<ReqDeliveryOrder>1</ReqDeliveryOrder>
+		<MinDeliveryOrder>1</MinDeliveryOrder>
+		<ReqDeliverErroneousSDU>8</ReqDeliverErroneousSDU>
+		<MinDeliverErroneousSDU>8</MinDeliverErroneousSDU>
+		<ReqMaxSDUSize>768</ReqMaxSDUSize>
+		<MinAcceptableMaxSDUSize>512</MinAcceptableMaxSDUSize>
+		<ReqMaxUplinkRate>1024</ReqMaxUplinkRate>
+		<ReqMinUplinkRate>1024</ReqMinUplinkRate>
+		<ReqMaxDownlinkRate>1024</ReqMaxDownlinkRate>
+		<ReqMinDownlinkRate>1024</ReqMinDownlinkRate>
+		<ReqBER>0</ReqBER>
+		<MaxBER>0</MaxBER>
+		<ReqSDUErrorRatio>1</ReqSDUErrorRatio>
+		<MaxSDUErrorRatio>1</MaxSDUErrorRatio>
+		<ReqTrafficHandlingPriority>1</ReqTrafficHandlingPriority>
+		<MinTrafficHandlingPriority>1</MinTrafficHandlingPriority>
+		<ReqTransferDelay>250</ReqTransferDelay>
+		<MaxTransferDelay>250</MaxTransferDelay>
+		<ReqGuaranteedUplinkRate>1024</ReqGuaranteedUplinkRate>
+		<MinGuaranteedUplinkRat>1024</MinGuaranteedUplinkRat>
+		<ReqGuaranteedDownlinkRate>1024</ReqGuaranteedDownlinkRate>
+		<MinGuaranteedDownlinkRate>1024</MinGuaranteedDownlinkRate>
+		<SignallingIndication>FALSE</SignallingIndication>
+		<IMCNSignallingIndication>FALSE</IMCNSignallingIndication>
+		<SourceStatisticsDescriptor>0</SourceStatisticsDescriptor>
+	</UmtsR99QoSAndOn>
+
+</UmtsR99QoSAndOnTable>
+<BTDeviceTable>
+</BTDeviceTable>
+
+<BTPersistTable>
+</BTPersistTable>
+
+<BTSecurityTable>
+</BTSecurityTable>
+
+<BTDefaultTable>
+</BTDefaultTable>
+
+<WAPAccessPointTable>
+</WAPAccessPointTable>
+
+<WAPIPBearerTable>
+</WAPIPBearerTable>
+
+<WAPSMSBearerTable>
+</WAPSMSBearerTable>
+
+<VirtualBearerTable>
+</VirtualBearerTable>
+
+<VpnServiceTable>
+</VpnServiceTable>
+
+<PolicySelectorTable>
+	<PolicySelector operation ="add">
+		<PolicyId>1</PolicyId>
+		<SrcAddress>0.0.0.0</SrcAddress>
+		<SrcMask>255.255.255.255</SrcMask>
+		<DstAddress>192.168.1.1</DstAddress>
+		<DstMask>255.255.255.255</DstMask>
+		<SrcPort>0</SrcPort>
+		<SrcPortMax>1031</SrcPortMax>
+		<DstPort>3461</DstPort>
+		<DstPortMax>3461</DstPortMax>
+		<ProtocolId>17</ProtocolId>
+		<IapId>2</IapId>
+		<Priority>1</Priority>
+	</PolicySelector>
+
+	<PolicySelector operation ="add">
+		<PolicyId>2</PolicyId>
+		<SrcPort>0</SrcPort>
+		<SrcPortMax>0</SrcPortMax>
+		<ProtocolId>1</ProtocolId>
+		<IapId>2</IapId>
+		<Priority>1</Priority>
+	</PolicySelector>
+</PolicySelectorTable>
+
+</CommDB:Config>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside_config.txt	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,163 @@
+############################################################################
+############################################################################
+###################              T E S T 0              ####################
+############################################################################
+############################################################################
+# Test case for success results
+############################################################################
+[test0]
+# DefaultContextparamGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+DefaultContextparamGPRS= 3, SYMBIAN EMPLOYEE INTRANET, A WAP PORTAL, 2, 1, 1, 1, USER2, PASSWORD2, NULL, NULL, PRIMARYSERVER2, SECONDARYSERVER2, 2
+
+# ContextConfigGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+SetContextConfigGPRS = 0,Test,,0,2,0,1,RasUser,,,,,,1
+# TRel99ContextConfig = <TName iContextName>,  <TUint iActivatePause>, <TUint iActivateErrorCode>, <TUint iDeactivatePause>, 
+# <TUint iDeactivateErrorCode>, <TUint iDeletionPause>, <TUint iDeletionErrorCode> <TBool iConnectToNtRas>
+R99ContextConfig = PRIMARY1, 0, 0, 0, 0, 0, 0, 0
+R99ContextConfig = SECONDARY1, 0, 0, 0, 0, 0, 0, 0
+R99ContextConfig = SECONDARY2, 0, 0, 0, 0, 0, 0, 0
+
+# TFTfilter = 0<id> 1<evaluationPrecedenceIndex> 2<srcAddr> 3<srcAddrSubnetMask>  4<protocolNumberOrNextHeader>
+#	      5<srcPortMin> 6<srcPortMax> 7<destPortMin> 8<destPortMax> 9<ipSecSPI> 10<toSorTrafficClass>
+#	      11<flowLabel>
+TFTfilter = 1, 96, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 1031, 0, 0, 0
+TFTfilter = 1, 0, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 1031, 0, 0, 0
+TFTfilter = 1, 1, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 1031, 0, 0, 0
+
+#TProfileReqR99 = 0<contextName> 1<reqTraffic> 2<minTraffic> 3<reqDeliveryOrder> 4<minDeliveryOrder>
+#		  5<reqErroneousSDU> 6<minErroneousSDU> 7<maxSDUSize> 8<minSDUSize>
+#		 9<reqUpLinkBitRate> 10<reqDownLinkBitRate> 11<minUpLinkBitRate> 12<minDownLinkBitRate> 
+#		 
+#		 13<reqBitErrorRatio> 14<minBitErrorRatio> 15<reqSDUErrorRatio> 16<minSDUErrorRatio>
+#		 17<reqTrafficHandlingPriority> 18<minTrafficHandlingPriority>
+#		 19<reqTransferDelay> 20<minTransferDelay> 21<reqGuaranteedUpLinkBitRate> 22<reqGuaranteedDownLinkBitRate>
+#		 23<minGuaranteedUpLinkBitRate> 24<minGuaranteedDownLinkBitRate>
+QosProfileReqR99 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0
+QosProfileReqR99 = SECONDARY1,0x04, 0x04, 0x01, 0x01, 0x08, 0x08, -1, -1, -1, -1, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 250, 250, -1, -1, 0, 0
+QosProfileReqR99 = SECONDARY1,0x04, 0x04, 0x01, 0x01, 0x08, 0x08, -1, -1, -1, -1, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 250, 250, -1, -1, 0, 0
+QosProfileReqR99 = SECONDARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0
+QosProfileReqR99 = SECONDARY2,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0
+
+QosProfileReqR5 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
+QosProfileReqR5 = SECONDARY1,0x04, 0x04, 0x01, 0x01, 0x08, 0x08, -1, -1, -1, -1, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 250, 250, -1, -1, 0, 0, 0, 0
+QosProfileReqR5 = SECONDARY1,0x04, 0x04, 0x01, 0x01, 0x08, 0x08, -1, -1, -1, -1, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 250, 250, -1, -1, 0, 0, 0, 0
+QosProfileReqR5 = SECONDARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
+QosProfileReqR5 = SECONDARY2,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
+
+
+
+#TProfileNegR99 =<contextName> <duration> <negTraffic> <negDeliveryOrder> <negErroneousSDUDelivery> <negMaxSDUSize>
+#		 <negBitErrorRatio> <negSDUErrorRatio> <negTrafficHandlingPriority>
+#		 <negTransferDelay> <negGuaranteedUpLinkBitRate> <negGuaranteedDownLinkBitRate>
+#		 <negMaxUpLinkRate> <negMaxDownLinkRate> 
+QosProfileNegR99 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+QosProfileNegR99 = SECONDARY1, 0x03, 0x01, 0x01, 0x01, 1501, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = SECONDARY1, 0x03, 0x01, 0x01, 0x01, 1501, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = SECONDARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = SECONDARY2, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+
+QosProfileNegR5 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+QosProfileNegR5 = SECONDARY1, 0x03, 0x01, 0x01, 0x01, 1501, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = SECONDARY1, 0x03, 0x01, 0x01, 0x01, 1501, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = SECONDARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = SECONDARY2, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+
+
+#TQosProfileCapsR99 = <trafficCap> <deliveryOrderReqCap> <deliverErroneousSDUCap>
+#		      <BERCap> <SDUErrorRatioCap> <trafficHandlingPriorityCap>
+QosProfileCapsR99= 0x08, 0x04, 0x02, 0x04, 0x02, 0x04
+
+QosNetworkNotificationType = PublishSubscribe
+# QosNetworkNotification = <contextName> <duration> <negTraffic> <negDeliveryOrder> <negErroneousSDUDelivery>
+#		 <negBitErrorRatio> <negSDUErrorRatio> <negTrafficHandlingPriority>
+#		 <negTransferDelay> <negGuaranteedUpLinkBitRate> <negGuaranteedDownLinkBitRate>
+#		 <negMaxUpLinkRate> <negMaxDownLinkRate> <negMaxSDUSize>
+QosNetworkNotification = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+QosNetworkNotification = PRIMARY2, 0x04, 0x02, 0x04, 0x02, 1, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+QosNetworkNotification = SECONDARY1, 0x04, 0x02, 0x04, 0x02, 1, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+
+QosR5NetworkNotification = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+QosR5NetworkNotification = PRIMARY2, 0x04, 0x02, 0x04, 0x02, 1, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+QosR5NetworkNotification = SECONDARY1, 0x04, 0x02, 0x04, 0x02, 1, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+
+
+#SetProfileFail= <contextName> <numberOfTimes> <errorCode> <setProfileDigit>
+SetProfileFail = NEG_99, 0x04, 0x02
+
+#QosprofileReqGPRS= <minPrecedence> <reqPrecedence> <minDelay> <reqDelay> <minReliability> <reqReliability> <minPeek> <reqPeek>
+#		    <minMean> <reqMean>
+QosProfileReqGPRS= 0x08, 0x04, 0x02, 0x04, 0x02, 0x04, 0x020, 0x080, 0x00004, 0x00020
+QosProfileReqGPRS= 0x04, 0x04, 0x02, 0x04, 0x02, 0x04, 0x020, 0x080, 0x00004, 0x00020
+
+#QosProfileNegGPRS=<negPrecedence> <negDelay><negReliability> <negPeek> <negMean>
+QosProfileNegGPRS= 0x04, 0x04, 0x04, 0x080, 0x00002
+QosProfileNegGPRS= 0x04, 0x04, 0x04, 0x080, 0x00002
+
+#QosProfileCapsGPRS=<negPrecedenceCap> <negDelayCap> <negReliabilityCap><negPeekCap> <negMeanCap>
+QosProfileCapsGPRS= 0x04, 0x04, 0x04, 0x080, 0x00002 
+
+# QosProfileReq
+# = <TTrafficClass>, <TTrafficClass>, <TDeliveryOrder>, <TDeliveryOrder>
+# <TErroneousSDUDelivery>, <TErroneousSDUDelivery>
+# <TErroneousSDUDelivery>, <TInt iReqMaxSDUSize>, <TInt iMinAcceptableMaxSDUSize>
+# <TBitRate>, <TBitRate>, <TBitErrorRatio>, 
+# <TBitErrorRatio>, <TSDUErrorRatio>, <TSDUErrorRatio>, <TTrafficHandlingPriority>, <TTrafficHandlingPriority>
+# <TInt	iReqTransferDelay>, <TInt iMaxTransferDelay>, <TBitRate>, <TBitRate>
+
+# QosProfileNeg = <TQoSPrecedence>, <TQoSDelay>, <TQoSReliability>, <TQoSPeakThroughput>, <TQoSMeanThroughput>
+# <TTrafficClass>, <TDeliveryOrder>, <TErroneousSDUDelivery>, <TInt iMaxSDUSize>, <TBitRate>, 
+# <TBitErrorRatio>, <TSDUErrorRatio>, <TTrafficHandlingPriority>
+# <TInt iTransferDelay>, <TBitRate>		
+
+DefaultContextparamRel99= 3, ACME INTERNET PROVIDERS LTD, i-MODE GATEWAY, 1, 1, USER2, PASSWORD2, NULL, NULL, PRIMARYSERVER2, SECONDARYSERVER2, 2
+# DefaultContextparamRel99 = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+
+ReleaseMode = 5, 5
+# Packet Release mode = <Release> <Duration>
+
+#RegStatus=<duration> <regStat> <networkIndex> 
+RegStatus= 5,3
+RegStatus= 2,5,0
+RegStatus= 2,7,3
+RegStatus= 5,2
+RegStatus= 2,5,0
+
+# NetworkRegStatus = <Duration>, <RegistrationStatus>
+NetworkRegStatusType = PublishSubscribe
+NetworkRegStatus= 5,2
+NetworkRegStatus= 5,1
+NetworkRegStatus= 5,1
+
+# CommSetup = <CsyName> <portName> <datarate> <handshake> <contextName> 
+CommSetup= PKTLOOPBACK.CSY, PKTLOOPBACK::502, 18, 0, PRIMARY1
+CommSetup= PKTLOOPBACK.CSY, PKTLOOPBACK::504, 18, 0, SECONDARY1
+CommSetup= PKTLOOPBACK.CSY, PKTLOOPBACK::506, 18, 0, SECONDARY2
+
+############################################################################
+# failure events
+# Configure the context's status to be changed using publish and subscribe
+NotifyContextStatusChangeType = PublishSubscribe
+# NotifyContextStatusChange <iContextName>, <iDuration>, <iStatus>
+
+# EStatusDeactivating = 4 EStatusInactive = 1 EStatusDeleted = 6
+NotifyContextStatusChange = PRIMARY1, 0, 6
+NotifyContextStatusChange = PRIMARY1, 0, 4
+NotifyContextStatusChange = PRIMARY1, 0, 1
+NotifyContextStatusChange = SECONDARY1, 0, 6
+NotifyContextStatusChange = SECONDARY1, 0, 4
+NotifyContextStatusChange = SECONDARY1, 0, 1
+
+# EStatusSuspended = 5 EStatusActive = 3
+NotifyContextStatusChange = PRIMARY1, 0, 5
+NotifyContextStatusChange = PRIMARY1, 0, 3
+NotifyContextStatusChange = SECONDARY1, 0, 5
+NotifyContextStatusChange = SECONDARY1, 0, 3
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside_test28.ini	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,101 @@
+[SimTsy]
+TestSection=0
+
+[CreateSockSvr1]
+SocketServName=SockSvr1
+
+[ConnectSockSvr1]
+SocketServName=SockSvr1
+
+[CreateConn1]
+ConnName=Conn1
+
+[OpenConn1]
+ConnName=Conn1
+SocketServName=SockSvr1
+
+[CreateConnectionServA]
+ConnServName=ConnServA
+
+[ConnectConnectionServA]
+ConnServName=ConnServA
+TierName=LinkTier
+
+[CreateConnectionServS]
+ConnServName=ConnServS
+
+[ConnectConnectionServS]
+ConnServName=ConnServS
+TierName=LinkTier
+
+[APNotificationRequest1A]
+ConnServName=ConnServA
+NotificationName=NotifA
+QueryAPStatusFilter=C-R-AYS-
+QueryAPMatch0=2
+
+[APNotificationRequest1S]
+ConnServName=ConnServS
+NotificationName=NotifS
+QueryAPStatusFilter=C-R-A-SY
+
+[StartConn1_1]
+ConnName=Conn1
+SocketServName=SockSvr1
+IAP=2
+
+[ReceiveNotification1A]
+NotificationName=NotifA
+WaitPeriod=5
+ExpectedNumberOfAPs=1
+ExpectedAP1=2
+ExpectedAP1Status=C?R?AYS?
+
+[ReceiveNotification1S]
+NotificationName=NotifS
+WaitPeriod=5
+ExpectedNumberOfAPs=1
+ExpectedAP1=2
+ExpectedAP1Status=C?R?A?SY
+
+[StopConn1_1]
+ConnName=Conn1
+ConnStopType=EStopNormal
+
+[SetSimTsyUnavailable]
+AccessPointId=2
+AccessPointState=Unavailable
+
+[ReceiveNotification2A]
+NotificationName=NotifA
+WaitPeriod=5
+ExpectedNumberOfAPs=1
+ExpectedAP1=2
+ExpectedAP1Status=C?R?ANS?
+
+[ReceiveNotification2S]
+NotificationName=NotifS
+WaitPeriod=5
+ExpectedNumberOfAPs=1
+ExpectedAP1=2
+ExpectedAP1Status=C?R?A?SN
+
+[CancelAPNotifRequestA]
+ConnServName=ConnServA
+NotificationName=NotifA
+
+[CancelAPNotifRequestS]
+ConnServName=ConnServS
+NotificationName=NotifS
+
+[CloseConn1]
+ConnName=Conn1
+
+[CloseConnectionServA]
+ConnServName=ConnServA
+
+[CloseConnectionServS]
+ConnServName=ConnServS
+
+[CloseSockSvr1]
+SocketServName=SockSvr1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworkside_test29.ini	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,71 @@
+[SimTsy]
+TestSection=0
+
+[CreateSockSvr1]
+SocketServName=SockSvr1
+
+[ConnectSockSvr1]
+SocketServName=SockSvr1
+
+[CreateConn1]
+ConnName=Conn1
+
+[OpenConn1]
+ConnName=Conn1
+SocketServName=SockSvr1
+
+[CreateConnectionServ1]
+ConnServName=ConnServ1
+
+[ConnectConnectionServ1]
+ConnServName=ConnServ1
+TierName=LinkTier
+
+[SetSimTsyAvailable]
+AccessPointId=2
+AccessPointState=Available
+
+[APQuery1]
+ConnServName=ConnServ1
+QueryAPStatusFilter=C-R-A?S-
+QueryAPMatch0=2
+ExpectedNumberOfAPs=1
+ExpectedAP1=2
+ExpectedAP1Status=C?R?AYS?
+
+[SetSimTsyUnavailable]
+AccessPointId=2
+AccessPointState=Unavailable
+
+[APQuery1a]
+ConnServName=ConnServ1
+QueryAPStatusFilter=C-R-A?S?
+QueryAPMatch0=2
+ExpectedNumberOfAPs=1
+ExpectedAP1=2
+ExpectedAP1Status=C?R?ANSN
+
+[StartConn1_1]
+ConnName=Conn1
+SocketServName=SockSvr1
+IAP=2
+
+[APQuery2]
+ConnServName=ConnServ1
+QueryAPStatusFilter=C-R-A?SY
+ExpectedNumberOfAPs=1
+ExpectedAP1=2
+ExpectedAP1Status=C?R?AYSY
+
+[StopConn1_1]
+ConnName=Conn1
+ConnStopType=EStopNormal
+
+[CloseConn1]
+ConnName=Conn1
+
+[CloseConnectionServ1]
+ConnServName=ConnServ1
+
+[CloseSockSvr1]
+SocketServName=SockSvr1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/configs/te_controlplanenetworksideloopbackcsy.ini	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,29 @@
+# Defining a loopback between port A and B is as follows:
+# Port = <PortA>,<PortB>,<delay>,<queue size>,<element (packet) size>
+# Ports 501 to 522 are mapped to contexts on the default SIM
+# Ports 523 to 544 are mapped to contexts on SIM2
+#
+[Defaults]
+Port= 0,1,1,10,1500
+Port= 501,502,0,10,1500
+Port= 503,504,0,10,1500
+Port= 505,506,0,10,1500
+Port= 507,508,0,10,1500
+Port= 509,510,0,10,1500
+Port= 511,512,0,10,1500
+Port= 513,514,0,10,1500
+Port= 515,516,0,10,1500
+Port= 517,518,0,10,1500
+Port= 519,520,0,10,1500
+Port= 521,522,0,10,1500
+Port= 523,524,0,10,1500
+Port= 525,526,0,10,1500
+Port= 527,528,0,10,1500
+Port= 529,530,0,10,1500
+Port= 531,532,0,10,1500
+Port= 533,534,0,10,1500
+Port= 535,536,0,10,1500
+Port= 537,538,0,10,1500
+Port= 539,540,0,10,1500
+Port= 541,542,0,10,1500
+Port= 543,544,0,10,1500
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/group/BLD.INF	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,42 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Network-side events / errors SPUD testing
+// 
+//
+
+/**
+ @file
+*/
+
+PRJ_EXPORTS
+
+PRJ_TESTEXPORTS
+
+../configs/te_controlplanenetworkside1.xml                z:/testdata/configs/te_controlplanenetworkside1.xml
+../configs/te_controlplanenetworkside_config.txt          z:/testdata/configs/te_controlplanenetworkside_config.txt
+../configs/te_controlplanenetworkside_test28.ini          z:/testdata/configs/te_controlplanenetworkside_test28.ini
+../configs/te_controlplanenetworkside_test29.ini          z:/testdata/configs/te_controlplanenetworkside_test29.ini
+
+../configs/te_controlplanenetworksideloopbackcsy.ini      z:/testdata/configs/te_controlplanenetworksideloopbackcsy.ini
+
+
+../scripts/te_PDP-ControlPlane.script                     z:/testdata/scripts/te_PDP-ControlPlane.script
+../scripts/te_PDP-ControlPlane28.script                   z:/testdata/scripts/te_PDP-ControlPlane28.script
+../scripts/te_PDP-ControlPlane29.script                   z:/testdata/scripts/te_PDP-ControlPlane29.script
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/scripts/te_PDP-ControlPlane.script	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,43 @@
+//
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+PRINT Run Control Plane Networkside Tests.
+
+run_script z:\TestData\scripts\te_esock_test_unloadesockForced.script
+ced z:\TestData\Configs\te_controlplanenetworkside1.xml
+run_script z:\TestData\scripts\te_esock_test_loadesock.script
+
+RUN_UTILS  MkDir c:\simtsy\
+RUN_UTILS  MkDir c:\private\
+RUN_UTILS  MkDir c:\private\101F7989\
+RUN_UTILS  MkDir c:\private\101F7989\esock\
+RUN_UTILS  MakeReadWrite c:\simtsy\config.txt
+RUN_UTILS  MakeReadWrite c:\config.txt
+RUN_UTILS  MakeReadWrite c:\loopback.ini
+RUN_UTILS  DeleteFile c:\simtsy\config.txt
+RUN_UTILS  DeleteFile c:\config.txt
+RUN_UTILS  DeleteFile c:\loopback.ini
+RUN_UTILS  CopyFile z:\TestData\Configs\te_controlplanenetworkside_config.txt c:\simtsy\config.txt
+RUN_UTILS  CopyFile z:\TestData\Configs\te_controlplanenetworkside_config.txt c:\config.txt
+RUN_UTILS  CopyFile z:\TestData\Configs\te_controlplanenetworksideloopbackcsy.ini c:\loopback.ini 
+
+LOAD_SUITE te_esockteststepsSuite -SharedData
+
+RUN_SCRIPT Z:\TestData\Scripts\te_PDP-ControlPlane28.script
+RUN_SCRIPT Z:\TestData\Scripts\te_PDP-ControlPlane29.script
+
+PRINT Complete_te_controlplanenetworkside tests
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/scripts/te_PDP-ControlPlane28.script	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,86 @@
+//
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+PRINT Running CASE28
+PRINT Validating notifications on the PDP tier
+
+//
+LOAD_SUITE te_esockteststepsSuite -SharedData
+RUN_SCRIPT z:\TestData\scripts\te_esock_test_loadesock.script
+
+START_TESTCASE			PDP-ControlPlane-0028
+//! @SYMTestCaseID		PDP-ControlPlane-0028
+//! @SYMTestCaseDesc  Validating notifications on the PDP tier
+//! @SYMPREQ 2624
+//! @SYMTestActions         Creating server connection to PDP tier, opening connections on SIM1/SIM2. 
+//! @SYMTestExpectedResults Validating that notifications are received when a connection is opened on SIM1/SIM2
+//! @SYMTestPriority High
+//! @SYMTestStatus Under development
+//! @SYMTestType UT
+
+// start simtsy
+RUN_TEST_STEP 100 te_esockteststepsSuite StartSimTSYStep  z:\testdata\configs\te_controlplanenetworkside_test28.ini SimTsy
+
+// create and open the first connection
+RUN_TEST_STEP 100 te_esockteststepsSuite creatersocketservStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CreateSockSvr1
+RUN_TEST_STEP 100 te_esockteststepsSuite connectrsocketservStep z:\testdata\configs\te_controlplanenetworkside_test28.ini ConnectSockSvr1
+RUN_TEST_STEP 100 te_esockteststepsSuite createrconnectionStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CreateConn1
+RUN_TEST_STEP 100 te_esockteststepsSuite openrconnectionStep z:\testdata\configs\te_controlplanenetworkside_test28.ini OpenConn1
+
+// Connect at *link* tier
+RUN_TEST_STEP 100 te_esockteststepsSuite CreateRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CreateConnectionServA
+RUN_TEST_STEP 100 te_esockteststepsSuite ConnectRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test28.ini ConnectConnectionServA
+RUN_TEST_STEP 100 te_esockteststepsSuite CreateRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CreateConnectionServS
+RUN_TEST_STEP 100 te_esockteststepsSuite ConnectRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test28.ini ConnectConnectionServS
+
+// Request all changes to AP active status
+RUN_TEST_STEP 100 te_esockteststepsSuite RequestAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini APNotificationRequest1A
+RUN_TEST_STEP 100 te_esockteststepsSuite RequestAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini APNotificationRequest1S
+
+// Start connection on bearer and detect change at AP
+RUN_TEST_STEP 100 te_esockteststepsSuite startrconnectionStep z:\testdata\configs\te_controlplanenetworkside_test28.ini StartConn1_1
+RUN_TEST_STEP 100 te_esockteststepsSuite ReceiveAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini ReceiveNotification1A
+RUN_TEST_STEP 100 te_esockteststepsSuite ReceiveAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini ReceiveNotification1S
+
+// Stop connection and detect change at AP
+RUN_TEST_STEP 100 te_esockteststepsSuite stoprconnectionStep z:\testdata\configs\te_controlplanenetworkside_test28.ini StopConn1_1
+RUN_TEST_STEP 100 te_esockteststepsSuite SetPacketDataAccessPointAvailabilityStep z:\testdata\configs\te_controlplanenetworkside_test29.ini SetSimTsyUnavailable
+RUN_TEST_STEP 100 te_esockteststepsSuite ReceiveAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini ReceiveNotification2A
+RUN_TEST_STEP 100 te_esockteststepsSuite ReceiveAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini ReceiveNotification2S
+
+
+// Cancel the notification request
+RUN_TEST_STEP 100 te_esockteststepsSuite CancelAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CancelAPNotifRequestA
+RUN_TEST_STEP 100 te_esockteststepsSuite CancelAccessPointNotificationStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CancelAPNotifRequestS
+
+// Clean up connections
+RUN_TEST_STEP 100 te_esockteststepsSuite closerconnectionStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CloseConn1
+
+// Close and cleanup resources
+RUN_TEST_STEP 100 te_esockteststepsSuite CloseRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CloseConnectionServA
+RUN_TEST_STEP 100 te_esockteststepsSuite CloseRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CloseConnectionServS
+RUN_TEST_STEP 100 te_esockteststepsSuite closersocketservStep z:\testdata\configs\te_controlplanenetworkside_test28.ini CloseSockSvr1
+RUN_TEST_STEP 100 te_esockteststepsSuite cleanallStep
+
+// stop simtsy
+RUN_TEST_STEP 100 te_esockteststepsSuite StopSimTSYStep z:\testdata\configs\te_controlplanenetworkside_test28.ini SimTsy
+
+// Shutdown
+RUN_SCRIPT Z:\TestData\Scripts\te_esock_test_stopallinterfaces.script
+RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script
+
+END_TESTCASE			PDP-ControlPlane-0028
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyprotocols/pdplayer/test/controlplane/scripts/te_PDP-ControlPlane29.script	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,90 @@
+//
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+PRINT Running CASE29
+PRINT Validating AP Queries on the PDP tier.
+
+//
+LOAD_SUITE te_esockteststepsSuite -SharedData
+RUN_SCRIPT z:\TestData\scripts\te_esock_test_loadesock.script
+
+START_TESTCASE			PDP-ControlPlane-0029
+//! @SYMTestCaseID		PDP-ControlPlane-0029
+//! @SYMTestCaseDesc  Validating AP Queries on the PDP tier.
+//! @SYMPREQ 2624
+//! @SYMTestActions         Creating server connection, opening connections on SIM1/SIM2 validating AP Query for PDP Tier.
+//! @SYMTestExpectedResults AP Queries successful.
+//! @SYMTestPriority High
+//! @SYMTestStatus Under development
+//! @SYMTestType UT
+
+// start simtsy
+RUN_TEST_STEP 100 te_esockteststepsSuite StartSimTSYStep  z:\testdata\configs\te_controlplanenetworkside_test29.ini SimTsy
+
+// create and open the first connection
+RUN_TEST_STEP 100 te_esockteststepsSuite creatersocketservStep z:\testdata\configs\te_controlplanenetworkside_test29.ini CreateSockSvr1
+RUN_TEST_STEP 100 te_esockteststepsSuite connectrsocketservStep z:\testdata\configs\te_controlplanenetworkside_test29.ini ConnectSockSvr1
+RUN_TEST_STEP 100 te_esockteststepsSuite createrconnectionStep z:\testdata\configs\te_controlplanenetworkside_test29.ini CreateConn1
+RUN_TEST_STEP 100 te_esockteststepsSuite openrconnectionStep z:\testdata\configs\te_controlplanenetworkside_test29.ini OpenConn1
+
+// Connect at *link* tier
+RUN_TEST_STEP 100 te_esockteststepsSuite CreateRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test29.ini CreateConnectionServ1
+RUN_TEST_STEP 100 te_esockteststepsSuite ConnectRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test29.ini ConnectConnectionServ1
+
+// Make first *link* AP unavailable *AP2*
+RUN_TEST_STEP 100 te_esockteststepsSuite SetPacketDataAccessPointAvailabilityStep z:\testdata\configs\te_controlplanenetworkside_test29.ini SetSimTsyAvailable
+
+RUN_TEST_STEP 100 te_esockteststepsSuite AccessPointStatusQueryStep z:\testdata\configs\te_controlplanenetworkside_test29.ini APQuery1
+
+// Make first *link* AP available *AP2*
+RUN_TEST_STEP 100 te_esockteststepsSuite SetPacketDataAccessPointAvailabilityStep z:\testdata\configs\te_controlplanenetworkside_test29.ini SetSimTsyUnavailable
+
+RUN_TEST_STEP 100 te_esockteststepsSuite AccessPointStatusQueryStep z:\testdata\configs\te_controlplanenetworkside_test29.ini APQuery1a
+
+// Start connection on bearer and detect change at AP
+RUN_TEST_STEP 100 te_esockteststepsSuite startrconnectionStep z:\testdata\configs\te_controlplanenetworkside_test29.ini StartConn1_1
+// This will tell us the number of started APs (1) and its id.
+RUN_TEST_STEP 100 te_esockteststepsSuite AccessPointStatusQueryStep z:\testdata\configs\te_controlplanenetworkside_test29.ini APQuery2
+
+// Clean up connections
+
+RUN_TEST_STEP 100 te_esockteststepsSuite stoprconnectionStep z:\testdata\configs\te_controlplanenetworkside_test29.ini StopConn1_1
+RUN_TEST_STEP 100 te_esockteststepsSuite SetPacketDataAccessPointAvailabilityStep z:\testdata\configs\te_controlplanenetworkside_test29.ini SetSimTsyUnavailable
+
+RUN_TEST_STEP 100 te_esockteststepsSuite AccessPointStatusQueryStep z:\testdata\configs\te_controlplanenetworkside_test29.ini APQuery1a
+
+RUN_TEST_STEP 100 te_esockteststepsSuite closerconnectionStep z:\testdata\configs\te_controlplanenetworkside_test29.ini CloseConn1
+
+// Close and cleanup resources
+RUN_TEST_STEP 100 te_esockteststepsSuite CloseRConnectionServStep z:\testdata\configs\te_controlplanenetworkside_test29.ini CloseConnectionServ1
+RUN_TEST_STEP 100 te_esockteststepsSuite closersocketservStep z:\testdata\configs\te_controlplanenetworkside_test29.ini CloseSockSvr1
+RUN_TEST_STEP 100 te_esockteststepsSuite cleanallStep
+
+// stop simtsy
+RUN_TEST_STEP 100 te_esockteststepsSuite StopSimTSYStep z:\testdata\configs\te_controlplanenetworkside_test29.ini SimTsy
+
+// Shutdown
+RUN_SCRIPT Z:\TestData\Scripts\te_esock_test_stopallinterfaces.script
+RUN_SCRIPT Z:\TestData\scripts\te_esock_test_unloadesockForced.script
+
+END_TESTCASE			PDP-ControlPlane-0029
+
+
+
+
+
+
--- a/telephonyprotocols/pdplayer/umts/spudfsm/src/cpdpfsmfactory.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/spudfsm/src/cpdpfsmfactory.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -100,7 +100,12 @@
 void CPdpFsmFactory::Close (void)
     {
 	SPUDFSMVERBOSE_FNLOG("CPdpFsmFactory::Close()");
-	iEtelDriverInput->Close();
+	// in OOM conditions iEtelDriveInput may not have successfully
+	// been created, check here for safety.
+	if (iEtelDriverInput != NULL)
+	    {
+        iEtelDriverInput->Close();
+	    }
     }
 
 
--- a/telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/spudtel/src/ceteldriverfactory.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -205,12 +205,14 @@
 	{
 
 	SPUDTELVERBOSE_INFO_LOG1(_L("Free pdp id : %d"), aPdpId);
-	// the context has to be closed before a call to FreePdp
-	__ASSERT_ALWAYS(!Context(aPdpId).PacketContext().SubSessionHandle(), User::Panic(KTxtSpudTel, KErrInUse));
-	
-	delete iContexts[aPdpId];
-	iContexts[aPdpId] = NULL;
-
+    // In an OOM situation, this object may be cleaned up prior to establishment. 
+    if (iContexts[aPdpId] != NULL) 
+        { 
+        // the context has to be closed before a call to FreePdp 
+        __ASSERT_ALWAYS(!Context(aPdpId).PacketContext().SubSessionHandle(), User::Panic(KTxtSpudTel, KErrInUse)); 
+        delete iContexts[aPdpId];
+        iContexts[aPdpId] = NULL;
+        } 
 	}
 
 
--- a/telephonyprotocols/pdplayer/umts/spudtel/src/eteldriverstrategies.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/spudtel/src/eteldriverstrategies.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -1122,7 +1122,7 @@
                         {
                         if (errTsy == KErrNone)
                         	{
-                        	err = KErrNone;
+                        	err = KErrCompletion;
                         	}
                         else if ((errTsy & 0xFFFF0000) != 0xFFFF0000)
                             {
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_SpudNetworkSide.xml	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_SpudNetworkSide.xml	Fri Mar 19 09:55:57 2010 +0200
@@ -130,6 +130,14 @@
         <IAPNetworkWeighting>0</IAPNetworkWeighting>
         <LocationRef>Location.Mobile</LocationRef>
     </IAP>
+    <IAP operation="add">
+        <Name>IAP_GRPS_BAD_QOS</Name>
+        <IAPService>OutgoingGPRS.GPRS_BAD_QOS</IAPService>
+        <IAPBearer>ModemBearer.Loopback_SPUD_2</IAPBearer>
+        <IAPNetwork>Network.Intranet</IAPNetwork>
+        <IAPNetworkWeighting>0</IAPNetworkWeighting>
+        <LocationRef>Location.Mobile</LocationRef>
+    </IAP>
 </IAPTable>
 
 
@@ -417,6 +425,16 @@
         <IpDNSAddrFromServer>TRUE</IpDNSAddrFromServer>  
         <IpAddr>192.168.1.13</IpAddr>
     </OutgoingGPRS>
+    <OutgoingGPRS operation="add">
+        <Name>GPRS_BAD_QOS</Name>
+      	<PDPType>IPV4</PDPType>
+        <IfParams>lowernif=RAWIP</IfParams>
+        <IfPromptForAuth>FALSE</IfPromptForAuth>
+        <IpAddrFromServer>TRUE</IpAddrFromServer>
+        <IpDNSAddrFromServer>TRUE</IpDNSAddrFromServer>  
+        <IpAddr>192.168.1.2</IpAddr>
+        <UmtsR99QoSAndOnRef>UmtsR99QoSAndOn.BAD_QOS</UmtsR99QoSAndOnRef>       
+    </OutgoingGPRS>
 </OutgoingGPRSTable>
 
 <DefaultGPRSTable>
@@ -611,6 +629,36 @@
 		<IMCNSignallingIndication>FALSE</IMCNSignallingIndication>
 		<SourceStatisticsDescriptor>0</SourceStatisticsDescriptor>
 	</UmtsR99QoSAndOn>
+	
+	<UmtsR99QoSAndOn operation ="add">
+	  	<Name>BAD_QOS</Name>		
+		<MinTrafficClass>1</MinTrafficClass>
+		<ReqDeliveryOrder>1</ReqDeliveryOrder>
+		<MinDeliveryOrder>1</MinDeliveryOrder>
+		<ReqDeliverErroneousSDU>1</ReqDeliverErroneousSDU>
+		<MinDeliverErroneousSDU>1</MinDeliverErroneousSDU>
+		<ReqMaxSDUSize>0</ReqMaxSDUSize>
+		<MinAcceptableMaxSDUSize>0</MinAcceptableMaxSDUSize>
+		<ReqMaxUplinkRate>0</ReqMaxUplinkRate>
+		<ReqMinUplinkRate>0</ReqMinUplinkRate>
+		<ReqMaxDownlinkRate>0</ReqMaxDownlinkRate>
+		<ReqMinDownlinkRate>0</ReqMinDownlinkRate>
+		<ReqBER>1</ReqBER>
+		<MaxBER>1</MaxBER>
+		<ReqSDUErrorRatio>1</ReqSDUErrorRatio>
+		<MaxSDUErrorRatio>1</MaxSDUErrorRatio>
+		<ReqTrafficHandlingPriority>1</ReqTrafficHandlingPriority>
+		<MinTrafficHandlingPriority>1</MinTrafficHandlingPriority>
+		<ReqTransferDelay>0</ReqTransferDelay>
+		<MaxTransferDelay>0</MaxTransferDelay>
+		<ReqGuaranteedUplinkRate>0</ReqGuaranteedUplinkRate>
+		<MinGuaranteedUplinkRat>0</MinGuaranteedUplinkRat>
+		<ReqGuaranteedDownlinkRate>0</ReqGuaranteedDownlinkRate>
+		<MinGuaranteedDownlinkRate>0</MinGuaranteedDownlinkRate>
+		<SignallingIndication>FALSE</SignallingIndication>
+		<IMCNSignallingIndication>FALSE</IMCNSignallingIndication>
+		<SourceStatisticsDescriptor>0</SourceStatisticsDescriptor>
+	</UmtsR99QoSAndOn>
 
 </UmtsR99QoSAndOnTable>
 <BTDeviceTable>
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide.ini	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide.ini	Fri Mar 19 09:55:57 2010 +0200
@@ -410,3 +410,31 @@
 ParametersType = UmtsR99QoSAndOnTableRecord
 ParametersRecordId = 2
 PolicySelector = 1
+
+[PrimaryActivationEndUpWithInactiveContext]
+SimTsyTestNum = 103
+PrimaryIapId1 = 2
+PrimaryActivationErr1 = -17
+
+[PrimaryActivationEndUpWithInactiveContext2]
+SimTsyTestNum = 104
+PrimaryIapId1 = 2
+PrimaryActivationErr1 = -2
+
+[PrimaryActivationEndUpWithInactiveContext3]
+SimTsyTestNum = 105
+PrimaryIapId1 = 2
+PrimaryActivationErr1 = -65536
+
+[PrimaryActivationEndUpWithInactiveContext4]
+SimTsyTestNum = 106
+PrimaryIapId1 = 2
+PrimaryActivationErr1 = -17
+
+[PrimaryActivationFails20]
+SimTsyTestNum = 1
+PrimaryIapId1 = 10
+PrimaryActivationErr1 = -20
+SubConnectionCount1 = 0
+SubConnectionCount2 = 2
+PolicySelector = 1
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide_config_9x.txt	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/configs/te_spudNetworkSide_config_9x.txt	Fri Mar 19 09:55:57 2010 +0200
@@ -2566,3 +2566,297 @@
 NotifyContextStatusChange = SECONDARY1, 0, 5
 NotifyContextStatusChange = SECONDARY1, 0, 3
 
+
+############################################################################
+############################################################################
+###################              T E S T 103	        ####################
+############################################################################
+############################################################################
+# Test case for the case when context becomes inactive during activation and the error returned to PDP is KErrNone. This will be translated to 
+
+KErrCompletion
+############################################################################
+[test103]
+# DefaultContextparamGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+DefaultContextparamGPRS= 3, SYMBIAN EMPLOYEE INTRANET, A WAP PORTAL, 2, 1, 1, 1, USER2, PASSWORD2, NULL, NULL, PRIMARYSERVER2, SECONDARYSERVER2, 
+
+2
+
+# ContextConfigGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+SetContextConfigGPRS = 0,Test,,0,2,0,1,RasUser,,,,,,1
+# TRel99ContextConfig = <TName iContextName>,  <TUint iActivatePause>, <TUint iActivateErrorCode>, <TUint iDeactivatePause>, 
+# <TUint iDeactivateErrorCode>, <TUint iDeletionPause>, <TUint iDeletionErrorCode> <TBool iConnectToNtRas>
+R99ContextConfig = PRIMARY1, 0, -600, 0, 0, 0, 0, 0
+
+
+# TFTfilter = 0<id> 1<evaluationPrecedenceIndex> 2<srcAddr> 3<srcAddrSubnetMask>  4<protocolNumberOrNextHeader>
+#	      5<srcPortMin> 6<srcPortMax> 7<destPortMin> 8<destPortMax> 9<ipSecSPI> 10<toSorTrafficClass>
+#	      11<flowLabel>
+TFTfilter = 1, 96, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 
+
+1031, 1031, 0, 0, 0
+TFTfilter = 1, 0, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+TFTfilter = 1, 1, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+
+#TProfileReqR99 = 0<contextName> 1<reqTraffic> 2<minTraffic> 3<reqDeliveryOrder> 4<minDeliveryOrder>
+#		  5<reqErroneousSDU> 6<minErroneousSDU> 7<maxSDUSize> 8<minSDUSize>
+#		 9<reqUpLinkBitRate> 10<reqDownLinkBitRate> 11<minUpLinkBitRate> 12<minDownLinkBitRate> 
+#		 
+#		 13<reqBitErrorRatio> 14<minBitErrorRatio> 15<reqSDUErrorRatio> 16<minSDUErrorRatio>
+#		 17<reqTrafficHandlingPriority> 18<minTrafficHandlingPriority>
+#		 19<reqTransferDelay> 20<minTransferDelay> 21<reqGuaranteedUpLinkBitRate> 22<reqGuaranteedDownLinkBitRate>
+#		 23<minGuaranteedUpLinkBitRate> 24<minGuaranteedDownLinkBitRate>
+QosProfileReqR99 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0
+
+QosProfileReqR5 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
+
+
+
+#TProfileNegR99 =<contextName> <duration> <negTraffic> <negDeliveryOrder> <negErroneousSDUDelivery> <negMaxSDUSize>
+#		 <negBitErrorRatio> <negSDUErrorRatio> <negTrafficHandlingPriority>
+#		 <negTransferDelay> <negGuaranteedUpLinkBitRate> <negGuaranteedDownLinkBitRate>
+#		 <negMaxUpLinkRate> <negMaxDownLinkRate> 
+QosProfileNegR99 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+
+QosProfileNegR5 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+
+# CommSetup = <CsyName> <portName> <datarate> <handshake> <contextName> 
+CommSetup= PKTLOOPBACK.CSY, PKTLOOPBACK::502, 18, 0, PRIMARY1
+
+
+############################################################################
+# failure events
+# Configure the context's status to be changed using publish and subscribe
+NotifyContextStatusChangeType = PublishSubscribe
+# NotifyContextStatusChange <iContextName>, <iDuration>, <iStatus>
+
+# EStatusDeactivating = 4 EStatusInactive = 1 EStatusDeleted = 6
+
+############################################################################
+############################################################################
+###################              T E S T 104	        ####################
+############################################################################
+############################################################################
+# Test case for the case when context becomes inactive during activation and the error returned to PDP is KErrGeneral
+############################################################################
+[test104]
+# DefaultContextparamGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+DefaultContextparamGPRS= 3, SYMBIAN EMPLOYEE INTRANET, A WAP PORTAL, 2, 1, 1, 1, USER2, PASSWORD2, NULL, NULL, PRIMARYSERVER2, SECONDARYSERVER2, 
+
+2
+
+# ContextConfigGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+SetContextConfigGPRS = 0,Test,,0,2,0,1,RasUser,,,,,,1
+# TRel99ContextConfig = <TName iContextName>,  <TUint iActivatePause>, <TUint iActivateErrorCode>, <TUint iDeactivatePause>, 
+# <TUint iDeactivateErrorCode>, <TUint iDeletionPause>, <TUint iDeletionErrorCode> <TBool iConnectToNtRas>
+R99ContextConfig = PRIMARY1, 0, -602, 0, 0, 0, 0, 0
+
+
+# TFTfilter = 0<id> 1<evaluationPrecedenceIndex> 2<srcAddr> 3<srcAddrSubnetMask>  4<protocolNumberOrNextHeader>
+#	      5<srcPortMin> 6<srcPortMax> 7<destPortMin> 8<destPortMax> 9<ipSecSPI> 10<toSorTrafficClass>
+#	      11<flowLabel>
+TFTfilter = 1, 96, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 
+
+1031, 1031, 0, 0, 0
+TFTfilter = 1, 0, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+TFTfilter = 1, 1, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+
+#TProfileReqR99 = 0<contextName> 1<reqTraffic> 2<minTraffic> 3<reqDeliveryOrder> 4<minDeliveryOrder>
+#		  5<reqErroneousSDU> 6<minErroneousSDU> 7<maxSDUSize> 8<minSDUSize>
+#		 9<reqUpLinkBitRate> 10<reqDownLinkBitRate> 11<minUpLinkBitRate> 12<minDownLinkBitRate> 
+#		 
+#		 13<reqBitErrorRatio> 14<minBitErrorRatio> 15<reqSDUErrorRatio> 16<minSDUErrorRatio>
+#		 17<reqTrafficHandlingPriority> 18<minTrafficHandlingPriority>
+#		 19<reqTransferDelay> 20<minTransferDelay> 21<reqGuaranteedUpLinkBitRate> 22<reqGuaranteedDownLinkBitRate>
+#		 23<minGuaranteedUpLinkBitRate> 24<minGuaranteedDownLinkBitRate>
+QosProfileReqR99 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0
+
+QosProfileReqR5 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
+
+
+
+#TProfileNegR99 =<contextName> <duration> <negTraffic> <negDeliveryOrder> <negErroneousSDUDelivery> <negMaxSDUSize>
+#		 <negBitErrorRatio> <negSDUErrorRatio> <negTrafficHandlingPriority>
+#		 <negTransferDelay> <negGuaranteedUpLinkBitRate> <negGuaranteedDownLinkBitRate>
+#		 <negMaxUpLinkRate> <negMaxDownLinkRate> 
+QosProfileNegR99 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+
+QosProfileNegR5 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+
+# CommSetup = <CsyName> <portName> <datarate> <handshake> <contextName> 
+CommSetup= PKTLOOPBACK.CSY, PKTLOOPBACK::502, 18, 0, PRIMARY1
+
+
+############################################################################
+# failure events
+# Configure the context's status to be changed using publish and subscribe
+NotifyContextStatusChangeType = PublishSubscribe
+# NotifyContextStatusChange <iContextName>, <iDuration>, <iStatus>
+
+# EStatusDeactivating = 4 EStatusInactive = 1 EStatusDeleted = 6
+
+############################################################################
+############################################################################
+###################              T E S T 105	        ####################
+############################################################################
+############################################################################
+# Test case for the case when context becomes inactive during activation and the error returned to PDP is tsy extended error code.
+############################################################################
+[test105]
+# DefaultContextparamGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+DefaultContextparamGPRS= 3, SYMBIAN EMPLOYEE INTRANET, A WAP PORTAL, 2, 1, 1, 1, USER2, PASSWORD2, NULL, NULL, PRIMARYSERVER2, SECONDARYSERVER2, 
+
+2
+
+# ContextConfigGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+SetContextConfigGPRS = 0,Test,,0,2,0,1,RasUser,,,,,,1
+# TRel99ContextConfig = <TName iContextName>,  <TUint iActivatePause>, <TUint iActivateErrorCode>, <TUint iDeactivatePause>, 
+# <TUint iDeactivateErrorCode>, <TUint iDeletionPause>, <TUint iDeletionErrorCode> <TBool iConnectToNtRas>
+R99ContextConfig = PRIMARY1, 0, -401, 0, 0, 0, 0, 0
+
+
+# TFTfilter = 0<id> 1<evaluationPrecedenceIndex> 2<srcAddr> 3<srcAddrSubnetMask>  4<protocolNumberOrNextHeader>
+#	      5<srcPortMin> 6<srcPortMax> 7<destPortMin> 8<destPortMax> 9<ipSecSPI> 10<toSorTrafficClass>
+#	      11<flowLabel>
+TFTfilter = 1, 96, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 
+
+1031, 1031, 0, 0, 0
+TFTfilter = 1, 0, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+TFTfilter = 1, 1, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+
+#TProfileReqR99 = 0<contextName> 1<reqTraffic> 2<minTraffic> 3<reqDeliveryOrder> 4<minDeliveryOrder>
+#		  5<reqErroneousSDU> 6<minErroneousSDU> 7<maxSDUSize> 8<minSDUSize>
+#		 9<reqUpLinkBitRate> 10<reqDownLinkBitRate> 11<minUpLinkBitRate> 12<minDownLinkBitRate> 
+#		 
+#		 13<reqBitErrorRatio> 14<minBitErrorRatio> 15<reqSDUErrorRatio> 16<minSDUErrorRatio>
+#		 17<reqTrafficHandlingPriority> 18<minTrafficHandlingPriority>
+#		 19<reqTransferDelay> 20<minTransferDelay> 21<reqGuaranteedUpLinkBitRate> 22<reqGuaranteedDownLinkBitRate>
+#		 23<minGuaranteedUpLinkBitRate> 24<minGuaranteedDownLinkBitRate>
+QosProfileReqR99 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0
+
+QosProfileReqR5 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
+
+
+
+#TProfileNegR99 =<contextName> <duration> <negTraffic> <negDeliveryOrder> <negErroneousSDUDelivery> <negMaxSDUSize>
+#		 <negBitErrorRatio> <negSDUErrorRatio> <negTrafficHandlingPriority>
+#		 <negTransferDelay> <negGuaranteedUpLinkBitRate> <negGuaranteedDownLinkBitRate>
+#		 <negMaxUpLinkRate> <negMaxDownLinkRate> 
+QosProfileNegR99 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+
+QosProfileNegR5 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+
+# CommSetup = <CsyName> <portName> <datarate> <handshake> <contextName> 
+CommSetup= PKTLOOPBACK.CSY, PKTLOOPBACK::502, 18, 0, PRIMARY1
+
+
+############################################################################
+# failure events
+# Configure the context's status to be changed using publish and subscribe
+NotifyContextStatusChangeType = PublishSubscribe
+# NotifyContextStatusChange <iContextName>, <iDuration>, <iStatus>
+
+# EStatusDeactivating = 4 EStatusInactive = 1 EStatusDeleted = 6
+
+############################################################################
+############################################################################
+###################              T E S T 106	        ####################
+############################################################################
+############################################################################
+# Test case for the case when context becomes inactive during activation and get last error function returns an error.
+############################################################################
+[test106]
+# DefaultContextparamGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+DefaultContextparamGPRS= 3, SYMBIAN EMPLOYEE INTRANET, A WAP PORTAL, 2, 1, 1, 1, USER2, PASSWORD2, NULL, NULL, PRIMARYSERVER2, SECONDARYSERVER2, 
+
+2
+
+# ContextConfigGPRS = <TProtocolType>, <TGSNAddress>, <TProtocolAddress>, <PdpDataCompression>, <TAnonymousAccess>, <TUseEdge>
+# ProtocolConfigOption = <Authentication Protocol>, <Username>, <Password>, <Challenge>, 
+# <Response>, <PrimaryDNS>, <SecondaryDNS>, <TUint iId>
+SetContextConfigGPRS = 0,Test,,0,2,0,1,RasUser,,,,,,1
+# TRel99ContextConfig = <TName iContextName>,  <TUint iActivatePause>, <TUint iActivateErrorCode>, <TUint iDeactivatePause>, 
+# <TUint iDeactivateErrorCode>, <TUint iDeletionPause>, <TUint iDeletionErrorCode> <TBool iConnectToNtRas>
+R99ContextConfig = PRIMARY1, 0, -300, 0, 0, 0, 0, 0
+
+
+# TFTfilter = 0<id> 1<evaluationPrecedenceIndex> 2<srcAddr> 3<srcAddrSubnetMask>  4<protocolNumberOrNextHeader>
+#	      5<srcPortMin> 6<srcPortMax> 7<destPortMin> 8<destPortMax> 9<ipSecSPI> 10<toSorTrafficClass>
+#	      11<flowLabel>
+TFTfilter = 1, 96, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 
+
+1031, 1031, 0, 0, 0
+TFTfilter = 1, 0, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+TFTfilter = 1, 1, 0.0.0.0.0.0.0.0.0.0.255.255.192.168.1.1, 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255, 17, 3461, 3461, 1031, 
+
+1031, 0, 0, 0
+
+#TProfileReqR99 = 0<contextName> 1<reqTraffic> 2<minTraffic> 3<reqDeliveryOrder> 4<minDeliveryOrder>
+#		  5<reqErroneousSDU> 6<minErroneousSDU> 7<maxSDUSize> 8<minSDUSize>
+#		 9<reqUpLinkBitRate> 10<reqDownLinkBitRate> 11<minUpLinkBitRate> 12<minDownLinkBitRate> 
+#		 
+#		 13<reqBitErrorRatio> 14<minBitErrorRatio> 15<reqSDUErrorRatio> 16<minSDUErrorRatio>
+#		 17<reqTrafficHandlingPriority> 18<minTrafficHandlingPriority>
+#		 19<reqTransferDelay> 20<minTransferDelay> 21<reqGuaranteedUpLinkBitRate> 22<reqGuaranteedDownLinkBitRate>
+#		 23<minGuaranteedUpLinkBitRate> 24<minGuaranteedDownLinkBitRate>
+QosProfileReqR99 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0
+
+QosProfileReqR5 = PRIMARY1,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0, 0, 0, 0, 0, 0, 0, 0
+
+
+
+#TProfileNegR99 =<contextName> <duration> <negTraffic> <negDeliveryOrder> <negErroneousSDUDelivery> <negMaxSDUSize>
+#		 <negBitErrorRatio> <negSDUErrorRatio> <negTrafficHandlingPriority>
+#		 <negTransferDelay> <negGuaranteedUpLinkBitRate> <negGuaranteedDownLinkBitRate>
+#		 <negMaxUpLinkRate> <negMaxDownLinkRate> 
+QosProfileNegR99 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3
+QosProfileNegR99 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4
+
+QosProfileNegR5 = PRIMARY1, 0x03, 0x01, 0x03, 0x01, 1, 0x03, 0x01, 0x03, 1, 1, 3, 1, 3, 0, 0
+QosProfileNegR5 = PRIMARY1, 0x04, 0x02, 0x04, 0x02, 2, 0x04, 0x02, 0x04, 2, 2, 4, 2, 4, 0, 0
+
+# CommSetup = <CsyName> <portName> <datarate> <handshake> <contextName> 
+CommSetup= PKTLOOPBACK.CSY, PKTLOOPBACK::502, 18, 0, PRIMARY1
+
+
+############################################################################
+# failure events
+# Configure the context's status to be changed using publish and subscribe
+NotifyContextStatusChangeType = PublishSubscribe
+# NotifyContextStatusChange <iContextName>, <iDuration>, <iStatus>
+
+# EStatusDeactivating = 4 EStatusInactive = 1 EStatusDeleted = 6
\ No newline at end of file
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/scripts/TE_spudNetworkSide.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/scripts/TE_spudNetworkSide.script	Fri Mar 19 09:55:57 2010 +0200
@@ -481,7 +481,95 @@
 END_TESTCASE            NET-Spud-NetworkSide-0825
 
 run_script z:\TestData\scripts\te_esock_test_unloadesockForced.script
+run_script z:\TestData\scripts\te_esock_test_loadesock.script
 
+// Unusual cases tests. This happens if TSY acting wrong.
+
+START_TESTCASE          NET-Spud-NetworkSide-0826
+//! @SYMTestCaseID      NET-Spud-NetworkSide-0826
+//! @SYMTestCaseDesc Sanity check: Primary context activation ends up with inactive context.
+//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
+//! @SYMTestActions Activate a primary PDP context, simtsy is set up to make context activation end up with an inactive context but return error code = KErrNone. SpudTel should treat this situation accordingly and return KErrCompletion.
+//! @SYMTestExpectedResults  Primary context activation should return KErrCompletion.
+//! @SYMTestPriority Normal
+//! @SYMTestStatus Implemented
+//! @SYMTestType CIT
+RUN_TEST_STEP 60 TE_SpudNetworkSide CSpudPrimary z:\testdata\configs\te_spudNetworkSide.ini PrimaryActivationEndUpWithInactiveContext
+DELAY 3000
+RUN_TEST_STEP 60 TE_SpudNetworkSide CESockCheck z:\testdata\configs\te_spudNetworkSide.ini ESockCheck
+END_TESTCASE            NET-Spud-NetworkSide-0826
+
+run_script z:\TestData\scripts\te_esock_test_unloadesockForced.script
+run_script z:\TestData\scripts\te_esock_test_loadesock.script
+
+START_TESTCASE          NET-Spud-NetworkSide-0827
+//! @SYMTestCaseID      NET-Spud-NetworkSide-0827
+//! @SYMTestCaseDesc  Sanity check: Primary context activation ends up with inactive context.
+//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
+//! @SYMTestActions Activate a primary PDP context, simtsy is set up to make context activation end up with an inactive context but return error code = KErrGeneral. SpudTel should treat this situation accordingly and return KErrGeneral.
+//! @SYMTestExpectedResults  Primary context activation should return KErrGeneral.
+//! @SYMTestPriority Normal
+//! @SYMTestStatus Implemented
+//! @SYMTestType CIT
+RUN_TEST_STEP 60 TE_SpudNetworkSide CSpudPrimary z:\testdata\configs\te_spudNetworkSide.ini PrimaryActivationEndUpWithInactiveContext2
+DELAY 3000
+RUN_TEST_STEP 60 TE_SpudNetworkSide CESockCheck z:\testdata\configs\te_spudNetworkSide.ini ESockCheck
+END_TESTCASE            NET-Spud-NetworkSide-0827
+
+run_script z:\TestData\scripts\te_esock_test_unloadesockForced.script
+run_script z:\TestData\scripts\te_esock_test_loadesock.script
+
+START_TESTCASE          NET-Spud-NetworkSide-0828
+//! @SYMTestCaseID      NET-Spud-NetworkSide-0828
+//! @SYMTestCaseDesc  Sanity check: Primary context activation ends up with inactive context.
+//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
+//! @SYMTestActions Activate a primary PDP context, simtsy is set up to make context activation end up with an inactive context but return an extended error code. SpudTel should treat this situation accordingly and return that extended error code.
+//! @SYMTestExpectedResults  Primary context activation should return -65536.
+//! @SYMTestPriority Normal
+//! @SYMTestStatus Implemented
+//! @SYMTestType CIT
+RUN_TEST_STEP 60 TE_SpudNetworkSide CSpudPrimary z:\testdata\configs\te_spudNetworkSide.ini PrimaryActivationEndUpWithInactiveContext3
+DELAY 3000
+RUN_TEST_STEP 60 TE_SpudNetworkSide CESockCheck z:\testdata\configs\te_spudNetworkSide.ini ESockCheck
+END_TESTCASE            NET-Spud-NetworkSide-0828
+
+run_script z:\TestData\scripts\te_esock_test_unloadesockForced.script
+run_script z:\TestData\scripts\te_esock_test_loadesock.script
+
+//The following testcase is for covering all the corner of the code for the case when primary context activation ends up with inactive context.
+
+START_TESTCASE          NET-Spud-NetworkSide-0829
+//! @SYMTestCaseID      NET-Spud-NetworkSide-0829
+//! @SYMTestCaseDesc  Sanity check: Primary context activation ends up with inactive context.
+//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
+//! @SYMTestActions Activate a primary PDP context, simtsy is set up to make context activation end up with an inactive context. The function GetLastErrorCause, which is used for getting the last error code, will complete with KErrGeneral. 
+//! @SYMTestExpectedResults  Primary context activation should return KErrCompletion.
+//! @SYMTestPriority Normal
+//! @SYMTestStatus Implemented
+//! @SYMTestType CIT
+RUN_TEST_STEP 60 TE_SpudNetworkSide CSpudPrimary z:\testdata\configs\te_spudNetworkSide.ini PrimaryActivationEndUpWithInactiveContext4
+DELAY 3000
+RUN_TEST_STEP 60 TE_SpudNetworkSide CESockCheck z:\testdata\configs\te_spudNetworkSide.ini ESockCheck
+END_TESTCASE            NET-Spud-NetworkSide-0829
+
+run_script z:\TestData\scripts\te_esock_test_unloadesockForced.script
+run_script z:\TestData\scripts\te_esock_test_loadesock.script
+
+START_TESTCASE          NET-Spud-NetworkSide-0830
+//! @SYMTestCaseID      NET-Spud-NetworkSide-0830
+//! @SYMTestCaseDesc Sanity check: fail to activate Primary context (KErrCorrupt) because of bad QoS record in UmtsR99QoSAndOnTable. 
+//! @SYMFssID NETWORKING/Spud/Control Plane/Primary PDP Context Creation
+//! @SYMTestActions Explicitly start the SPUD interface. SIM TSY, etc fail to activate the primary context.
+//! @SYMTestExpectedResults  Primary PDP context activation fails with -20.
+//! @SYMTestPriority Critical
+//! @SYMTestStatus Implemented
+//! @SYMTestType CIT
+RUN_TEST_STEP 60 TE_SpudNetworkSide CSpudPrimary z:\testdata\configs\te_spudNetworkSide.ini PrimaryActivationFails20
+DELAY 3000
+RUN_TEST_STEP 60 TE_SpudNetworkSide CESockCheck z:\testdata\configs\te_spudNetworkSide.ini ESockCheck
+END_TESTCASE            NET-Spud-NetworkSide-0830
+
+run_script z:\TestData\scripts\te_esock_test_unloadesockForced.script
 
 RUN_UTILS  MakeReadWrite c:\simtsy\config.txt
 RUN_UTILS  MakeReadWrite c:\config.txt
--- a/telephonyprotocols/qos3gppcpr/inc/Qos3GPP_subconparams.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/qos3gppcpr/inc/Qos3GPP_subconparams.h	Fri Mar 19 09:55:57 2010 +0200
@@ -28,7 +28,12 @@
 #include <es_sock.h>
 #include <comms-infras/metadata.h>
 #include <comms-infras/metatype.h>
+
+#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <etelqos.h>
+#else
+#include <eteldefaultqos.h>
+#endif
 #include <comms-infras/es_parameterfamily.h>
 
 const TInt KSubCon3GPPExtParamsFactoryUid = 0x1020D460;
--- a/telephonyprotocols/rawipnif/rawipnif2/src/IPv6Binder.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/rawipnif/rawipnif2/src/IPv6Binder.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -25,6 +25,8 @@
 #include "RawIP2Flow.h"
 #include "IPv6Binder.h"
 #include <comms-infras/linkprovision.h>
+#include <e32hal.h>
+
 
 
 #ifdef WCDMA_STUB
--- a/telephonyprotocols/rawipnif/src/IPv6Binder.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/rawipnif/src/IPv6Binder.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -25,6 +25,8 @@
 #include "RawIPFlow.h"
 #include "IPv6Binder.h"
 #include <comms-infras/linkprovision.h>
+#include <e32hal.h>
+
 
 using namespace ESock;
 #ifdef WCDMA_STUB
--- a/telephonyprotocols/rawipnif/src/RawIPFlow.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyprotocols/rawipnif/src/RawIPFlow.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -529,11 +529,13 @@
     {
     _LOG_L1C2(_L8("CRawIPFlow %08x:\tUnbind()"), this);
 
-	ASSERT(iBinder);
-	iBinder->Unbind(aUpperReceiver, aUpperControl);
+	if (iBinder)
+	    {
+        iBinder->Unbind(aUpperReceiver, aUpperControl);
 
-    delete iBinder;
-    iBinder = NULL;
+        delete iBinder;
+        iBinder = NULL;
+	    }
 
     SendDataClientIdleIfNoClients();
     }
--- a/telephonyserver/etelpacketdata/group/bld.inf	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserver/etelpacketdata/group/bld.inf	Fri Mar 19 09:55:57 2010 +0200
@@ -22,6 +22,7 @@
 PRJ_EXPORTS
 ../inc/etelpckt.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(etelpckt.h)
 ../inc/etelQoS.h 			SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(etelqos.h)
+../inc/eteldefaultqos.h 	SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(eteldefaultqos.h)
 ../inc/pcktlist.h 			SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(pcktlist.h)
 ../inc/pcktretrieve.h 		SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(pcktretrieve.h)
 ../inc/mbmstypes.h 			SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(mbmstypes.h)
--- a/telephonyserver/etelpacketdata/inc/etelQoS.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserver/etelpacketdata/inc/etelQoS.h	Fri Mar 19 09:55:57 2010 +0200
@@ -17,10 +17,10 @@
 // Copyright (c) Symbian Software Ltd. 2002-2009.  All rights reserved.
 // 
 //
-
+#ifndef __ETELQOS_H__
+#define __ETELQOS_H__
 
-#if!defined(__ETELQOS_H__)
-#define __ETELQOS_H__
+#ifndef __ETELDEFAULTQOS_H__
 
 #include "etelpckt.h"
 
@@ -753,3 +753,4 @@
 
 #endif
 	
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserver/etelpacketdata/inc/eteldefaultqos.h	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,103 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+#ifndef __ETELDEFAULTQOS_H__
+#define __ETELDEFAULTQOS_H__
+
+#ifndef __ETELQOS_H__
+
+class RPacketQoS
+    {
+    // The enums TTrafficClass, TDeliveryOrder,TErroneousSDUDelivery, TBitErrorRatio,
+     // TSDUErrorRatio, TTrafficHandlingPriority have been assigned values because
+     // the same enums are used both in the TQoSR99_R4Requested / Negotiated classes and 
+     // in the TQoSCapsR99_R4 class. The Caps class has to indicate which, for instance, 
+     // traffic classes are supported in a bitfield, so the enums have been defined as 
+     // different bits in a bit field.
+public: 
+    enum TTrafficClass          
+         {
+         ETrafficClassUnspecified    = 0x01,     //< Traffic class - Unspecified
+         ETrafficClassConversational = 0x02,     //< Traffic class - Conversational
+         ETrafficClassStreaming      = 0x04,     //< Traffic class - Streaming
+         ETrafficClassInteractive    = 0x08,     //< Traffic class - Interactive
+         ETrafficClassBackground     = 0x10      //< Traffic class - Background
+         };
+
+     enum TDeliveryOrder     
+         {
+         EDeliveryOrderUnspecified   = 0x01,     //< SDU Delivery order - Unspecified
+         EDeliveryOrderRequired      = 0x02,     //< SDU Delivery order - Required to be in sequence
+         EDeliveryOrderNotRequired   = 0x04      //< SDU Delivery order - Not Required to be in sequence
+         };
+
+     enum TErroneousSDUDelivery      // Erroneous SDU Delivery
+         {
+         EErroneousSDUDeliveryUnspecified    = 0x01, //< Unspecified
+         EErroneousSDUNoDetection            = 0x02, //< Erroneous SDUs delivered - Error detection not considered.
+         EErroneousSDUDeliveryRequired       = 0x04, //< Erroneous SDUs delivered + error indication - Error detection employed.
+         EErroneousSDUDeliveryNotRequired    = 0x08  //< Erroneous SDUs discarded - Error detection is employed.
+         };
+
+     enum TBitErrorRatio             // Residual Bit Error Rate
+         {
+         EBERUnspecified             = 0x01,     //< Target residual undetected BER - Unspecified
+         EBERFivePerHundred          = 0x02,     //< Target residual BER - 0.05
+         EBEROnePerHundred           = 0x04,     //< Target residual BER - 0.01
+         EBERFivePerThousand         = 0x08,     //< Target residual BER - 0.005
+         EBERFourPerThousand         = 0x10,     //< Target residual BER - 0.004
+         EBEROnePerThousand          = 0x20,     //< Target residual BER - 0.001
+         EBEROnePerTenThousand       = 0x40,     //< Target residual BER - 0.0001
+         EBEROnePerHundredThousand   = 0x80,     //< Target residual BER - 0.00001
+         EBEROnePerMillion           = 0x100,    //< Target residual BER - 0.000001
+         EBERSixPerHundredMillion    = 0x200     //< Target residual BER - 0.00000006
+         };
+
+     enum TSDUErrorRatio             // SDU Error Ratio
+         {
+         ESDUErrorRatioUnspecified           = 0x01, //< Target value of Erroneous SDUs - Unspecified
+         ESDUErrorRatioOnePerTen             = 0x02, //< Target SDU error ratio - 0.1
+         ESDUErrorRatioOnePerHundred         = 0x04, //< Target SDU error ratio - 0.01
+         ESDUErrorRatioSevenPerThousand      = 0x08, //< Target SDU error ratio - 0.007
+         ESDUErrorRatioOnePerThousand        = 0x10, //< Target SDU error ratio - 0.001
+         ESDUErrorRatioOnePerTenThousand     = 0x20, //< Target SDU error ratio - 0.0001
+         ESDUErrorRatioOnePerHundredThousand = 0x40, //< Target SDU error ratio - 0.00001
+         ESDUErrorRatioOnePerMillion         = 0x80  //< Target SDU error ratio - 0.000001
+         };
+
+     enum TTrafficHandlingPriority   // Traffic handling priority
+         {
+         ETrafficPriorityUnspecified = 0x01,     //< Unspecified Priority level
+         ETrafficPriority1           = 0x02,     //< Priority level 1
+         ETrafficPriority2           = 0x04,     //< Priority level 2
+         ETrafficPriority3           = 0x08      //< Priority level 3
+         };
+     /**
+      Source statistics descriptor - as defined in 3GPP TS 23.107 and TS 24.008.
+      
+      @publishedPartner
+      @released
+      */
+      enum TSourceStatisticsDescriptor    
+          {
+          /** Unknown source statistics descriptor. */
+          ESourceStatisticsDescriptorUnknown  = 0x0,      
+          /** Speech source statistics descriptor. */
+          ESourceStatisticsDescriptorSpeech   = 0x01,      
+          };
+    };
+
+#endif//#ifndef__ETELQOS_H__
+
+#endif//#ifndef__ETELDEFAULTQOS_H__
--- a/telephonyserver/etelserverandcore/group/BLD.INF	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserver/etelserverandcore/group/BLD.INF	Fri Mar 19 09:55:57 2010 +0200
@@ -29,10 +29,10 @@
 ../INC/ET_PHONE.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(et_phone.h)
 ../INC/et_phone_util.h  SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(et_phone_util.h)
 ../INC/ET_PHONE.INL SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(et_phone.inl)
-../INC/ET_TSY.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(et_tsy.h)
+../INC/ET_TSY.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(et_tsy.h)
 ../INC/secure/ET_CLSVR.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(et_clsvr.h)
 ../INC/ET_STRUC.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(et_struc.h)
-../INC/et_struct.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(et_struct.h)
+../INC/et_struct.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(et_struct.h)
 ../INC/EXTERROR.H SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(exterror.h)
 ../INC/ETBUFFER.H SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(etbuffer.h)
 ../INC/etslotnum.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(etslotnum.h)
--- a/telephonyserverplugins/common_tsy/commontsy/exportinc/serviceapi/MmTsy_IPCdefs.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/exportinc/serviceapi/MmTsy_IPCdefs.h	Fri Mar 19 09:55:57 2010 +0200
@@ -132,7 +132,7 @@
 
     EMmTsyNotifyEGprsInfoChangeIPC,			//1000373
 
-    EMmTsyGetCustomVendorExtPtrIPC,			//1000374
+    EMmTsyGetCustomVendorExtPtrIPC,			//1000374 (@deprecated. There should be no references to this.)
     
     EMmTsyONStoreReadEntryIPC,			//1000375
     EMmTsyONStoreReadSizeIPC,			//1000376
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmcustomtsy/CMmCustomTsy.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmcustomtsy/CMmCustomTsy.h	Fri Mar 19 09:55:57 2010 +0200
@@ -1922,12 +1922,6 @@
         CMmCustomSecurityTsy* iMmSecurityTsy;
 
         /**
-         * Pointer to vendor extension
-         * Own.
-         */
-        CMmCustomVendorExt*   iMmCustomVendorExt;
-
-        /**
          * Pointer to 2G authentication data
          * Not Own.
          */
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmcustomtsy/CMmSIMTsy.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmcustomtsy/CMmSIMTsy.h	Fri Mar 19 09:55:57 2010 +0200
@@ -482,6 +482,11 @@
          * Is ViagHomeZone cache ready
          */
         TBool iViagHomeZoneCacheReady;
+
+        /**
+         * last ViagHomeZone cache error
+         */
+        TInt iLastViagHomeZoneCacheError;
         
         /** 
          * Used for queuing ReadViagHomeZoneCache requests 
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmsmstsy.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmsms/cmmsmstsy.h	Fri Mar 19 09:55:57 2010 +0200
@@ -833,6 +833,15 @@
          * @return TBool 
          */
         TBool IsRequestPossibleInOffline( TInt aIpc ) const;
+        
+        /**
+         * Checks if error code is a relay protocol error
+         *          
+         * 
+         * @param aError Cause value received from LTSY
+         * @return TBool
+         */
+        static TBool IsRPError(TInt aError);
 
     private:
 
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmonstoretsy.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmonstoretsy.h	Fri Mar 19 09:55:57 2010 +0200
@@ -334,6 +334,12 @@
         virtual void Complete( TInt aReqHandleType, TInt aError );
 #endif
 
+        /*
+         * This method used to notify the phone that the phone book store initilization was complete
+         *
+         * @param  aError Error value
+         */
+        void PhoneBookStoreInitCompleteL(TInt aError);
     private:
     
         /**
@@ -674,11 +680,6 @@
         RMobileONStore::TMobileONStoreInfoV1* iONStoreInfoChanged;
 
         /*
-         * Holds the info is GetInfo active
-         */
-        TBool iIsGetInfoActive;
-
-        /*
          * ReadAll message pointer
          * Own.
          */
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmphonebookstoretsy.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmstorage/cmmphonebookstoretsy.h	Fri Mar 19 09:55:57 2010 +0200
@@ -346,6 +346,11 @@
          */
          TUint8 GetPhonebookType();
          
+         /**
+          * This method will be activate by the phone to notify the SIM is ready
+          */
+         void SimIsReady();
+         
     private:
 
         /**
@@ -812,6 +817,8 @@
          * Attribute to tell the status of PB initialization
          */
         TBool iIsPBInitCompleted;
+        
+        TInt iInitError;
     };
 
 #endif // PHONEBOOKSTORAGE_H
--- a/telephonyserverplugins/common_tsy/commontsy/inc/mmtsy/cmmphonetsy.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/inc/mmtsy/cmmphonetsy.h	Fri Mar 19 09:55:57 2010 +0200
@@ -76,6 +76,8 @@
 
 class MTelephonyAudioControl;
 
+class CCtsySystemStatePluginHandler;
+
 // CLASS DECLARATION
 
 /**
@@ -239,6 +241,10 @@
          */
          TBool IsModemStatusReady() const;
          
+         CCtsySystemStatePluginHandler* SystemStatePluginHandler()
+            {
+             return iSystemStatePluginHandler;
+            }
     private:
 		  /** used for queuing GetServiceTable requests */
 		  struct TServiceTableRequests
@@ -1463,6 +1469,13 @@
          */
         void SaveFdnInfoDetails(TInt aErrorCode, CMmDataPackage* aDataPackage );
 
+        /*
+		 * This method used to notify the phone that the phone book store initilization was complete
+         *
+         * @param  aError Error value
+         */
+        void PhoneBookStoreInitCompleteL(TInt aError);
+        
     private:
     
         /**
@@ -2709,6 +2722,16 @@
 	    * Pointer to the ChargingStatusObserver
 	    */
         CChargingStatusObserver* iChargingStatus;
+        
+        /**
+        * Pointer to SystemStatePlugin
+        */
+        CCtsySystemStatePluginHandler* iSystemStatePluginHandler;
+        
+        /**
+        * Holds the mailbox data
+        */
+        RMobilePhone::TMobilePhoneVoicemailIdsV3 iMailboxData;
     };
 
 #endif // CMMPHONETSY_H
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmCustomTsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmCustomTsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -66,28 +66,7 @@
 
     iMmSecurityTsy = CMmCustomSecurityTsy::NewL( this, aMmPhoneTsy );
 
-    // Create custom vendor extension
-    // Send request to the Domestic OS layer.
-    iMmCustomVendorExt = (CMmCustomVendorExt*) NULL;
-    CMmDataPackage package;
-
-    package.PackData( &iMmCustomVendorExt ); // ptr to ptr
-    Phone()->MessageManager()->HandleRequestL(
-            EMmTsyGetCustomVendorExtPtrIPC, &package );
-TFLOGSTRING2("TSY: CMmCustomTsy::ConstructL -- iMmCustomVendorExt=0x%x", TUint(iMmCustomVendorExt));
-    // The request above is 'completed' immediatedly (there is no need for
-    // actual complete)
-
-    // iMmCustomVendorExt should now hold ptr to custom vendor extension.
-    // But if not, no problem, we just use the base class.
-    if ( NULL == iMmCustomVendorExt )
-        {
-TFLOGSTRING("TSY: CMmCustomTsy::ConstructL -- no vendor IPC extensions");
-        iMmCustomVendorExt = new(ELeave)CMmCustomVendorExt();
-        }
-    
-    // initialize custom vendor extension 
-    iMmCustomVendorExt->InitializeL( *this );
+
 
 #ifdef REQHANDLE_TIMER
     // Create req handle store
@@ -162,7 +141,7 @@
 CMmCustomTsy::~CMmCustomTsy()
     {
 TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy");
-
+    iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse );
 	iFeatureControl.Close();
 	
     // Delete subsystems
@@ -171,12 +150,6 @@
         delete iMmSubTsy[i];
         }
 
-    if ( iMmCustomVendorExt )
-        {
-        // delete vendor extension
-        delete iMmCustomVendorExt;
-        }
-
     if ( iMmSecurityTsy )
         {
         // Delete SecurityTsy
@@ -195,7 +168,6 @@
         delete iTsyReqHandleStore;
         }
 
-    iMmCustomVendorExt = NULL;
     iMmSecurityTsy = NULL;
     iMmCustomExtInterface = NULL;
     iTsyReqHandleStore = NULL;
@@ -293,18 +265,9 @@
 
     if ( KErrNotSupported == ret )
         {
-        // then check if this is vendor extension IPC
-        // these IPCs are handled by VendorExt class in licensee tsy.
-       if ( iMmCustomVendorExt->SupportingIPC(aIpc) )
-          {
-          ret = iMmCustomVendorExt->DoExtFuncL( aTsyReqHandle, aIpc,
-                    aPackage );
-          }
-       else
-          {
-          // then check all the Custom extension modules
-          ret = CMmTsyBase::DoBaseExtFuncL( aTsyReqHandle, aIpc, aPackage );
-	      }
+ 
+        // then check all the Custom extension modules
+        ret = CMmTsyBase::DoBaseExtFuncL( aTsyReqHandle, aIpc, aPackage );
 
         // if extension modules did not serve this request
         if ( KErrNotSupported == ret )
@@ -638,14 +601,7 @@
             break;
 
         default:
-            if ( iMmCustomVendorExt->SupportingIPC( aIpc ) )
-                {
-                ret = iMmCustomVendorExt->RegisterNotification( aIpc );
-                }
-            else
-                {
-                ret = CMmTsyBase::RegisterNotification( aIpc );
-                }
+            ret = CMmTsyBase::RegisterNotification( aIpc );
             break;
         }
 
@@ -686,14 +642,7 @@
             ret =  KErrNone;
             break;
         default:
-            if ( iMmCustomVendorExt->SupportingIPC( aIpc ) )
-                {
-                ret = iMmCustomVendorExt->DeregisterNotification( aIpc );
-                }
-            else
-                {
-                ret = CMmTsyBase::DeregisterNotification( aIpc );
-                }
+            ret = CMmTsyBase::DeregisterNotification( aIpc );
             break;
         }
 
@@ -794,14 +743,7 @@
             ret = 0;
             break;
         default:
-            if ( iMmCustomVendorExt->SupportingIPC( aIpc ) )
-                {
-                ret = iMmCustomVendorExt->ReqModeL( aIpc );
-                }
-            else
-                {
-                ret = CMmTsyBase::ReqModeL ( aIpc );
-                }
+            ret = CMmTsyBase::ReqModeL ( aIpc );
             break;
         }
 
@@ -841,14 +783,7 @@
             break;
 
         default:
-            if ( iMmCustomVendorExt->SupportingIPC( aIpc ) )
-                {
-                numberOfSlots = iMmCustomVendorExt->NumberOfSlotsL( aIpc );
-                }
-            else
-                {
-                numberOfSlots = CMmTsyBase:: NumberOfSlotsL( aIpc );
-                }
+            numberOfSlots = CMmTsyBase:: NumberOfSlotsL( aIpc );
             break;
         }
 
@@ -1061,16 +996,9 @@
             policy = TSecurityPolicy( ECapabilityWriteDeviceData );
             break;
         default:
-            if ( iMmCustomVendorExt->SupportingIPC(ipc) )
-                {
-                policy = iMmCustomVendorExt->GetRequiredPlatSecCaps(ipc);
-                }
-            else
-                {
-                // if none of the above then we end up here,
-                // as a default we already have caps as alwaysfail.
+            // if none of the above then we end up here,
+            // as a default we already have caps as alwaysfail.
 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=AlwaysFail");
-                }
             break;
         }
 
@@ -1239,11 +1167,6 @@
         		ret = iMmSecurityTsy->CancelService ( aIpc, 
         				aTsyReqHandle ); 
         		}
-        	else if ( iMmCustomVendorExt->SupportingIPC( aIpc ) )
-                {
-                ret = iMmCustomVendorExt->CancelService ( aIpc,
-                        aTsyReqHandle );
-                }
             else
                 {
                 ret = CMmTsyBase::CancelService ( aIpc, aTsyReqHandle );
@@ -5453,19 +5376,22 @@
             // packed parameter: TSetDriveMode (mode status)
             CMmDataPackage dataPackage;
             dataPackage.PackData( aModeStatus );
+		    // allow for ECustomSetDriveModeIPC immediate completion
+#ifdef REQHANDLE_TIMER
+            // set timer for the request
+            SetTypeOfResponse ( ECustomTsySetDriveMode, aTsyReqHandle );
+#else
+            iTsyReqHandleStore->SetTsyReqHandle( ECustomTsySetDriveMode,
+                    aTsyReqHandle );
+#endif // REQHANDLE_TIMER
             TInt ret = iMmPhoneTsy->MessageManager()->HandleRequestL(
                 ECustomSetDriveModeIPC, &dataPackage );
 
             // check success
-            if ( KErrNone != ret )
+            if ( (KErrNone != ret) && (iTsyReqHandleStore->ResetTsyReqHandle(ECustomTsySetDriveMode)) )
                 {
                 ReqCompleted ( aTsyReqHandle, ret );
                 }
-            else
-                {
-                // Store the request handle
-                iReqHandleType = ECustomTsySetDriveMode;
-                }
             }
         }
     else
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmSIMTsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmSIMTsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -556,6 +556,7 @@
     TInt aError )
     {
 TFLOGSTRING("TSY: CMmSIMTsy::CompleteReadViagHomeZoneCacheRespL");
+    iLastViagHomeZoneCacheError = aError;
     if (iCurrentlyRetrievedCache == NULL)
         {
         // Got an unexpected update... ignore!
@@ -643,9 +644,21 @@
         else
             {
             // caching aborted
-            delete iCurrentlyRetrievedCache;
-            iCurrentlyRetrievedCache = NULL;
+        delete iCurrentlyRetrievedCache;
+        iCurrentlyRetrievedCache = NULL;
 TFLOGSTRING2("TSY: CMmSIMTsy::CompleteReadViagHomeZoneCacheRespL:There was a problem reading cache values from SIM, error=%d", aError);
+            //iViagHomeZoneCacheReady = ETrue;
+TFLOGSTRING("TSY: CMmSIMTsy::CompleteReadViagHomeZoneCacheRespL: Caching completed unsuccessfully!");
+
+            for (TInt i = 0; i < iReadViagHomeZoneCacheRequests.Count(); i++)
+                {
+TFLOGSTRING2("TSY: CMmSIMTsy::CompleteReadDynamicViagHomeZoneCacheRespL: for i:%d", i);
+                TReadViagHomeZoneCacheRequest* req =
+                        iReadViagHomeZoneCacheRequests[i];
+                iMmCustomTsy->ReqCompleted(req->iReqHandle, aError);
+                }
+            iReadViagHomeZoneCacheRequests.ResetAndDestroy();
+
             }
     }
 
@@ -748,6 +761,11 @@
 		req->iViagRecordId = aViagRecordId;
 		req->iViagRecordContent = aViagRecordContent;
 		iReadViagHomeZoneCacheRequests.AppendL( req );
+		if(iLastViagHomeZoneCacheError != KErrNone)
+		    {
+            // Got an error last time, ask again
+            StartDynamicCachingL();
+		    }
         }
 
     // complete to client
@@ -882,7 +900,7 @@
 void CMmSIMTsy::StartDynamicCachingL()
     {
 TFLOGSTRING("TSY: CMmSIMTsy::StartDynamicCachingL");
-
+    iLastViagHomeZoneCacheError = KErrNone;
 	// Make sure there are no ongoing dynamic caching requests.. 
 	if( iCurrentlyRetrievedCache ) 
 		{ 
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaext.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaext.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -123,9 +123,7 @@
     TInt err = iFeatureControl.Open();
 	iUsingFeatureManager = (err == KErrNone);
 	
-	//Create the SSM Plugin Handler on creation rather than on demand to avoid problems 
-	//with Emergency Calls in Out Of Memory situations.
-	iSystemStatePluginHandler = CCtsySystemStatePluginHandler::NewL();
+	iSystemStatePluginHandler = iMmCallTsy->Phone()->SystemStatePluginHandler();
 
 	ResetInternalAttributes();
     }
@@ -174,12 +172,6 @@
     iMmCallTsy = NULL;
     iMessageManager = NULL;
     
-    if ( iSystemStatePluginHandler )
-        {
-        delete iSystemStatePluginHandler;
-        }
-    iSystemStatePluginHandler = NULL;
-    
     }
     
 // ---------------------------------------------------------------------------
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaextwithdispatcher.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmcallgsmwcdmaextwithdispatcher.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -34,13 +34,23 @@
 TInt CMmCallGsmWcdmaExt::SwapL(TInt aCallId)
 	{
     TInt ret = KErrNone;
-
-    // CTSY supports RMobileCall::Swap where there are two calls (one held, one active)
-    // and their states are swapped. Where Swap() is called on a single call, this is
-    // not supported.
+	const TInt KInvalidCallId = -1;
+	
+    // CTSY supports RMobileCall::Swap when there are one or two calls. When Swap() is called
+	// on a single call, it's state is switched (active to held or held to active), when on two 
+	// calls(one held, one active) their states are swapped. 
     CMmPhoneTsy& mmPhone = *iMmCallTsy->Phone();
     CMmCallList& callList = *mmPhone.CallList();
+    
+	CCallDataPackage package;
+	
+	if ( callList.GetNumberOfObjects() > 2 )
+		{
+		// Swapping between calls only makes sense with one or two opened calls.
+		return KErrNotSupported;
+		}
     CMmCallTsy* call = callList.GetMmCallById(aCallId);
+	package.SetCallIdAndMode(aCallId, iSymbianCallMode);
     
     if (!call)
     	{
@@ -60,16 +70,13 @@
         		package.SetCallIdAndMode(aCallId, iSymbianCallMode);
         		// Get connected call and pack its call ID
         		CMmCallTsy* connectedCall = callList.GetMmCallByStatus(RMobileCall::EStatusConnected);
+				TInt connectedCallId = KInvalidCallId;
         		if (connectedCall)
         			{
-        			TInt connectedCallId = connectedCall->CallId();
-        			package.PackData(&connectedCallId);
-        			ret = iMessageManager->HandleRequestL(EMobileCallSwap, &package);
+        			connectedCallId = connectedCall->CallId();
         			}
-        		else
-        			{
-        			ret = KErrNotSupported;
-        			}
+        		package.PackData(&connectedCallId);
+        		ret = iMessageManager->HandleRequestL(EMobileCallSwap, &package);
         		
     			break;
     			}
@@ -79,18 +86,15 @@
     		    // Pack the following to the dispatcher:
     		    // Call status of connected call in additional parameter slot in CCallDataPackage
     		    CCallDataPackage package;
+				
     			package.PackData(&aCallId);
         		// Get held call and pack its call ID
         		CMmCallTsy* heldCall = callList.GetMmCallByStatus(RMobileCall::EStatusHold);
-        		if (heldCall)
+         		if (heldCall)
         			{
         			package.SetCallIdAndMode(heldCall->CallId(), heldCall->CallMode());
-        			ret = iMessageManager->HandleRequestL(EMobileCallSwap, &package);
         			}
-        		else
-        			{
-        			ret = KErrNotSupported;
-        			}
+         		ret = iMessageManager->HandleRequestL(EMobileCallSwap, &package);
     			break;
     			}
     		
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmconferencecallgsmwcdmaext.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/cmmconferencecallgsmwcdmaext.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -632,8 +632,7 @@
                 if ( counter == *aIndex )
                     {
                     //get mobile call info
-                    mobileCall->FillMobileCallInfo( aCallInfo );
-                    ret = KErrNone;
+                    ret = mobileCall->FillMobileCallInfo( aCallInfo );
                     break;
                     }
                 else
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmstsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmsms/cmmsmstsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -1831,7 +1831,54 @@
 
     return KErrNone;
     }
+  
+//----------------------------------------------------------------------------
+// CMmSmsTsy::IsRPError
+// Checks if error code is a relay protocol error
+// --------------------------------------------------------------------------- 
+TBool CMmSmsTsy::IsRPError(TInt aError)
+    {
+    TFLOGSTRING2("CMmSmsTsy::IsRPError(): %d", aError);
     
+    TBool  isRPError = EFalse;
+    switch (aError)
+        {
+        case KErrGsmSMSShortMessageTransferRejected:
+            {
+            isRPError = ETrue;
+            }
+            break;   
+        case KErrGsmSMSInvalidMandatoryInformation:
+            {
+            isRPError = ETrue;
+            }
+            break;
+        case KErrGsmSMSUnidentifiedSubscriber:
+            {
+            isRPError = ETrue;
+            }
+            break;
+        case KErrGsmSMSUnknownSubscriber:
+            {
+            isRPError = ETrue;
+            }
+            break;
+        case KErrGsmSMSNetworkOutOfOrder:
+            {
+            isRPError = ETrue;
+            }
+            break;
+        default:
+            {
+            // NOP
+            }
+            break;
+        }
+
+    return isRPError;
+    } // CMmSmsTsy::IsRPError
+
+
 //----------------------------------------------------------------------------
 // CMmSmsTsy::CompleteSendMessage 
 // Complete SendMessage request
@@ -1842,7 +1889,25 @@
     TInt aError, 
     CMmDataPackage* aDataPackage )
     {
-    if ( ( KErrNone != aError ) && ( KErrTimedOut != aError ) 
+    TInt extendedError = CMmCommonStaticUtility::ExtendedErrorCode(aError);
+    TBool res = IsRPError(extendedError);
+    if(res)
+        {
+        // Delete send message entry from send array
+        if ( iSmsSendReq )
+            {
+            delete iSmsSendReq;   // Delete object
+            iSmsSendReq = NULL;   // Reset pointer
+            }
+        // reset req handle and complete request
+        TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( 
+                   EMultimodeSmsSendMessage );
+        ReqCompleted( reqHandle, extendedError );
+        // reset pointer to client memory
+        iSendMessageMsgAttrPckgPtr = NULL;
+        iSmsNoFdnCheckFlag = ESmsNoFdnCheckUnknown;
+        }        
+    else if ( ( KErrNone != aError ) && ( KErrTimedOut != aError ) 
         && ( KErrGsmSMSOperationNotAllowed != 
             CMmCommonStaticUtility::ExtendedErrorCode ( aError ) )
             // FDB check failed
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmenstoretsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmenstoretsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -454,7 +454,7 @@
     RMobileENStore::TMobileENEntryV1& entry = ( *entryPckg )();
 
     // Check that client uses valid location index
-    if ( 0 < entry.iIndex )
+    if (0 < entry.iIndex && sizeof( RMobileENStore::TMobileENEntryV1 ) <= aEntry->MaxLength())
         {
         // Forward request to GSM Extension
         ret = iMmENStoreExtInterface->Read( 
@@ -464,7 +464,7 @@
     // ISI message construction failed or phonet sender returned error
     if ( KErrNone != ret )
         {
-        ReqCompleted( aTsyReqHandle, ret );
+        ReqCompleted( aTsyReqHandle, ret ); 
         }
     else
         {
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmonstoretsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmonstoretsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -471,14 +471,18 @@
             ( RMobileONStore::TMobileONEntryV1Pckg*, aEntry );
         RMobileONStore::TMobileONEntryV1& entry = ( *entryPckg )();
 
-        // Save entry pointer
-        iReadONStoreEntryPtr = aEntry;
-
-        // Forward request to GSM Extension
-        ret = iMmONStoreExtInterface->ReadL( EMmTsyONStoreReadIPC, entry.iIndex );
+        // Check index
+        if ( (-1) <= entry.iIndex )
+            {
+            // Forward request to GSM Extension
+            ret = iMmONStoreExtInterface->ReadL( EMmTsyONStoreReadIPC, entry.iIndex );
+            }
 
         if ( KErrNone == ret )
             {
+            // Save entry pointer
+            iReadONStoreEntryPtr = aEntry;
+
             // Save tsy req handle type
             iReqHandleType = EMultimodeONStoreRead;
             }
@@ -600,8 +604,6 @@
     TDesC8* aEntry )
     {
 TFLOGSTRING("TSY: CMmONStoreTsy::WriteL");
-    // Save tsy req handle type
-    iReqHandleType = EMultimodeONStoreWrite;
 
     // Unpack entry param to get the location
     RMobileONStore::TMobileONEntryV1Pckg* entryPckg =
@@ -609,14 +611,24 @@
         ( RMobileONStore::TMobileONEntryV1Pckg*, aEntry );
     RMobileONStore::TMobileONEntryV1& entry = ( *entryPckg )();
 
+    // Return value
+    TInt ret( KErrArgument );
+
+    // Check Parameters
+    if( (-1) > entry.iIndex || sizeof( RMobileONStore::TMobileONEntryV1 ) != aEntry->Size() )
+        {
+        return ret;
+        }
+
+    // Save tsy req handle type
+    iReqHandleType = EMultimodeONStoreWrite;
+
     iWriteONStoreEntryPtr = aEntry;
     iWriteIndexToReturn = entry.iIndex;
 
     // It is not possible to cancel write request anymore...
     iIsWriteCancellingPossible = EFalse;
 
-    // Return value
-    TInt ret( KErrNone );
 
     ret = iMmONStoreExtInterface->
         WriteL(
@@ -959,6 +971,13 @@
 
     TInt ret( KErrNone );
 
+    TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
+        EMultimodeONStoreGetInfo );
+    if(reqHandle != EMultimodeONStoreReqHandleUnknown)
+        {
+        ReqCompleted( aTsyReqHandle, KErrServerBusy );
+        return ret;
+        }
     // if aInfo is not correct type, send KErrArgument to client and return
     if( RMobilePhoneStore::KETelMobileONStoreV1 != aInfo->ExtensionId() )
         {
@@ -967,55 +986,63 @@
         }
 
    	// Don't send request if pb init is still ongoing
-	// instead send KErrNotReady to client
-	TBool done ( ETrue );
+	// instead create an ADN book store and wait for it to initilize
+    
 TFLOGSTRING2( "TSY: CMmONStoreTsy::GetInfoL iPBList->GetNumberOfObjects() = %d", iMmPhone->PBList()->GetNumberOfObjects());
-
-	for( TInt i = 0; i < iMmPhone->PBList()->GetNumberOfObjects(); i++ )
+    CMmPhoneBookStoreTsy* pbStore = NULL;
+	for( TInt i = 0; (i < iMmPhone->PBList()->GetNumberOfObjects()) && (NULL == pbStore) ; i++ )
 	    {
-	    CMmPhoneBookStoreTsy* pbStore = iMmPhone->PBList()->
-	        GetMmPBByIndex( i );
+	    pbStore = iMmPhone->PBList()->GetMmPBByIndex( i );
 TFLOGSTRING2( "TSY: CMmONStoreTsy::GetInfoL index = %d", i);    
-
-		if ( !pbStore->IsPBInitDone() 
-			  && ( pbStore->GetPhonebookType() == KADNPhoneBook
-		      || pbStore->GetPhonebookType() == KFDNPhoneBook )  )
-		    {
-TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - ADN or FDN init not done");
-TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - in !pbStore->IsPBInitDone()");
-			// init still ongoing
-			done = EFalse;
-			}
-   		}
-   				
-    // Check if some PB is not initialized, if so send KErrNotReady to client   				
-   	if ( !done )
-		{
-TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - PBInit not done, return KErrNotReady");
-		ReqCompleted( aTsyReqHandle, KErrNotReady );
-		}
-	            
-	else
-		{
-TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - PBInit done, complete");
-        // Set get info internal pointer
-        iONStoreInfoChanged = aInfo;
-        
-        // Request to GSM extension, get used entries,
-        // -1 as a index param-> specified location param not needed
-        ret = iMmONStoreExtInterface->ReadL( EMmTsyONStoreGetInfoIPC, -1 );
-
-        if ( KErrNone != ret )   // Message sending failed
+        if( (pbStore->GetPhonebookType() != KADNPhoneBook) && (pbStore->GetPhonebookType() != KFDNPhoneBook ) ) 
             {
-            ReqCompleted( aTsyReqHandle, ret );
+            pbStore = NULL;
             }
         else
             {
-            iIsGetInfoActive = ETrue;
-            // Save tsy req handle type
-            iReqHandleType = EMultimodeONStoreGetInfo;
+        
+TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - found ADN or FDN store");
+			}
+   		}
+	if(NULL == pbStore)
+	    {
+TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - no ADN nor FDN store- creating ADN");
+        pbStore = CMmPhoneBookStoreTsy::NewL( iMmPhone, KETelIccAdnPhoneBook );
+        TInt addPBSucceeded = iMmPhone->PBList()->AddObject( pbStore );
+        if(addPBSucceeded != KErrNone)
+            {
+            delete pbStore;
+            ReqCompleted( aTsyReqHandle, addPBSucceeded );
+            return KErrNone;
             }
-		}
+	    }
+
+	// Set get info internal pointer
+    iONStoreInfoChanged = aInfo;
+
+	if ( !pbStore->IsPBInitDone())
+	    {
+TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - waiting for phone book to be initilized");
+        // Save tsy req handle type
+        iReqHandleType = EMultimodeONStoreGetInfo;
+        return KErrNone;
+	    }
+     
+TFLOGSTRING("TSY: CMmONStoreTsy::GetInfoL - PBInit done, complete");
+        
+    // Request to GSM extension, get used entries,
+    // -1 as a index param-> specified location param not needed
+    ret = iMmONStoreExtInterface->ReadL(EMmTsyONStoreGetInfoIPC, -1);
+
+    if (KErrNone != ret) // Message sending failed
+        {
+        ReqCompleted(aTsyReqHandle, ret);
+        }
+    else
+        {
+        // Save tsy req handle type
+        iReqHandleType = EMultimodeONStoreGetInfo;
+        }
 
     return KErrNone;
     }
@@ -1032,11 +1059,6 @@
     {
 TFLOGSTRING2("TSY: CMmONStoreTsy::CompleteGetInfo - Result: %d", aResult );
 
-    // The number of used entries
-    TServiceType serviceType;   
-    //unpack data
-    aDataPackage->UnPackData( serviceType );
-
     // Reset req handle. Returns the deleted req handle
     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
         EMultimodeONStoreGetInfo );
@@ -1048,6 +1070,11 @@
         // give info to client
         if ( KErrNone == aResult )
             {
+            // The number of used entries
+            TServiceType serviceType;   
+            //unpack data
+            aDataPackage->UnPackData( serviceType );
+
             iONStoreInfo.iTotalEntries = serviceType.iNumOfEntries;
             iONStoreInfo.iUsedEntries = serviceType.iUsedEntries;
             iONStoreInfo.iNumberLen = serviceType.iNumLen;
@@ -1062,7 +1089,6 @@
 
         // NULL the pointer to info supplied to TSY from the client
         iONStoreInfoChanged = NULL;
-        iIsGetInfoActive = EFalse;
     
         // Complete with error
         ReqCompleted( reqHandle, aResult );
@@ -2005,4 +2031,43 @@
 
 #endif
 
+// ---------------------------------------------------------------------------
+// CMmONStoreTsy::PhoneBookStoreInitCompleteL
+// Phone book store initilization was complete
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CMmONStoreTsy::PhoneBookStoreInitCompleteL(TInt aError)
+    {
+    TFLOGSTRING("TSY: CMmONStoreTsy::PhoneBookStoreInitCompleteL ");
+    TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( EMultimodeONStoreGetInfo );   
+    if( EMultimodeONStoreReqHandleUnknown != reqHandle )
+        {
+        if( KErrNone != aError )
+            {
+            
+            ReqCompleted(reqHandle, aError);
+            return;
+            }
+        iReqHandleType = EMultimodeONStoreReqHandleUnknown;
+        TInt ret = GetInfoL(reqHandle, iONStoreInfoChanged);
+        if (ret == KErrNone)
+            {
+            if (iReqHandleType != EMultimodeONStoreReqHandleUnknown)
+                {
+#ifdef REQHANDLE_TIMER
+                SetTypeOfResponse(iReqHandleType, reqHandle);
+#else // REQHANDLE_TIMER
+                iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, reqHandle );
+#endif // REQHANDLE_TIMER
+                }
+            }
+        else
+            {
+            ReqCompleted(reqHandle, ret);
+            }
+        }
+    
+    }
+
 //  End of File
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmstorage/cmmphonebookstoretsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -52,6 +52,7 @@
 
 #endif
 
+    iInitError = KErrNone;
     // Get mode of current extension.
     RMobilePhone::TMobilePhoneNetworkMode currentMode;
     iMmPhoneTsy->GetStaticExtensionMode( &currentMode );
@@ -91,29 +92,13 @@
 TFLOGSTRING2("TSY: CMmPhoneBookStoreTsy::ConstructL - iIsPhonebookInitialized: %i", iStoreInfoData->iIsPhonebookInitialized);
 TFLOGSTRING2("TSY: CMmPhoneBookStoreTsy::ConstructL - iSIMReady: %i", bootState->iSIMReady);
 TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::ConstructL - before initialization");
-    // Check if phonebook has been initialized
-    if ( !iMmPhoneTsy->IsPBInitActive()
-        && ( !iStoreInfoData->iIsPhonebookInitialized )
-        && bootState->iSIMReady)
+    if(bootState->iSIMReady)
         {
-TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::ConstructL - starting initialization");
-
-        // before phonebook requests, phonebook must be initialized
-        iMmPhoneBookStoreExtInterface->InitPhonebook(
-            EMmTsyPhoneBookStoreInitIPC, iPhoneBookName );
-
-        iMmPhoneTsy->SetPBInitActiveStatus( ETrue );
+        SimIsReady();
         }
-
-    if ( bootState->iSIMReady && iStoreInfoData->iIsPhonebookInitialized
-        && ( iPhoneBookType == KADNPhoneBook
-        || iPhoneBookType == KFDNPhoneBook ) )
+    else
         {
-	  	// Set initialization flag 
-        iIsPBInitCompleted = ETrue;
-TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::ConstructL - starting caching");
-        // Call CacheEntries method to read entries from SIM.
-        CacheEntriesL();
+        iIsPBInitCompleted = EFalse;
         }
     }
 
@@ -650,8 +635,6 @@
     {
 TFLOGSTRING2("TSY: CMmPhoneBookStoreTsy::CompletePBStoreInitializationL - Result: %i",aResult );
 TFLOGSTRING2("TSY: CMmPhoneBookStoreTsy::CompletePBStoreInitializationL - PhoneBookType: %u",iPhoneBookType );
-    // Set initialization flag
-    iIsPBInitCompleted = ETrue;
 
     // If initialization made successfully
     // fill phonebook related static data
@@ -667,11 +650,19 @@
         // Reset initialization value
         iStoreInfoData->iIsPhonebookInitialized = ETrue;
         iStoreInfoData->iIsPhonebookInitializeFailed = EFalse;
-        // Set max name & number length for the current phonebook
-        SetMaxNameAndNumLenght();
-        // Just in case here, if cache request has been come
-        // before initialization is finished.
-        CacheEntriesL();
+        // Set initialization flag for all phonebooks
+        for( TInt i = 0; i < iMmPhoneTsy->PBList()->GetNumberOfObjects(); i++ )
+            {
+            //Get pbStore object
+            CMmPhoneBookStoreTsy* pbStore = iMmPhoneTsy->PBList()->GetMmPBByIndex( i );
+            pbStore->iIsPBInitCompleted = ETrue;
+            pbStore->iInitError = aResult;
+            // Set max name & number length for the current phonebook
+            pbStore->SetMaxNameAndNumLenght();
+            // Just in case here, if cache request has been come
+            // before initialization is finished.
+            pbStore->CacheEntriesL();
+            }
         }
     else
     //Initialisation has failed
@@ -698,6 +689,33 @@
             iStoreInfoData->iIsPhonebookInitializeFailed = ETrue;
             }
         }
+		if( iStoreInfoData->iIsPhonebookInitialized )
+			{
+		    TTsyReqHandle getInfoHandle =
+				iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneStoreGetInfo );
+			if ( EMultimodePhoneBookStoreReqHandleUnknown != getInfoHandle )
+				{
+				iReqHandleType = EMultimodePhoneBookStoreReqHandleUnknown;
+				RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg info(*iPhoneBookInfoChanged);
+				TInt result = GetInfoL(getInfoHandle, &info);
+				if ( KErrNone != result )
+					{
+					ReqCompleted( getInfoHandle, result );
+					}
+					// Save request handle
+				if ( EMultimodePhoneBookStoreReqHandleUnknown != iReqHandleType )
+					{
+#ifdef REQHANDLE_TIMER
+					SetTypeOfResponse( iReqHandleType, getInfoHandle );
+#else
+					iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType, getInfoHandle );
+#endif
+					}
+				
+				}
+			}
+		iMmPhoneTsy->PhoneBookStoreInitCompleteL(iInitError);
+
     }
 
 // ---------------------------------------------------------------------------
@@ -2379,6 +2397,21 @@
         // the situation.
         ret = KErrServerBusy;
         }
+    else if(iInitError != KErrNone)
+        {
+        // The phone book initilization failed
+        return iInitError;
+        }
+	else if ( !(iStoreInfoData->iIsPhonebookInitialized) )
+		{
+		// The data is not ready yet, the store was not initialized...
+        RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg* infoPckg = 
+            reinterpret_cast<RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg*>( 
+            aInfo );
+        iPhoneBookInfoChanged = &( ( *infoPckg )() );    
+		iReqHandleType = EMultimodePhoneStoreGetInfo;
+		return KErrNone;
+		}
     else if ( sizeof( RMobilePhoneBookStore::TMobilePhoneBookInfoV1 ) > 
               aInfo->MaxLength() )
         {
@@ -2543,7 +2576,8 @@
 TFLOGSTRING2("TSY: CMmPhoneBookStoreTsy::GetInfoL - total entries: %i",iStoreInfoData->iVMBXNumOfEntries );
 
             // Set caps by the store info data 
-            iPhoneBookInfoChanged->iCaps = iStoreInfoData->iVMBXCaps;
+            //iPhoneBookInfoChanged->iCaps = iStoreInfoData->iVMBXCaps;
+            iPhoneBookInfoChanged->iCaps = KPBTypeVMBXCaps;
             
             if ( !iIsUsedEntriesCounted )
                 {
@@ -2586,7 +2620,7 @@
 TFLOGSTRING2("TSY: CMmPhoneBookStoreTsy::GetInfoL - iMaxTextLength: %i",iPhoneBookInfoChanged->iMaxTextLength );
 
             // Set caps by the store info data 
-            iPhoneBookInfoChanged->iCaps = iStoreInfoData->iMBDNCaps;
+            iPhoneBookInfoChanged->iCaps = KPBTypeMBDNCaps;
             }
         if ( completeRequest )
             {
@@ -3208,6 +3242,50 @@
 		}
 	}
 
+// ---------------------------------------------------------------------------
+// CMmPhoneBookStoreTsy::SimIsReady()
+// This method will be activate by the phone to notify the SIM is ready.
+// ---------------------------------------------------------------------------
+//
+void CMmPhoneBookStoreTsy::SimIsReady()
+    {
+    
+    TFLOGSTRING2("TSY: CMmPhoneBookStoreTsy::SimIsReady - iIsPhonebookInitialized: %i", iStoreInfoData->iIsPhonebookInitialized);
+    TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::SimIsReady - before initialization");
+        // Check if phonebook has been initialized
+        if ( !iMmPhoneTsy->IsPBInitActive()
+            && ( !iStoreInfoData->iIsPhonebookInitialized )
+            )
+            {
+    TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::SimIsReady - starting initialization");
+
+            // before phonebook requests, phonebook must be initialized
+            iMmPhoneBookStoreExtInterface->InitPhonebook(
+                EMmTsyPhoneBookStoreInitIPC, iPhoneBookName );
+
+            iMmPhoneTsy->SetPBInitActiveStatus( ETrue );
+            }
+        else if (iMmPhoneTsy->IsPBInitActive())
+            {
+    TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::SimIsReady - initialization active via other store, waiting for completion");
+            iIsPBInitCompleted = EFalse;
+            }
+        else
+            {
+    TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::SimIsReady - Initialization was done via other store");
+            // Set initialization flag 
+            iIsPBInitCompleted = ETrue;
+            }
+        
+        if ( iStoreInfoData->iIsPhonebookInitialized
+            && ( iPhoneBookType == KADNPhoneBook
+            || iPhoneBookType == KFDNPhoneBook ) )
+            {
+    TFLOGSTRING("TSY: CMmPhoneBookStoreTsy::SimIsReady - starting caching");
+            // Call CacheEntries method to read entries from SIM.
+            CacheEntriesL();
+            }
+    }
 
 
 //  End of File
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -2124,12 +2124,25 @@
             }
         else
             {
-            //get mode specific information 
-            TInt ret ( iMmPhoneTsy->iMmPhoneExtInterface->
-                GetNetworkRegistrationStatusL() );
+            TInt ret(KErrGeneral);
+            // verify that modem is ready
+            if ( iMmPhoneTsy->IsModemStatusReady() )
+                {
+                //get mode specific information 
+                TFLOGSTRING("TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Sending request to LTSY" );
+                ret = iMmPhoneTsy->iMmPhoneExtInterface->
+                    GetNetworkRegistrationStatusL();
+                }
+            else
+                {
+                // modem is not ready. Client to be completed with error code.
+                TFLOGSTRING("TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Modem not ready" );            
+                ret = KErrNotReady;
+                }
 
             if ( KErrNone != ret )
                 {
+                TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Complete with error %d", ret );
                 iMmPhoneTsy->ReqCompleted( aTsyReqHandle, ret );
                 }
             else
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmphonetsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmphonetsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -91,10 +91,13 @@
     MLtsyFactoryBase* aFactory )
     {
 TFLOGSTRING2("TSY: CMmPhoneTsy::NewL - Phone model Id: %S", &KPhoneModelId);
+    CleanupStack::PushL( aMessageManager );
     CMmPhoneTsy* mmPhoneTsy = new (ELeave) CMmPhoneTsy();
 
     mmPhoneTsy->iMessageManager = aMessageManager;
+    CleanupStack::Pop(aMessageManager);
     mmPhoneTsy->iMmPhoneFactory = aMmPhoneFactoryTsy;
+    CleanupClosePushL( *mmPhoneTsy );
     //For pointer is stored for deleting licenseetsy instance
     mmPhoneTsy->iLtsyFactory = aFactory;
     mmPhoneTsy->iTelephonyAudioControl = NULL;
@@ -115,7 +118,6 @@
             }
         }
 
-    CleanupClosePushL( *mmPhoneTsy );
     mmPhoneTsy->ConstructL();
     CleanupStack::Pop( mmPhoneTsy );
     return mmPhoneTsy;
@@ -184,6 +186,10 @@
 		iBattery = CBatteryInfoObserver::NewL( *iPowerManager, *this ); 
 		iChargingStatus = CChargingStatusObserver::NewL( *this );
 		}
+    
+    //Create the SSM Plugin Handler on creation rather than on demand to avoid problems 
+    //with Emergency Calls in Out Of Memory situations.
+    iSystemStatePluginHandler = CCtsySystemStatePluginHandler::NewL();
 	
 //#ifdef __WINS__  SYMBIAN commented out
 //   iMmPhoneExtInterface->NotifySimStatusReadyL();
@@ -545,6 +551,13 @@
     iRetAclStatus = NULL;
     iSetAclStatus = NULL;
     iRetNotifyAclStatus = NULL;
+    
+    if ( iSystemStatePluginHandler )
+        {
+        iSystemStatePluginHandler->Close();
+        delete iSystemStatePluginHandler;
+        }
+    iSystemStatePluginHandler = NULL;
 TFLOGSTRING("TSY: CMmPhoneTsy::~CMmPhoneTsy DONE");
    }
 
@@ -687,24 +700,10 @@
     // entries from SIM into cache.
     for( TInt i = 0; i < iPBList->GetNumberOfObjects(); i++ )
         {
-        //Get pbStore object
+        // Get pbStore object
         CMmPhoneBookStoreTsy* pbStore = iPBList->GetMmPBByIndex( i );
-        //Check if the current PB is the object that we are trying to find.
-        //If both names are exactly the same, CompareF returns 0.
-        if ( 0 == pbStore->PhoneBookName()->CompareF( KETelIccAdnPhoneBook ) )
-            {
-TFLOGSTRING("TSY: CMmPhoneTsy::StartPBCachingL - Start to read ADN entries");
-            //Start to cache phonebook entries.
-            pbStore->CacheEntriesL();
-            }
-        //If current PB is FDN
-        else if ( 0 == pbStore->PhoneBookName()->CompareF( 
-            KETelIccFdnPhoneBook ) )
-            {
-TFLOGSTRING("TSY: CMmPhoneTsy::StartPBCaching - Start to read FDN entries" );
-            //Start to cache phonebook entries.
-            pbStore->CacheEntriesL();
-            }
+        // Notify the store that the SIM is ready
+        pbStore->SimIsReady();
         }
     }
 
@@ -5686,16 +5685,48 @@
             REINTERPRET_CAST
             ( RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg*, aMailBox );
             
-            RMobilePhone::TMobilePhoneVoicemailIdsV3& mailboxData = 
-              ( *entryPckg )();
-
-            if ( KETelExtMultimodeV3 == mailboxData.ExtensionId() )
+            iMailboxData = ( *entryPckg )();
+
+            if ( KETelExtMultimodeV3 == iMailboxData.ExtensionId() )
                 {
                 // Save pointer to client space
                 iMailBoxData = aMailBox;
 
+                // Check that VMBX book store was initilized...
+                TBool found = EFalse;
+                for( TInt i = 0; (!found) && (i < iPBList->GetNumberOfObjects()); i++ )
+                    {
+                    //Get pbStore object
+                    CMmPhoneBookStoreTsy* pbStore = iPBList->GetMmPBByIndex( i );
+                    //Check if the current PB is the object that we are trying to find.
+                    if ( 0 == pbStore->PhoneBookName()->CompareF( KETelIccVoiceMailBox ) )
+                        {
+                        found = ETrue;
+                        if( !pbStore->IsPBInitDone() )
+                            {
+                            TFLOGSTRING("TSY: CMmPhoneTsy::GetMailboxNumbersL VoiceMailBox initilizing was not complete... Waiting for completion");
+                            iReqHandleType = EMultimodePhoneGetMailboxNumbers;
+                            return KErrNone;
+                            }
+                        }
+                    }
+                if(!found)
+                    {
+                    TFLOGSTRING("TSY: CMmPhoneTsy::GetMailboxNumbersL VoiceMailBox should be created...");
+                    iMmPhoneBookStoreTsy = 
+                        CMmPhoneBookStoreTsy::NewL( this, KETelIccVoiceMailBox );
+                    
+                    TInt addPBSucceeded = iPBList->AddObject( iMmPhoneBookStoreTsy );
+                    if( !iMmPhoneBookStoreTsy->IsPBInitDone() )
+                        {
+                        iReqHandleType = EMultimodePhoneGetMailboxNumbers;
+                        return addPBSucceeded;
+                        }
+                    }
+                
+
                 CMmDataPackage mailBoxDataPackage;
-                mailBoxDataPackage.PackData( &mailboxData );
+                mailBoxDataPackage.PackData( &iMailboxData );
 
                 ret = ( MessageManager()->HandleRequestL(
                     EMobilePhoneGetMailboxNumbers, &mailBoxDataPackage ) );
@@ -6654,17 +6685,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// CMmPhoneTsy::HandleType
-// Returns req handle type
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-CMmPhoneTsy::TPhoneRequestTypes CMmPhoneTsy::HandleType()
-    {
-    return iReqHandleType;
-    }
-
-// ---------------------------------------------------------------------------
 // CMmPhoneTsy::GetSecurityTsy
 //  Returns SecurityTsy instance
 // (other items were commented in a header).
@@ -7936,5 +7956,43 @@
     
     return iIsModemReady;
     }
+	
+// ---------------------------------------------------------------------------
+// CMmPhoneTsy::PhoneBookStoreInitCompleteL
+// The phone book store initilization was complete
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//    
+void CMmPhoneTsy::PhoneBookStoreInitCompleteL(TInt aError)
+    {
+    TFLOGSTRING("TSY: CMmPhoneTsy::PhoneBookStoreInitCompleteL ");
+    TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
+        EMultimodePhoneGetMailboxNumbers );   
+    if( EMultimodePhoneReqHandleUnknown != reqHandle )
+        {
+        if( KErrNone != aError )
+            {
+            iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetMailboxNumbers );
+            ReqCompleted(reqHandle, aError);
+            return;
+            }
+        CMmDataPackage mailBoxDataPackage;
+        mailBoxDataPackage.PackData( &iMailboxData );
+
+        TInt ret = ( MessageManager()->HandleRequestL(
+                EMobilePhoneGetMailboxNumbers, &mailBoxDataPackage ) );
+        if(ret != KErrNone)
+            {
+            iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetMailboxNumbers );
+            ReqCompleted(reqHandle, ret);
+            }
+        
+        }
+    if(GetONStoreTsy() != NULL)
+        {
+        GetONStoreTsy()->PhoneBookStoreInitCompleteL(aError);
+        }
+    }
+
 //  End of File
 
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmvoicelinetsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmvoicelinetsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -386,14 +386,15 @@
                 {    
                 mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
                     iMmPhone->CallList()->GetMmCallByIndex(i) );
-                if ( mmCall->ServiceRequested(
+                if ( ( ( mmCall->CallId() == 0 ) || ( mmCall->CallId() == -1 ))
+                    && ( mmCall->ServiceRequested(
                         CMmCallTsy::EMultimodeCallDial ) 
                     ||  mmCall->ServiceRequested(
                         CMmCallTsy::EMultimodeMobileCallDialEmergencyCall )
                     || ( mmCall->ServiceRequested(
                         CMmCallTsy::EMultimodeCallDialISV ) ) 
                     || ( mmCall->ServiceRequested(
-                        CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) )
+                        CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) ) )
                     {
                     mmCall->SetCallId( callId );
 TFLOGSTRING2("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId);                      
@@ -454,6 +455,10 @@
             }
         }
 
+	CMmCallList* callList = iMmPhone->CallList();
+	TInt numberOfObjectsInCallList = callList->GetNumberOfObjects();
+    CMmVoiceCallTsy* mmCall = NULL;
+		
     //is TSY still waiting both hold and connected status indications
     if ( EWaitingHoldAndResumeOk == iSwapStatus )
         {
@@ -477,9 +482,6 @@
               ( EWaitingHoldOk == iSwapStatus &&
         RMobileCall::EStatusHold == aCallStatus ) )
         {
-        CMmCallList* callList = iMmPhone->CallList();
-        TInt numberOfObjectsInCallList = callList->GetNumberOfObjects();
-        CMmVoiceCallTsy* mmCall = NULL;
         //find the call object from which the swap was requested.
         for ( TInt i = 0; i < numberOfObjectsInCallList; i++ )
             {
@@ -532,6 +534,22 @@
             ret = ETrue;
             }
         }
+
+    if ( numberOfObjectsInCallList==1 && !otherVoiceLine )
+    	{
+
+    	// Swapping a single call. 
+        mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
+            callList->GetMmCallByIndex(0) );
+        if ( mmCall->ServiceRequested( 
+                CMmCallTsy::EMultimodeMobileCallSwap ) )
+            {
+            // Complete swap request when the correct object has been found
+            mmCall->CompleteSwap( KErrNone );
+            }    	
+    	ret = ETrue;
+    	}
+    
     return ret;
     }
 
--- a/telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/phonetsy/src/cmmphonefactorytsy.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -142,6 +142,8 @@
 	            // set the pointer to the message router object
 	            messageManager->SetMessageRouter( iMessageRouter );
 
+	            // Ownership of messageManager passed to iPhoneTsy.
+                CleanupStack::Pop( messageManager );
 	            // Create Phone Tsy (which creates the whole Common TSY)
 TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - Starting to open CommonTSY");
 	            iPhoneTsy = CMmPhoneTsy::NewL( 
@@ -149,14 +151,9 @@
 
 	            if ( iPhoneTsy )
 	                {
-			        CleanupStack::Pop( messageManager );
 TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - CommonTSY successfully opened");
 	                messageManager->SetPhoneTsy( iPhoneTsy );
 	                }
-	            else
-	            	{
-			        CleanupStack::PopAndDestroy( messageManager );
-	            	}
                 }
             else
             	{
--- a/telephonyserverplugins/common_tsy/systemstateplugin/src/ctsysystemstateplugin.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/systemstateplugin/src/ctsysystemstateplugin.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -33,6 +33,7 @@
 	{	
 	// create active object for do RF state changing  
 	iAoChangeRfForEmergencyCall = new (ELeave) CChangeRfForEmergencyCall(*this, iSsmEmergencyCallRf);
+	User::LeaveIfError(Connect());
 	}
 
 CCtsySystemStatePlugin::~CCtsySystemStatePlugin()
@@ -54,12 +55,19 @@
 	TFLOGSTRING("CCtsySystemStatePlugin::Connect()");		
 
 	TInt error (KErrNone);
-	if (!iConnected)	
+	if (!iConnected)	 
 	{	 
-		error = iSsmEmergencyCallRf.Connect(); 	
-		if (KErrNone == error)
+        error = iSsmEmergencyCallRf.Connect();  
+        if (KErrNone != error)
+            {
+            return error; 
+            }
+        iConnected = ETrue; 
+        error = iSsmEmergencyCallRf.SetAsPriorityClient();
+		if (KErrNone != error)
 			{
-			iConnected = ETrue;	
+            TFLOGSTRING2("CCtsySystemStatePlugin::Connect()  - SetAsPriorityClient returned %d", error);
+            error = KErrNone;
 			}
 	}	
 	return error;
@@ -75,18 +83,7 @@
                                                         TCtsySsmCallbackData& aCallbackData)
 	{
 	TFLOGSTRING("CCtsySystemStatePlugin::ActivateRfForEmergencyCall()" );
-	//try to connect
-	TInt err = Connect();
-	if (err)
-		{
-		TFLOGSTRING2("CCtsySystemStatePlugin::ActivateRfForEmergencyCall() failed to connect %d", err);
 
-		// inform CTSY about error...
-		aSsmPluginCallback->SsmPluginCallback(err, aCallbackData);
-		// and do nothing
-		return;
-		}
-					
 	iAoChangeRfForEmergencyCall->ActivateRfForEmergencyCall(aSsmPluginCallback, aCallbackData);	
 	}
 	
@@ -237,7 +234,6 @@
    iBusy = ENotBusy;		
    
    // close SSM
-   iCtsySystemStatePlugin.Close();
    if (iSsmPluginCallback)
       {
 	  // just call callback interface and pass into it error code
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/common_tsy/test/component/group/component_test.pkg	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,51 @@
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_onstore_individual.script"-"c:\testdata\scripts\te_ctsycomponent_onstore_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_packetservice_individual.script"-"c:\testdata\scripts\te_ctsycomponent_packetservice_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_phonebookstore_individual.script"-"c:\testdata\scripts\te_ctsycomponent_phonebookstore_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_packetqos_individual.script"-"c:\testdata\scripts\te_ctsycomponent_packetqos_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_networksecurity_individual.script"-"c:\testdata\scripts\te_ctsycomponent_networksecurity_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_networkcontrol_individual.script"-"c:\testdata\scripts\te_ctsycomponent_networkcontrol_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_packetcontext_individual.script"-"c:\testdata\scripts\te_ctsycomponent_packetcontext_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_airtimeduration_individual.script"-"c:\testdata\scripts\te_ctsycomponent_airtimeduration_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_alternatelineservice_individual.script"-"c:\testdata\scripts\te_ctsycomponent_alternatelineservice_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_phonepower_individual.script"-"c:\testdata\scripts\te_ctsycomponent_phonepower_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_phonesecurity_individual.script"-"c:\testdata\scripts\te_ctsycomponent_phonesecurity_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_personalisation_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_personalisation_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_alternatingcall_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_alternatingcall_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_apncontrollist_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_apncontrollist_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_authorisation_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_authorisation_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_featmgr_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_featmgr_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_systemstate_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_systemstate_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_callemergency_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_callemergency_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_callcontrol_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_callcontrol_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_callinformation_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_callinformation_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_telephonyaudiocontrol_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_telephonyaudiocontrol_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_onstore_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_onstore_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_broadcastmessaging_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_broadcastmessaging_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_callbarring_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_callbarring_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_callcompletion_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_callcompletion_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_callcost_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_callcost_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_eapauthentication_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_eapauthentication_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_mms_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_mms_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_fax_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_fax_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_fixeddialling_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_fixeddialling_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_ims_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_ims_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_indicator_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_indicator_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_lbs_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_lbs_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_mailboxnumbers_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_mailboxnumbers_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_messagewaiting_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_messagewaiting_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_enstore_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_enstore_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\scripts\te_ctsycomponent_mbmscontext_individual.script"-"c:\TestData\Scripts\te_ctsycomponent_mbmscontext_individual.script"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\group\commsdbg.ini"-"c:\logs\commsdbg.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\cenrep_ini\102029A2.txt"-"c:\private\10202be9\102029A2.txt"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\cenrep_ini\10282DFE.txt"-"c:\private\10202be9\10282DFE.txt"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\cenrep_ini\10282826.txt"-"c:\private\10202be9\10282826.txt"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\cenrep_ini\10282827.txt"-"c:\private\10202be9\10282827.txt"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\standard.ini"-"c:\testdata\configs\standard.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001b.ini"-"c:\testdata\configs\testgetphoneid0001b.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001c.ini"-"c:\testdata\configs\testgetphoneid0001c.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001d.ini"-"c:\testdata\configs\testgetphoneid0001d.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001e.ini"-"c:\testdata\configs\testgetphoneid0001e.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001f.ini"-"c:\testdata\configs\testgetphoneid0001f.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001g.ini"-"c:\testdata\configs\testgetphoneid0001g.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001h.ini"-"c:\testdata\configs\testgetphoneid0001h.ini"
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\component\testdata\testgetphoneid0001i.ini"-"c:\testdata\configs\testgetphoneid0001i.ini"
\ No newline at end of file
--- a/telephonyserverplugins/common_tsy/test/component/inc/cctsycustomipcfu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/inc/cctsycustomipcfu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -108,7 +108,9 @@
 	void TestReadViagHomeZoneParams0003L();
 	void TestReadViagHomeZoneParams0004L();
 	void TestReadViagHomeZoneParams0005L();
-	void TestReadViagHomeZoneCache0001L();
+    void TestReadViagHomeZoneCache0001L();
+    void TestReadViagHomeZoneCache0001bL();
+    void TestReadViagHomeZoneCache0001cL();
 	void TestReadViagHomeZoneCache0002L();
 	void TestReadViagHomeZoneCache0003L();
 	void TestReadViagHomeZoneCache0004L();
@@ -330,8 +332,8 @@
 									RMobileCall::TMobileCallStatus aMobileCallStatus,
 									RMobilePhone::TMobileService aMobileService
 									);
-	void OpenPhoneAndCustomAPILC(RMmCustomAPI& aCustomAPI);
-	void MockPrimeEReadViagHomeZoneCacheIPCL(TInt aCacheId,TInt aRecordId, TBool aDoComplete = ETrue, TBool aDoExpect = ETrue);
+	void OpenPhoneAndCustomAPILC(RMmCustomAPI& aCustomAPI, TInt aNtsyError = KErrNone);
+	void MockPrimeEReadViagHomeZoneCacheIPCL(TInt aCacheId,TInt aRecordId, TBool aDoComplete = ETrue, TBool aDoExpect = ETrue, TInt aNtsyError = KErrNone);
 	void FillWithRandomData( RMmCustomAPI::TMmCellInfo& cell, TInt aRnd = 0) const;
 	void FillWithRandomDataLC( RMmCustomAPI::TViagElements*& cell, TInt aRnd = 0) const;
 	void InitSimCbTopicsL(RMmCustomAPI &aCustomApi, const TDesC& aTopic, TInt aNum);
--- a/telephonyserverplugins/common_tsy/test/component/inc/cctsyfixeddiallingfu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/inc/cctsyfixeddiallingfu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -39,7 +39,6 @@
 	void TestDialNoFdnCheck0001bL();
 	void TestDialNoFdnCheck0001cL();
 	void TestDialNoFdnCheck0002L();
-	void TestDialNoFdnCheck0003L();
 	void TestDialNoFdnCheck0004L();
 	void TestDialNoFdnCheck0005L();
 	void TestDialNoFdnCheck0006L();
--- a/telephonyserverplugins/common_tsy/test/component/inc/cctsymailboxnumbersfu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/inc/cctsymailboxnumbersfu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -35,7 +35,10 @@
 public:
 	// Individual test steps
 
-	void TestGetMailboxNumbers0001L();
+    void TestGetMailboxNumbers0001L();
+    void TestGetMailboxNumbers0001bL();
+    void TestGetMailboxNumbers0001cL();
+    void TestGetMailboxNumbers0001dL();
 	void TestGetMailboxNumbers0002L();
 	void TestGetMailboxNumbers0003L();
 	void TestGetMailboxNumbers0004L();
--- a/telephonyserverplugins/common_tsy/test/component/inc/cctsyonstorefu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/inc/cctsyonstorefu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -60,7 +60,10 @@
 	void TestDelete0003L();
 	void TestDelete0004L();
 	void TestDelete0005L();
-	void TestGetInfo0001L();
+    void TestGetInfo0001L();
+    void TestGetInfo0001bL();
+    void TestGetInfo0001cL();
+    void TestGetInfo0001dL();
 	void TestGetInfo0002L();
 	void TestGetInfo0003L();
 	void TestGetInfo0004L();
--- a/telephonyserverplugins/common_tsy/test/component/inc/cctsyphonebookstorefu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/inc/cctsyphonebookstorefu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -137,33 +137,39 @@
 	void TestDelete00028L();
 	void TestDelete00029L();
 	void TestDelete00030L();
-	void TestGetInfo0001L();
+    void TestGetInfo0001L();
+    void TestGetInfo0001bL();
 	//void TestGetInfo0002L();
 	void TestGetInfo0003L();
 	void TestGetInfo0004L();
 	//void TestGetInfo0005L();
 	void TestGetInfo0006L();
-	void TestGetInfo0006bL();
+    void TestGetInfo0006bL();
+    void TestGetInfo0006cL();
 	//void TestGetInfo0007L();
 	void TestGetInfo0008L();
 	void TestGetInfo0009L();
 	//void TestGetInfo00010L();
-	void TestGetInfo00011L();
+    void TestGetInfo00011L();
+    void TestGetInfo00011bL();
 	void TestGetInfo00012L();
 	void TestGetInfo00013L();
 	void TestGetInfo00014L();
 	void TestGetInfo00015L();
-	void TestGetInfo00016L();
+    void TestGetInfo00016L();
+    void TestGetInfo00016bL();
 	void TestGetInfo00017L();
 	void TestGetInfo00018L();
 	void TestGetInfo00019L();
 	void TestGetInfo00020L();
-	void TestGetInfo00021L();
+    void TestGetInfo00021L();
+    void TestGetInfo00021bL();
 	//void TestGetInfo00022L();
 	void TestGetInfo00023L();
 	void TestGetInfo00024L();
 	//void TestGetInfo00025L();
-	void TestGetInfo00026L();
+    void TestGetInfo00026L();
+    void TestGetInfo00026bL();
 	//void TestGetInfo00027L();
 	void TestGetInfo00028L();
 	void TestGetInfo00029L();
@@ -257,6 +263,7 @@
 	void AuxDelete5L(const TDesC& aName);
 
 	void AuxGetInfo1L(const TDesC& aName);
+	void AuxGetInfo1bL(const TDesC& aName);
 	void AuxGetInfo2L(const TDesC& aName);
 	void AuxGetInfo3L(const TDesC& aName);
 	void AuxGetInfo4L(const TDesC& aName);
--- a/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/inc/CMmCustomMessHandlerGsmExt.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/inc/CMmCustomMessHandlerGsmExt.h	Fri Mar 19 09:55:57 2010 +0200
@@ -78,12 +78,6 @@
          * Own.
          */                  
         CMmMessageRouter* iMessageRouter;
-        
-        /*
-         * Pointer to the Custom stub extension
-         * Own.
-         */
-        CMmCustomStubExt* iMmCustomStubExt;
     };
 
 #endif // CMMCUSTOMMESSHANDLERGSMEXT_H
--- a/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/Cmmcustommesshandlergsmext.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/Cmmcustommesshandlergsmext.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -30,7 +30,6 @@
 
 void CMmCustomMessHandlerGsmExt::ConstructL()
     {
-       iMmCustomStubExt = 0;
     }
 
 CMmCustomMessHandlerGsmExt* CMmCustomMessHandlerGsmExt::NewL( 
@@ -69,23 +68,6 @@
 
     switch ( aIpc )
         {
-        
-        case EMmTsyGetCustomVendorExtPtrIPC:
-            {
-            // return pointer to customapi extension
-TFLOGSTRING("TSY: CMmCustomMessHandler::ExtFuncL --- EMmTsyGetCustomVendorExtPtrIPC");
-            CMmCustomVendorExt** extPtr;
-            aDataPackage->UnPackData( &extPtr );
-
-            if ( !iMmCustomStubExt )
-                {
-                iMmCustomStubExt = new ( ELeave ) CMmCustomStubExt( );
-                }
-
-            *extPtr = iMmCustomStubExt;
-            iMmCustomStubExt->SetMessageRouter( iMessageRouter );
-            break;
-            }
        
 		case ECustomCheckAlsPpSupportIPC:
             {
--- a/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmmmessagerouter.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/mockltsy/mockltsy/src/cmmmessagerouter.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -291,7 +291,6 @@
         case ECustomReadHSxPAStatusIPC:
         case ECustomNotifyRauEventIPC:
 
-        case EMmTsyGetCustomVendorExtPtrIPC:
         case ECustomSimLockActivateIPC:
         case ECustomSimLockDeActivateIPC:
         case ECustomSendAPDUReqIPC:
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_callemergency_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_callemergency_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -113,7 +113,7 @@
 //!@SYMTestActions Invokes RMobileCall::DialEmergencyCall with bad parameter data for voice calls
 //!@SYMTestExpectedResults Pass
 //!@SYMTestType CT
-//RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCallEmergencyFU.TestDialEmergencyCall0004L
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCallEmergencyFU.TestDialEmergencyCall0004L
 END_TESTCASE BA-CTSY-CEMG-CDEC-0004
 
 START_TESTCASE BA-CTSY-CEMG-CDEC-0005
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_conferencecallcontrol_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_conferencecallcontrol_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -475,5 +475,5 @@
 //!@SYMTestActions Invokes RMobileConferenceCall::GetMobileCallInfo with bad parameter data
 //!@SYMTestExpectedResults Pass
 //!@SYMTestType CT
-//RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyConferenceCallControlFU.TestGetMobileCallInfo0003L
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyConferenceCallControlFU.TestGetMobileCallInfo0003L
 END_TESTCASE BA-CTSY-CONC-CGMCI-0003
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_customipc_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_customipc_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -568,6 +568,28 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestReadViagHomeZoneCache0001L
 END_TESTCASE BA-CTSY-CIPC-MCRVHZC-0001
 
+START_TESTCASE BA-CTSY-CIPC-MCRVHZC-0001b
+//!@SYMTestCaseID BA-CTSY-CIPC-MCRVHZC-0001b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMmCustomAPI::ReadViagHomeZoneCache when request failed by NTSY
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMmCustomAPI::ReadViagHomeZoneCache
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestReadViagHomeZoneCache0001bL
+END_TESTCASE BA-CTSY-CIPC-MCRVHZC-0001b
+
+START_TESTCASE BA-CTSY-CIPC-MCRVHZC-0001c
+//!@SYMTestCaseID BA-CTSY-CIPC-MCRVHZC-0001c
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMmCustomAPI::ReadViagHomeZoneCache when request complete when customAPI is dead
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMmCustomAPI::ReadViagHomeZoneCache
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestReadViagHomeZoneCache0001cL
+END_TESTCASE BA-CTSY-CIPC-MCRVHZC-0001c
+
 START_TESTCASE BA-CTSY-CIPC-MCRVHZC-0002
 //!@SYMTestCaseID BA-CTSY-CIPC-MCRVHZC-0002
 //!@SYMComponent telephony_ctsy
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_fixeddialling_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_fixeddialling_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -24,7 +24,7 @@
 //!@SYMTestActions Invokes RMobileCall::DialNoFdnCheck for voice calls
 //!@SYMTestExpectedResults Pass
 //!@SYMTestType CT
-//RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyFixedDiallingFU.TestDialNoFdnCheck0001L
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyFixedDiallingFU.TestDialNoFdnCheck0001L
 END_TESTCASE BA-CTSY-FXD-CDNFC-0001
 
 START_TESTCASE BA-CTSY-FXD-CDNFC-0001c
@@ -49,17 +49,6 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyFixedDiallingFU.TestDialNoFdnCheck0002L
 END_TESTCASE BA-CTSY-FXD-CDNFC-0002
 
-START_TESTCASE BA-CTSY-FXD-CDNFC-0003
-//!@SYMTestCaseID BA-CTSY-FXD-CDNFC-0003
-//!@SYMComponent telephony_ctsy
-//!@SYMTestCaseDesc Test support in CTSY for RMobileCall::DialNoFdnCheck with bad parameter data for voice calls
-//!@SYMTestPriority High
-//!@SYMTestActions Invokes RMobileCall::DialNoFdnCheck with bad parameter data for voice calls
-//!@SYMTestExpectedResults Pass
-//!@SYMTestType CT
-RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyFixedDiallingFU.TestDialNoFdnCheck0003L
-END_TESTCASE BA-CTSY-FXD-CDNFC-0003
-
 START_TESTCASE BA-CTSY-FXD-CDNFC-0006b
 //!@SYMTestCaseID BA-CTSY-FXD-CDNFC-0006b
 //!@SYMComponent telephony_ctsy
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_knownfailures_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_knownfailures_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -27,72 +27,6 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCallEmergencyFU.TestDialEmergencyCall0004L
 END_TESTCASE BA-CTSY-CEMG-CDEC-0004
 
-START_TESTCASE BA-CTSY-CIPC-MCRVHZP-0002
-//!@SYMTestCaseID BA-CTSY-CIPC-MCRVHZP-0002
-//!@SYMComponent telephony_ctsy
-//!@SYMTestCaseDesc Test support in CTSY for cancelling of RMmCustomAPI::ReadViagHomeZoneParams
-//!@SYMTestPriority High
-//!@SYMTestActions Invokes cancelling of RMmCustomAPI::ReadViagHomeZoneParams
-//!@SYMTestExpectedResults Pass
-//!@SYMTestType CT
-RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestReadViagHomeZoneParams0002L
-END_TESTCASE BA-CTSY-CIPC-MCRVHZP-0002
-
-START_TESTCASE BA-CTSY-CIPC-MCRVHZP-0003
-//!@SYMTestCaseID BA-CTSY-CIPC-MCRVHZP-0003
-//!@SYMComponent telephony_ctsy
-//!@SYMTestCaseDesc Test support in CTSY for RMmCustomAPI::ReadViagHomeZoneParams with bad parameter data
-//!@SYMTestPriority High
-//!@SYMTestActions Invokes RMmCustomAPI::ReadViagHomeZoneParams with bad parameter data
-//!@SYMTestExpectedResults Pass
-//!@SYMTestType CT
-RUN_TEST_STEP !PanicCode=10 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestReadViagHomeZoneParams0003L
-END_TESTCASE BA-CTSY-CIPC-MCRVHZP-0003
-
-START_TESTCASE BA-CTSY-CIPC-MCRVHZC-0001
-//!@SYMTestCaseID BA-CTSY-CIPC-MCRVHZC-0001
-//!@SYMComponent telephony_ctsy
-//!@SYMTestCaseDesc Test support in CTSY for RMmCustomAPI::ReadViagHomeZoneCache
-//!@SYMTestPriority High
-//!@SYMTestActions Invokes RMmCustomAPI::ReadViagHomeZoneCache
-//!@SYMTestExpectedResults Pass
-//!@SYMTestType CT
-RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestReadViagHomeZoneCache0001L
-END_TESTCASE BA-CTSY-CIPC-MCRVHZC-0001
-
-START_TESTCASE BA-CTSY-CIPC-MCRVHZC-0004
-//!@SYMTestCaseID BA-CTSY-CIPC-MCRVHZC-0004
-//!@SYMComponent telephony_ctsy
-//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMmCustomAPI::ReadViagHomeZoneCache
-//!@SYMTestPriority High
-//!@SYMTestActions Invokes multiple client requests to RMmCustomAPI::ReadViagHomeZoneCache
-//!@SYMTestExpectedResults Pass
-//!@SYMTestType CT
-RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestReadViagHomeZoneCache0004L
-END_TESTCASE BA-CTSY-CIPC-MCRVHZC-0004
-
-START_TESTCASE BA-CTSY-CIPC-MCWVHZC-0001
-//!@SYMTestCaseID BA-CTSY-CIPC-MCWVHZC-0001
-//!@SYMComponent telephony_ctsy
-//!@SYMTestCaseDesc Test support in CTSY for RMmCustomAPI::WriteViagHomeZoneCache
-//!@SYMTestPriority High
-//!@SYMTestActions Invokes RMmCustomAPI::WriteViagHomeZoneCache
-//!@SYMTestExpectedResults Pass
-//!@SYMTestType CT
-RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestWriteViagHomeZoneCache0001L
-END_TESTCASE BA-CTSY-CIPC-MCWVHZC-0001
-
-START_TESTCASE BA-CTSY-CIPC-MCWVHZC-0004
-//!@SYMTestCaseID BA-CTSY-CIPC-MCWVHZC-0004
-//!@SYMComponent telephony_ctsy
-//!@SYMTestCaseDesc Test support in CTSY for multiple client requests to RMmCustomAPI::WriteViagHomeZoneCache
-//!@SYMTestPriority High
-//!@SYMTestActions Invokes multiple client requests to RMmCustomAPI::WriteViagHomeZoneCache
-//!@SYMTestExpectedResults Pass
-//!@SYMTestType CT
-RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyCustomIPCFU.TestWriteViagHomeZoneCache0004L
-END_TESTCASE BA-CTSY-CIPC-MCWVHZC-0004
-
 START_TESTCASE BA-CTSY-FXD-CDNFC-0001
 //!@SYMTestCaseID BA-CTSY-FXD-CDNFC-0001
 //!@SYMComponent telephony_ctsy
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_mailboxnumbers_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_mailboxnumbers_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -27,6 +27,39 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyMailboxNumbersFU.TestGetMailboxNumbers0001L
 END_TESTCASE BA-CTSY-MBXN-MGMN-0001
 
+START_TESTCASE BA-CTSY-MBXN-MGMN-0001b
+//!@SYMTestCaseID BA-CTSY-MBXN-MGMN-0001b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is not exist
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhone::GetMailboxNumbers
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyMailboxNumbersFU.TestGetMailboxNumbers0001bL
+END_TESTCASE BA-CTSY-MBXN-MGMN-0001b
+
+START_TESTCASE BA-CTSY-MBXN-MGMN-0001c
+//!@SYMTestCaseID BA-CTSY-MBXN-MGMN-0001c
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is exist but not ready
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhone::GetMailboxNumbers
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyMailboxNumbersFU.TestGetMailboxNumbers0001cL
+END_TESTCASE BA-CTSY-MBXN-MGMN-0001c
+
+START_TESTCASE BA-CTSY-MBXN-MGMN-0001d
+//!@SYMTestCaseID BA-CTSY-MBXN-MGMN-0001d
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is not exist but another phone book store (ADN) exist
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhone::GetMailboxNumbers
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyMailboxNumbersFU.TestGetMailboxNumbers0001dL
+END_TESTCASE BA-CTSY-MBXN-MGMN-0001d
+
 START_TESTCASE BA-CTSY-MBXN-MGMN-0002
 //!@SYMTestCaseID BA-CTSY-MBXN-MGMN-0002
 //!@SYMComponent telephony_ctsy
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_onstore_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_onstore_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -239,6 +239,39 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyONStoreFU.TestGetInfo0001L
 END_TESTCASE BA-CTSY-PBON-OSGI-0001
 
+START_TESTCASE BA-CTSY-PBON-OSGI-0001b
+//!@SYMTestCaseID BA-CTSY-PBON-OSGI-0001b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobileONStore::GetInfo when there is no ADN store
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobileONStore::GetInfo
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyONStoreFU.TestGetInfo0001bL
+END_TESTCASE BA-CTSY-PBON-OSGI-0001b
+
+START_TESTCASE BA-CTSY-PBON-OSGI-0001c
+//!@SYMTestCaseID BA-CTSY-PBON-OSGI-0001c
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobileONStore::GetInfo when there is no ADN store and another store is initilize 
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobileONStore::GetInfo
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyONStoreFU.TestGetInfo0001cL
+END_TESTCASE BA-CTSY-PBON-OSGI-0001c
+
+START_TESTCASE BA-CTSY-PBON-OSGI-0001d
+//!@SYMTestCaseID BA-CTSY-PBON-OSGI-0001d
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobileONStore::GetInfo when there is no ADN store and SIM is not ready
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobileONStore::GetInfo
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyONStoreFU.TestGetInfo0001dL
+END_TESTCASE BA-CTSY-PBON-OSGI-0001d
+
 START_TESTCASE BA-CTSY-PBON-OSGI-0002
 //!@SYMTestCaseID BA-CTSY-PBON-OSGI-0002
 //!@SYMComponent telephony_ctsy
--- a/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_phonebookstore_individual.script	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/scripts/te_ctsycomponent_phonebookstore_individual.script	Fri Mar 19 09:55:57 2010 +0200
@@ -1148,6 +1148,17 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo0001L
 END_TESTCASE BA-CTSY-PBSTR-PBSGI-0001
 
+START_TESTCASE BA-CTSY-PBSTR-PBSGI-0001b
+//!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0001b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for ADN phonebook with slow SIM
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for ADN phonebook
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo0001bL
+END_TESTCASE BA-CTSY-PBSTR-PBSGI-0001b
+
 START_TESTCASE BA-CTSY-PBSTR-PBSGI-0003
 //!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0003
 //!@SYMComponent telephony_ctsy
@@ -1192,6 +1203,17 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo0006bL
 END_TESTCASE BA-CTSY-PBSTR-PBSGI-0006b
 
+START_TESTCASE BA-CTSY-PBSTR-PBSGI-0006c
+//!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0006c
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for FDN phonebook with slow SIM
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for FDN phonebook
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo0006cL
+END_TESTCASE BA-CTSY-PBSTR-PBSGI-0006c
+
 START_TESTCASE BA-CTSY-PBSTR-PBSGI-0008
 //!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0008
 //!@SYMComponent telephony_ctsy
@@ -1225,6 +1247,17 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00011L
 END_TESTCASE BA-CTSY-PBSTR-PBSGI-00011
 
+START_TESTCASE BA-CTSY-PBSTR-PBSGI-00011b
+//!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00011b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for SDN phonebook with slow SIM
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for SDN phonebook
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00011bL
+END_TESTCASE BA-CTSY-PBSTR-PBSGI-00011b
+
 START_TESTCASE BA-CTSY-PBSTR-PBSGI-00012
 //!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00012
 //!@SYMComponent telephony_ctsy
@@ -1280,6 +1313,17 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00016L
 END_TESTCASE BA-CTSY-PBSTR-PBSGI-00016
 
+START_TESTCASE BA-CTSY-PBSTR-PBSGI-00016b
+//!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00016b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for VMBX phonebook with slow SIM
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for VMBX phonebook
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00016bL
+END_TESTCASE BA-CTSY-PBSTR-PBSGI-00016b
+
 START_TESTCASE BA-CTSY-PBSTR-PBSGI-00017
 //!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00017
 //!@SYMComponent telephony_ctsy
@@ -1335,6 +1379,17 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00021L
 END_TESTCASE BA-CTSY-PBSTR-PBSGI-00021
 
+START_TESTCASE BA-CTSY-PBSTR-PBSGI-00021b
+//!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00021b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for BDN phonebook with slow SIM
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for BDN phonebook
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00021bL
+END_TESTCASE BA-CTSY-PBSTR-PBSGI-00021b
+
 START_TESTCASE BA-CTSY-PBSTR-PBSGI-00023
 //!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00023
 //!@SYMComponent telephony_ctsy
@@ -1368,6 +1423,17 @@
 RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00026L
 END_TESTCASE BA-CTSY-PBSTR-PBSGI-00026
 
+START_TESTCASE BA-CTSY-PBSTR-PBSGI-00026b
+//!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00026b
+//!@SYMComponent telephony_ctsy
+//!@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for MBDN phonebook with slow SIM
+//!@SYMTestPriority High
+//!@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for MBDN phonebook
+//!@SYMTestExpectedResults Pass
+//!@SYMTestType CT
+RUN_TEST_STEP 100 te_ctsy_component TEFUnit.CCTsyPhoneBookStoreFU.TestGetInfo00026bL
+END_TESTCASE BA-CTSY-PBSTR-PBSGI-00026b
+
 START_TESTCASE BA-CTSY-PBSTR-PBSGI-00028
 //!@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00028
 //!@SYMComponent telephony_ctsy
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsycallemergencyfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsycallemergencyfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -282,9 +282,7 @@
 	User::__DbgSetAllocFail(EFalse, RAllocator::ENone, 1);
 	User::__DbgSetAllocFail(ETrue, RAllocator::ENone, 1);
 
-	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: Dependent on Symbian System State Manager.  DEF141353 </font>"), 210106);
-	    // Symbian SSM allocates memory in call to Connect() in ActivateRfForEmergencyCall
-	   
+   
 	// check results
 	ASSERT_EQUALS(KErrNone, reqStatus.Int());
 	AssertMockLtsyStatusL();
@@ -677,126 +675,9 @@
 	TMockLtsyCallData1<RMobileCall::TMobileCallStatus> completeCallStatusData2(KCallId2, KMobileService, mobileCallStatus);
 
 	//-------------------------------------------------------------------------
-	// Test requesting RMobileCall::DialEmergencyCall 
-	// when pending RCall::Dial
- 	//-------------------------------------------------------------------------
-
-	// create pending dial request
-	RMobileCall::TMobileCallParamsV1 expDialCallParams;
-	expDialCallParams.iInterval = 0;
-	expDialCallParams.iCug.iCugIndex = 0xFFFF;
-	expDialCallParams.iSpeakerControl = 
-        RCall::EMonitorSpeakerControlOnUntilCarrier;
-	expDialCallParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeLow;
-	expDialCallParams.iWaitForDialTone = RCall::EDialToneWait;
-	expDialCallParams.iIdRestrict = RMobileCall::EIdRestrictDefault;
-	expDialCallParams.iCug.iExplicitInvoke = EFalse;
-	expDialCallParams.iCug.iSuppressPrefCug = EFalse;
-	expDialCallParams.iCug.iSuppressOA = EFalse;
-	expDialCallParams.iAutoRedial = EFalse;
-	
-    
-	RMobileCall::TMobileCallInfoV8 expDialCallInfo;
-	_LIT(KPhoneNumber, "101632960000");   	
-	expDialCallInfo.iDialledParty.iTelNumber.Copy(KPhoneNumber);
-	expDialCallInfo.iService = KMobileService;
-	expDialCallInfo.iValid = RMobileCall::KCallDialledParty|RMobileCall::KCallAlternating;
-	expDialCallInfo.iDialledParty.iNumberPlan = 
-            RMobilePhone::EUnknownNumberingPlan;
-	expDialCallInfo.iDialledParty.iTypeOfNumber = 
-	        RMobilePhone::EUnknownNumber;
-	expDialCallInfo.iAlternatingCall = 
-	        RMobilePhone::EAlternatingModeUnspecified;
-
-	
-	TMockLtsyCallData2<RMobileCall::TMobileCallParamsV1, RMobileCall::TMobileCallInfoV1> 
-		dialExpectData(0, KMobileService, expDialCallParams, expDialCallInfo);
-
-    data.Close();
-    dialExpectData.SerialiseL(data);
-	iMockLTSY.ExpectL(EEtelCallDial, data);
-
-    data.Close();
-    completeDialCallInfoData.SerialiseL(data);
-    iMockLTSY.CompleteL(EMobileCallGetMobileCallInfo, KErrNone, data, 10);
-
-    data.Close();
-    mobileCallStatus = RMobileCall::EStatusDialling;
-    completeCallStatusData.SerialiseL(data);
-    iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data, 10);
-
-	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 210106);
-	// Test fails, TEF aborts the test and all the following
-	// Actually DialEmergencyCall completes with KErrServerBusy
-	
-	// following assert is added to prevent test abortions
-	ASSERT_TRUE( EFalse );
-
-	TRequestStatus dialStatus;
-	mobileCall.Dial(dialStatus, KPhoneNumber);
-
-	// prepare test
-
-	// prepare canceling dial request
-    data.Close();
-	TInt hangUpCause = KErrGsmReleaseByUser;
-	TBool autoStChangeDisable = ETrue;
-    TMockLtsyCallData2<TInt, TBool> expHangupData(KCallId, KMobileService, 
-                                             hangUpCause, 
-                                             autoStChangeDisable);
-    expHangupData.SerialiseL(data);
-    iMockLTSY.ExpectL(EEtelCallHangUp, data);
-
-    data.Close();
-    mobileCallStatus = RMobileCall::EStatusIdle;
-    completeCallStatusData.SerialiseL(data);
-    iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, hangUpCause, data, 10);
-
-	// prepare dialling emergency call
-    data.Close();
-	numberLtsyData.SerialiseL(data);
-	iMockLTSY.ExpectL(EMobileCallDialEmergencyCall, data, KErrNone);
-
-    data.Close();
-    completeCallInfoData.SerialiseL(data);
-    iMockLTSY.CompleteL(EMobileCallGetMobileCallInfo, KErrNone, data);
-
-    data.Close();
-    mobileCallStatus = RMobileCall::EStatusDialling;
-    completeCallStatusData.SerialiseL(data);
-    iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
-
-    data.Close();
-    mobileCallStatus = RMobileCall::EStatusConnecting;
-    completeCallStatusData.SerialiseL(data);
-    iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
-
-    data.Close();
-    mobileCallStatus = RMobileCall::EStatusConnected;
-    completeCallStatusData.SerialiseL(data);
-    iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
-
-	// actual test
-	mobileCall.DialEmergencyCall(reqStatus, number);
-
-	User::WaitForRequest(dialStatus);
-	ASSERT_EQUALS(KErrCancel, dialStatus.Int());
-
-	User::WaitForRequest(reqStatus);
-	ASSERT_EQUALS(KErrNone, reqStatus.Int());
-
-	PrepareCallCloseL(KCallId, KMobileService);
-	CleanupStack::PopAndDestroy(&mobileCall);
-	AssertMockLtsyStatusL();
-
-	//-------------------------------------------------------------------------
 	// Test A: Test multiple clients requesting RMobileCall::DialEmergencyCall
  	//-------------------------------------------------------------------------
 
-	err = mobileCall.OpenNewCall(line, callName);
-	ASSERT_EQUALS(KErrNone, err);
-	CleanupClosePushL(mobileCall);
-
 	// Open second client
 	RTelServer telServer2;
 	err = telServer2.Connect();
@@ -871,11 +752,7 @@
 	User::WaitForRequest(reqStatus2);
 	AssertMockLtsyStatusL();
 	ASSERT_EQUALS(KErrNone, reqStatus.Int());
-	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 210104);
-	// Second completion with EMobileCallGetMobileCallInfo ipc
-	// changes callid of 1st call from 1 to 2
-	// can not invoke completions for 2nd call 
-	ASSERT_EQUALS(KErrNone, reqStatus2.Int()); // KErrTimedOut
+	ASSERT_EQUALS(KErrNone, reqStatus2.Int());
 
 	// Done !
 	CleanupStack::PopAndDestroy(8, this); // mobileCall2, line2, phone2, telServer2, mobileCall, line, data, this
@@ -953,62 +830,6 @@
 
 	AssertMockLtsyStatusL();
 
-	//-------------------------------------------------------------------------
-	// Test: Test timeout of RMobileCall::DialEmergencyCall
-	// when call status is changed to RMobileCall::EStatusDialling
- 	//-------------------------------------------------------------------------
-
-	data.Close();
-	numberLtsyData.SerialiseL(data);
-	iMockLTSY.ExpectL(EMobileCallDialEmergencyCall, data, KErrNone);
-
-	data.Close();
-	completeCallInfoData.SerialiseL(data);
-	iMockLTSY.CompleteL(EMobileCallGetMobileCallInfo, KErrNone, data);
-
-	RMobileCall::TMobileCallStatus mobileCallStatus = RMobileCall::EStatusDialling;
-	TMockLtsyCallData1<RMobileCall::TMobileCallStatus> completeCallStatusData(KCallId, KMobileService, mobileCallStatus);
-	data.Close();
-	completeCallStatusData.SerialiseL(data);
-	iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
-
-	mobileCall.DialEmergencyCall(reqStatus, number);
-	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 210107);
-	// TEF aborts the test
-	User::WaitForRequest(reqStatus);
-	ASSERT_EQUALS(KErrTimedOut, reqStatus.Int());
-
-	AssertMockLtsyStatusL();
-
-	//-------------------------------------------------------------------------
-	// Test: Test timeout of RMobileCall::DialEmergencyCall
-	// when call status is changed to RMobileCall::EStatusConnecting
- 	//-------------------------------------------------------------------------
-
-	data.Close();
-	numberLtsyData.SerialiseL(data);
-	iMockLTSY.ExpectL(EMobileCallDialEmergencyCall, data, KErrNone);
-
-	data.Close();
-	completeCallInfoData.SerialiseL(data);
-	iMockLTSY.CompleteL(EMobileCallGetMobileCallInfo, KErrNone, data);
-
-	data.Close();
-	mobileCallStatus = RMobileCall::EStatusDialling;
-	completeCallStatusData.SerialiseL(data);
-	iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
-
-	data.Close();
-	mobileCallStatus = RMobileCall::EStatusConnecting;
-	completeCallStatusData.SerialiseL(data);
-	iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
-
-	mobileCall.DialEmergencyCall(reqStatus, number);
-	User::WaitForRequest(reqStatus);
-	ASSERT_EQUALS(KErrTimedOut, reqStatus.Int());
-
-	AssertMockLtsyStatusL();
-
 	CleanupStack::PopAndDestroy(2); // mobileCall, line
 	CleanupStack::PopAndDestroy(2, this); // data, this
 
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyconferencecallcontrolfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyconferencecallcontrolfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -3337,6 +3337,7 @@
 
 	OpenEtelServerL(EUseExtendedError);
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
+	
 	OpenPhoneL();
 
 	RBuf8 data;
@@ -3419,14 +3420,7 @@
 	TRequestStatus mockLtsyStatus;
 	iMockLTSY.NotifyTerminated(mockLtsyStatus);      
 	iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, data);
-	    
-	// when call becomes idle, remaining duration of the call is added to life time param in LTSY:		
-	TUint32 duration = 5;	// this is a dummy value, which won't be checked by mocksy engine
-	TMockLtsyData1<TUint32> ltsyData( duration );
-	data.Close();
-	ltsyData.SerialiseL(data);	
-	iMockLTSY.ExpectL(EMmTsyUpdateLifeTimeIPC, data);	            
-	    
+	 
 	User::WaitForRequest(mockLtsyStatus); 	
 	ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());   	
 
@@ -3434,7 +3428,7 @@
 	User::WaitForRequest(reqStatus);
 	// CTSY has no cancel for this ipc, so request completes with KErrNone
 	ASSERT_EQUALS(KErrNone, reqStatus.Int());
-
+	
 	AssertMockLtsyStatusL();
 	CleanupStack::PopAndDestroy(10, this); // call5, call4, call3, call2, call, line, callsInConference, conferenceCall, data, this
 	
@@ -4389,9 +4383,6 @@
 	// RMobileConferenceCall::GetMobileCallInfo
  	//-------------------------------------------------------------------------
 
-	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 201701);	
-    ASSERT_TRUE(EFalse);
-
 	TBuf8<1> smallSizeBuf;
 	res = conferenceCall.GetMobileCallInfo(0, smallSizeBuf);
     ASSERT_TRUE(KErrNone != res);
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsycustomipcfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsycustomipcfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -36,6 +36,7 @@
 const TInt KViagHomeZoneCacheIdMax = KPhEngMaxViagHomeZones;
 const TInt KViagHomeZoneCacheRecordIdMin = 0;
 const TInt KViagHomeZoneCacheRecordIdMax = KPhEngMaxCacheId - 1;
+const TInt KOneSecond=1000000;  // Used in a time out function, 1 second (in microSeconds)
 
 CTestSuite* CCTsyCustomIPCFU::CreateSuiteL(const TDesC& aName)
 	{
@@ -102,7 +103,9 @@
 	ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneParams0004L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneParams0005L);
 	
-	ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneCache0001L);
+    ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneCache0001L);
+    ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneCache0001bL);
+    ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneCache0001cL);
 	ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneCache0002L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneCache0003L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyCustomIPCFU, TestReadViagHomeZoneCache0004L);
@@ -4641,72 +4644,326 @@
 @SYMTestType CT
 */
 void CCTsyCustomIPCFU::TestReadViagHomeZoneCache0001L()
-	{
-	OpenEtelServerL(EUseExtendedError);
-	CleanupStack::PushL(TCleanupItem(Cleanup,this));
-
-	RMmCustomAPI customAPI;
-
-	//----------------------------------------------
-	// TEST D: CTSY will get results from the cache.
- 	//----------------------------------------------
-
-	//********************************************************************************
-	//* To initialize the VIAG home zone cache properly RMmCustomAPI::OpenL should be
-	//* invoked _before_ EMmTsyBootNotifySimStatusReadyIPC is triggered.
-	//* That's why OpenPhoneAndCustomAPILC was implemented and is used here 
-	//* instead of usual OpenPhoneL/OpenCustomAPILC sequence.
-	//********************************************************************************
-
-	OpenPhoneAndCustomAPILC(customAPI);
-
-	for(TInt c = KViagHomeZoneCacheIdMin; c <= KViagHomeZoneCacheIdMin; c++)
-		{
-		for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
-			{			
-			RMmCustomAPI::TViagCacheRecordId recId;
-			recId.iCacheId  = c; 
-			recId.iRecordId = r;
-		
-			RMmCustomAPI::TViagCacheRecordContent recContent;
-
-			TRequestStatus reqStatus;
-			customAPI.ReadViagHomeZoneCache(reqStatus,recId,recContent);
-			User::WaitForRequest(reqStatus);
-
-			ASSERT_EQUALS(KErrNone,reqStatus.Int());
-			
-			const RMmCustomAPI::TViagCacheRecordContent& expectedContent =
-				iViagHomeZoneCache[c - KViagHomeZoneCacheIdMin][r - KViagHomeZoneCacheRecordIdMin];
-			ASSERT_EQUALS(expectedContent.iLac, recContent.iLac);
-			ASSERT_EQUALS(expectedContent.iCellId, recContent.iCellId);
-			}
-		}	
-
-	AssertMockLtsyStatusL();
-
-	//-------------------------------------------------------------------------
-	// TEST E: Unsolicited completion of RMmCustomAPI::ReadViagHomeZoneCache
-	// from LTSY.
- 	//-------------------------------------------------------------------------
-
-	// unsolicited EReadViagHomeZoneCacheIPC completion crashes CTSY
-	
-	RMmCustomAPI::TViagCacheRecordContent unsolicitedData;
-	TPckgC<RMmCustomAPI::TViagCacheRecordContent> unsolicitedDataPckg(unsolicitedData);
-	unsolicitedData.iCellId = 111;
-	unsolicitedData.iLac = 222;
-	
-	TRequestStatus mockLtsyStatus;
-	iMockLTSY.NotifyTerminated(mockLtsyStatus);
-	iMockLTSY.CompleteL(EReadViagHomeZoneCacheIPC,KErrNone,unsolicitedDataPckg);
-
-	User::WaitForRequest(mockLtsyStatus);
-	ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
-	AssertMockLtsyStatusL();
-	
-	CleanupStack::PopAndDestroy(2, this); // customAPI, this
-	}
+    {
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+
+    RMmCustomAPI customAPI;
+
+    //----------------------------------------------
+    // TEST D: CTSY will get results from the cache.
+    //----------------------------------------------
+
+    //********************************************************************************
+    //* To initialize the VIAG home zone cache properly RMmCustomAPI::OpenL should be
+    //* invoked _before_ EMmTsyBootNotifySimStatusReadyIPC is triggered.
+    //* That's why OpenPhoneAndCustomAPILC was implemented and is used here 
+    //* instead of usual OpenPhoneL/OpenCustomAPILC sequence.
+    //********************************************************************************
+
+    OpenPhoneAndCustomAPILC(customAPI);
+
+    for(TInt c = KViagHomeZoneCacheIdMin; c <= KViagHomeZoneCacheIdMin; c++)
+        {
+        for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
+            {           
+            RMmCustomAPI::TViagCacheRecordId recId;
+            recId.iCacheId  = c; 
+            recId.iRecordId = r;
+        
+            RMmCustomAPI::TViagCacheRecordContent recContent;
+
+            TRequestStatus reqStatus;
+            customAPI.ReadViagHomeZoneCache(reqStatus,recId,recContent);
+            User::WaitForRequest(reqStatus);
+
+            ASSERT_EQUALS(KErrNone,reqStatus.Int());
+            
+            const RMmCustomAPI::TViagCacheRecordContent& expectedContent =
+                iViagHomeZoneCache[c - KViagHomeZoneCacheIdMin][r - KViagHomeZoneCacheRecordIdMin];
+            ASSERT_EQUALS(expectedContent.iLac, recContent.iLac);
+            ASSERT_EQUALS(expectedContent.iCellId, recContent.iCellId);
+            }
+        }   
+
+    AssertMockLtsyStatusL();
+
+    //-------------------------------------------------------------------------
+    // TEST E: Unsolicited completion of RMmCustomAPI::ReadViagHomeZoneCache
+    // from LTSY.
+    //-------------------------------------------------------------------------
+
+    // unsolicited EReadViagHomeZoneCacheIPC completion crashes CTSY
+    
+    RMmCustomAPI::TViagCacheRecordContent unsolicitedData;
+    TPckgC<RMmCustomAPI::TViagCacheRecordContent> unsolicitedDataPckg(unsolicitedData);
+    unsolicitedData.iCellId = 111;
+    unsolicitedData.iLac = 222;
+    
+    TRequestStatus mockLtsyStatus;
+    iMockLTSY.NotifyTerminated(mockLtsyStatus);
+    iMockLTSY.CompleteL(EReadViagHomeZoneCacheIPC,KErrNone,unsolicitedDataPckg);
+
+    User::WaitForRequest(mockLtsyStatus);
+    ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
+    AssertMockLtsyStatusL();
+    
+    CleanupStack::PopAndDestroy(2, this); // customAPI, this
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-CIPC-MCRVHZC-0001b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMmCustomAPI::ReadViagHomeZoneCache when request failed by NTSY
+@SYMTestPriority High
+@SYMTestActions Invokes RMmCustomAPI::ReadViagHomeZoneCache
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyCustomIPCFU::TestReadViagHomeZoneCache0001bL()
+    {
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+
+    RMmCustomAPI customAPI;
+
+    //********************************************************************************
+    //* To initialize the VIAG home zone cache properly RMmCustomAPI::OpenL should be
+    //* invoked _before_ EMmTsyBootNotifySimStatusReadyIPC is triggered.
+    //* That's why OpenPhoneAndCustomAPILC was implemented and is used here 
+    //* instead of usual OpenPhoneL/OpenCustomAPILC sequence.
+    //********************************************************************************
+
+    OpenPhoneAndCustomAPILC(customAPI, KErrGeneral);
+    
+    // Complete with an error
+    MockPrimeEReadViagHomeZoneCacheIPCL(KViagHomeZoneCacheIdMin, KViagHomeZoneCacheRecordIdMin, ETrue, ETrue, KErrGeneral);
+
+    RMmCustomAPI::TViagCacheRecordContent recContent;
+    TRequestStatus reqStatus;
+    RMmCustomAPI::TViagCacheRecordId recId;
+    recId.iCacheId  = 2; 
+    recId.iRecordId = 2;
+    customAPI.ReadViagHomeZoneCache(reqStatus, recId, recContent);
+    User::WaitForRequest(reqStatus);
+
+    ASSERT_EQUALS(KErrGeneral,reqStatus.Int());
+
+    //complete without an error
+    for(TInt c = KViagHomeZoneCacheIdMin; c <= KViagHomeZoneCacheIdMax; c++)
+        {
+        for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
+            {
+            MockPrimeEReadViagHomeZoneCacheIPCL(c,r, ETrue, ETrue, KErrNone);
+            }
+        }
+
+    
+    for(TInt c = KViagHomeZoneCacheIdMin; c <= KViagHomeZoneCacheIdMin; c++)
+        {
+        for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
+            {           
+            recId.iCacheId  = c; 
+            recId.iRecordId = r;
+            customAPI.ReadViagHomeZoneCache(reqStatus,recId,recContent);
+            User::WaitForRequest(reqStatus);
+
+            ASSERT_EQUALS(KErrNone,reqStatus.Int());
+            
+            const RMmCustomAPI::TViagCacheRecordContent& expectedContent =
+                iViagHomeZoneCache[c - KViagHomeZoneCacheIdMin][r - KViagHomeZoneCacheRecordIdMin];
+            ASSERT_EQUALS(expectedContent.iLac, recContent.iLac);
+            ASSERT_EQUALS(expectedContent.iCellId, recContent.iCellId);
+            }
+        }   
+
+    AssertMockLtsyStatusL();
+
+
+    CleanupStack::PopAndDestroy(2, this); // customAPI, this
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-CIPC-MCRVHZC-0001c
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMmCustomAPI::ReadViagHomeZoneCache when request complete when customAPI is dead
+@SYMTestPriority High
+@SYMTestActions Invokes RMmCustomAPI::ReadViagHomeZoneCache
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyCustomIPCFU::TestReadViagHomeZoneCache0001cL()
+    {
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+    RBuf8 data;
+    data.CleanupClosePushL();
+
+    RMmCustomAPI customAPI;
+    CleanupClosePushL(customAPI);
+    TInt err = iPhone.Open(iTelServer,KMmTsyPhoneName);
+    ASSERT_EQUALS(KErrNone, err);
+
+    err=iMockLTSY.Connect();
+    ASSERT_EQUALS(KErrNone, err);
+
+    RMmCustomAPI::TViagCacheRecordId currentlyRetrievedCache;
+    currentlyRetrievedCache.iCacheId    = 1;
+    currentlyRetrievedCache.iRecordId   = 0;        
+    TMockLtsyData1 <RMmCustomAPI::TViagCacheRecordId> ltsyData(currentlyRetrievedCache);
+
+    // Only Expect, no complete
+    MockPrimeEReadViagHomeZoneCacheIPCL(KViagHomeZoneCacheIdMin, KViagHomeZoneCacheRecordIdMin, EFalse, ETrue );
+
+    TRequestStatus mockLtsyStatus;
+    iMockLTSY.NotifyTerminated(mockLtsyStatus);
+
+    //************************************************************
+    //* Invoke RMmCustomAPI::Open prior to triggering any further 
+    //* CTSY events including EMmTsyBootNotifySimStatusReadyIPC
+    //************************************************************
+    err = customAPI.Open(iPhone);
+    ASSERT_EQUALS(KErrNone, err);
+
+    // EMmTsyBootNotifyModemStatusReadyIPC
+    iMockLTSY.CompleteL(EMmTsyBootNotifyModemStatusReadyIPC,KErrNone);
+
+    // EMobilePhoneGetNetworkRegistrationStatus
+    iMockLTSY.ExpectL(EMobilePhoneGetNetworkRegistrationStatus);
+    iMockLTSY.CompleteL(EMobilePhoneGetNetworkRegistrationStatus,KErrNone,0);
+
+    // EMmTsyBootNotifySimStatusReadyIPC
+    iMockLTSY.ExpectL(EMmTsyBootNotifySimStatusReadyIPC);
+    iMockLTSY.CompleteL(EMmTsyBootNotifySimStatusReadyIPC,KErrNone,0);
+
+    
+    // EMobilePhoneGetHomeNetwork
+    RMobilePhone::TMobilePhoneNetworkInfoV5 homeNetwork;
+    homeNetwork.iMode = RMobilePhone::ENetworkModeWcdma;
+    homeNetwork.iStatus = RMobilePhone::ENetworkStatusCurrent;
+    homeNetwork.iBandInfo = RMobilePhone::EBandUnknown;
+    homeNetwork.iCountryCode = _L("234");
+    homeNetwork.iCdmaSID = _L("");
+    homeNetwork.iAnalogSID = _L("");
+    homeNetwork.iNetworkId = _L("23499");
+    homeNetwork.iDisplayTag = _L("symbian");
+    homeNetwork.iShortName = _L("symbian");
+    homeNetwork.iLongName = _L("symbian mobile");
+    homeNetwork.iAccess = RMobilePhone::ENetworkAccessUtran;
+    homeNetwork.iEgprsAvailableIndicator = ETrue;
+    homeNetwork.iHsdpaAvailableIndicator = ETrue;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneNetworkInfoV5> homeNetworkData(homeNetwork);
+    homeNetworkData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMobilePhoneGetHomeNetwork);
+    iMockLTSY.CompleteL(EMobilePhoneGetHomeNetwork,KErrNone,data,0);
+
+    // EMmTsyPhoneGetPin1DisableSupportedIPC
+    TBool pin1DisableSupport = ETrue;
+    TMockLtsyData1<TBool> pin1DisableSupportData(pin1DisableSupport);
+    data.Close();
+    pin1DisableSupportData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMmTsyPhoneGetPin1DisableSupportedIPC);
+    iMockLTSY.CompleteL(EMmTsyPhoneGetPin1DisableSupportedIPC,KErrNone,data,0);
+
+    // EMmTsySimRefreshRegisterIPC
+    iMockLTSY.ExpectL(EMmTsySimRefreshRegisterIPC);
+    iMockLTSY.CompleteL(EMmTsySimRefreshRegisterIPC, KErrGeneral, 0);       
+
+    // EMobilePhoneGetServiceTable
+    RMobilePhone::TMobilePhoneServiceTable serviceTable = RMobilePhone::ESIMServiceTable;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneServiceTable> serviceTableData(serviceTable);
+    data.Close();
+    serviceTableData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMobilePhoneGetServiceTable, data);
+    RMobilePhone::TMobilePhoneServiceTableV1 serviceTableResult;
+    serviceTableResult.iServices1To8  = 0xFF;
+    serviceTableResult.iServices9To16 = 0xFF;
+    serviceTableResult.iServices17To24= 0xFF;
+    serviceTableResult.iServices25To32= 0xFF;
+    serviceTableResult.iServices33To40= 0xFF;
+    serviceTableResult.iServices41To48= 0xFF;
+    serviceTableResult.iServices49To56= 0xFF;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneServiceTableV1> serviceTableResultData(serviceTableResult);
+    data.Close();
+    serviceTableResultData.SerialiseL(data);
+    iMockLTSY.CompleteL(EMobilePhoneGetServiceTable,KErrNone,data,0);
+    
+    // EMobilePhoneGetALSLine
+    RMobilePhone::TMobilePhoneALSLine alsLine = RMobilePhone::EAlternateLinePrimary;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneALSLine> alsLineData(alsLine);
+    data.Close();
+    alsLineData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMobilePhoneGetALSLine);
+    iMockLTSY.CompleteL(EMobilePhoneGetALSLine,KErrNone,data,0);
+
+    // ECustomGetIccCallForwardingStatusIPC
+    iMockLTSY.ExpectL(ECustomGetIccCallForwardingStatusIPC);    
+
+    // EMobilePhoneGetIccMessageWaitingIndicators
+    RMobilePhone::TMobilePhoneMessageWaitingV1 expectedMessageIndicators;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneMessageWaitingV1>
+                                    indicatorsData(expectedMessageIndicators);
+    data.Close();
+    indicatorsData.SerialiseL(data); 
+    iMockLTSY.ExpectL(EMobilePhoneGetIccMessageWaitingIndicators);
+    iMockLTSY.CompleteL(EMobilePhoneGetIccMessageWaitingIndicators, KErrNone, data);
+
+    iMockLTSY.ExpectL(ECustomCheckAlsPpSupportIPC);
+    iMockLTSY.ExpectL(EMobilePhoneGetCustomerServiceProfile);
+    
+
+    User::WaitForRequest(mockLtsyStatus);
+    ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
+
+    // Close the customAPI.
+    CleanupStack::PopAndDestroy(&customAPI);
+    // Wait for server to clear...
+    User::After(KOneSecond);
+
+    // ECustomGetIccCallForwardingStatusIPC
+    iMockLTSY.ExpectL(ECustomGetIccCallForwardingStatusIPC); 
+    
+    for(TInt c = KViagHomeZoneCacheIdMin; c <= KViagHomeZoneCacheIdMax; c++)
+        {
+        for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
+            {
+            MockPrimeEReadViagHomeZoneCacheIPCL(c,r, ETrue, ETrue, KErrNone);
+            }
+        }
+
+    // Open another client
+    RMmCustomAPI customAPI2;
+    CleanupClosePushL(customAPI2);
+    ASSERT_EQUALS(KErrNone,customAPI2.Open(iPhone));
+    
+
+    
+    for(TInt c = KViagHomeZoneCacheIdMin; c <= KViagHomeZoneCacheIdMin; c++)
+        {
+        for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
+            {           
+            TRequestStatus reqStatus;
+            RMmCustomAPI::TViagCacheRecordId recId;
+            recId.iCacheId  = c; 
+            recId.iRecordId = r;
+            RMmCustomAPI::TViagCacheRecordContent recContent;
+            customAPI2.ReadViagHomeZoneCache(reqStatus,recId,recContent);
+            User::WaitForRequest(reqStatus);
+
+            ASSERT_EQUALS(KErrNone,reqStatus.Int());
+            
+            const RMmCustomAPI::TViagCacheRecordContent& expectedContent =
+                iViagHomeZoneCache[c - KViagHomeZoneCacheIdMin][r - KViagHomeZoneCacheRecordIdMin];
+            ASSERT_EQUALS(expectedContent.iLac, recContent.iLac);
+            ASSERT_EQUALS(expectedContent.iCellId, recContent.iCellId);
+            }
+        }   
+
+    AssertMockLtsyStatusL();
+
+
+    CleanupStack::PopAndDestroy(3, this); // customAPI2, data, this
+    }
 
 
 /**
@@ -18864,7 +19121,7 @@
  * _before_ EMmTsyBootNotifySimStatusReadyIPC CTSY event is triggered and thus
  * let the Viag Home Zome Cache to be initialized. 
  */
-void CCTsyCustomIPCFU::OpenPhoneAndCustomAPILC(RMmCustomAPI& aCustomAPI)
+void CCTsyCustomIPCFU::OpenPhoneAndCustomAPILC(RMmCustomAPI& aCustomAPI, TInt aNtsyError)
 	{
     CleanupClosePushL(aCustomAPI);
 	TInt err = iPhone.Open(iTelServer,KMmTsyPhoneName);
@@ -18886,7 +19143,13 @@
          {
          for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
              {
-             MockPrimeEReadViagHomeZoneCacheIPCL(c,r);
+             MockPrimeEReadViagHomeZoneCacheIPCL(c,r, ETrue, ETrue, aNtsyError);
+             if(aNtsyError != KErrNone)
+                 {
+                 // got error, send only once
+                 c = KViagHomeZoneCacheIdMax + 1;
+                 r = KViagHomeZoneCacheRecordIdMax + 1;
+                 }
              }
          }
 
@@ -18990,7 +19253,13 @@
 		{
 		for(TInt r = KViagHomeZoneCacheRecordIdMin; r <= KViagHomeZoneCacheRecordIdMax; r++)
 			{
-			MockPrimeEReadViagHomeZoneCacheIPCL(c,r);
+			MockPrimeEReadViagHomeZoneCacheIPCL(c,r, ETrue, ETrue, aNtsyError);
+            if(aNtsyError != KErrNone)
+                {
+                // got error, send only once
+                c = KViagHomeZoneCacheIdMax + 1;
+                r = KViagHomeZoneCacheRecordIdMax + 1;
+                }
 			}
 		}
 	
@@ -19001,7 +19270,7 @@
 	CleanupStack::PopAndDestroy(1,&data);
 	}
 
-void CCTsyCustomIPCFU::MockPrimeEReadViagHomeZoneCacheIPCL(TInt aCacheId,TInt aRecordId,TBool aDoComplete, TBool aDoExpect)
+void CCTsyCustomIPCFU::MockPrimeEReadViagHomeZoneCacheIPCL(TInt aCacheId,TInt aRecordId,TBool aDoComplete, TBool aDoExpect, TInt aNtsyError)
 	{
 	RBuf8 data;
 	data.CleanupClosePushL();
@@ -19027,7 +19296,7 @@
 		TMockLtsyData1<RMmCustomAPI::TViagCacheRecordContent> contentData(content);
 		data.Close();
 		contentData.SerialiseL(data);
-		iMockLTSY.CompleteL(EReadViagHomeZoneCacheIPC,KErrNone,data,0);
+		iMockLTSY.CompleteL(EReadViagHomeZoneCacheIPC,aNtsyError,data,0);
 		}
 
 	CleanupStack::PopAndDestroy(1,&data);
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyenstorefu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyenstorefu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -351,6 +351,7 @@
 	ASSERT_EQUALS(KErrNone, ret);
 	CleanupClosePushL(enStore);
  	
+	// Test 1: Bad index
     const TInt KIndex(0);   //bad index
 	TRequestStatus requestStatus;
     RMobileENStore::TMobileENEntryV1 info;    
@@ -363,6 +364,15 @@
     User::WaitForRequest(requestStatus);        
 	ASSERT_EQUALS(KErrArgument, requestStatus.Int());
 	
+	// Test 2: Bad package size
+    RMobileNamStore::TMobileNamEntryV1 info2;    
+    RMobileNamStore::TMobileNamEntryV1Pckg infoPckg2(info2);
+
+    enStore.Read(requestStatus, infoPckg2);
+        
+    User::WaitForRequest(requestStatus);        
+    ASSERT_EQUALS(KErrArgument, requestStatus.Int());
+    
 	AssertMockLtsyStatusL();
 	CleanupStack::PopAndDestroy(2, this); // enStore, this
 	}
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyfixeddiallingfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyfixeddiallingfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -36,7 +36,6 @@
 	ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0001bL);
     ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0001cL);
 	ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0002L);
-	ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0003L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0004L);	
 	ADD_TEST_STEP_ISO_CPP(CCTsyFixedDiallingFU, TestDialNoFdnCheck0005L);
 		
@@ -372,19 +371,18 @@
 	// TEST to show defect 120102
  	//-------------------------------------------------------------------------
 
-    // get out before it panics
-    ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 120102);
-    ASSERT_TRUE(EFalse);
-  
   	iMockLTSY.ExpectL(EMobileCallDialNoFdnCheck, expectData);   	
- 	// call of this API should lead to set CallId = 1, but because of defect 120102 it doesn't occure
- 	CallGetMobileCallInfoL(callId, mobileService, KSomeNumber); 	
+ 	CallGetMobileCallInfoL(callId, mobileService, KSomeNumber); 
+ 	
+ 	completeData.Close();
+ 	TMockLtsyCallData0 mockDataComplete2(callId, mobileService);
+ 	mockDataComplete2.SerialiseL(completeData);
   	iMockLTSY.CompleteL(EMobileCallDialNoFdnCheck, KErrNone, completeData);   	
   	
     call.DialNoFdnCheck(requestStatus, pckgCallParams, KSomeNumber);   
     
     User::WaitForRequest(requestStatus);      
-    ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 120102);      
+     
     ASSERT_EQUALS(KErrNone, requestStatus.Int());      
     
     AssertMockLtsyStatusL();
@@ -393,7 +391,7 @@
 	
 	
 /**
-@SYMTestCaseID BA-CTSY-FXD-CDNFC-0001
+@SYMTestCaseID BA-CTSY-FXD-CDNFC-0001b
 @SYMComponent  telephony_ctsy
 @SYMTestCaseDesc Test support in CTSY for RMobileCall::DialNoFdnCheck for voice calls
 @SYMTestPriority High
@@ -623,267 +621,163 @@
 void CCTsyFixedDiallingFU::TestDialNoFdnCheck0002L()
 	{
 
-// This test should test cancellation of GetCallParams
-// If this API does not have a cancel, the test step should be completely removed.
-
-	OpenEtelServerL(EUseExtendedError);
-	CleanupStack::PushL(TCleanupItem(Cleanup,this));
-	OpenPhoneL();
+     OpenEtelServerL(EUseExtendedError);
+     CleanupStack::PushL(TCleanupItem(Cleanup,this));
+     OpenPhoneL();
 
-	RBuf8 expectData;
-	CleanupClosePushL(expectData);
-	
-	RBuf8 completeData;
-	CleanupClosePushL(completeData);	
-	
-	 //-- For Voice1 -------------------------    
-    TBuf<256> lineName(KMmTsyVoice1LineName);
-    
-    // Open new line
-    RLine line;
-    TInt errorCode = line.Open(iPhone, lineName);
-    ASSERT_EQUALS(KErrNone, errorCode);
-    CleanupClosePushL(line);  
-    
-    // some data for opening call
-    _LIT(KDoubleColon, "::");
-    
-    TBuf<256> name;
-    name = KMmTsyPhoneName;
-    name.Append(KDoubleColon);
-    name.Append(lineName);
-    name.Append(KDoubleColon);
-        
-   	TInt callId = 1;   	
- 	// create new incoming call
- 	TName incomingCallName;
- 	RMobileCall::TMobileCallStatus mobileCallStatus = RMobileCall::EStatusIdle; 
- 	RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;	
- 	
- 	TRequestStatus requestStatus;
-	errorCode = CreateIncomingCallL(line, callId, lineName, incomingCallName, 
-                             mobileService, mobileCallStatus);	
-	ASSERT_EQUALS(KErrNone, errorCode);	 	
+     RBuf8 expectData;
+     CleanupClosePushL(expectData);
+     
+     RBuf8 completeData;
+     CleanupClosePushL(completeData);
+     
+     TInt errorCode = KErrNone;    
+     
+     //-- For Voice1 -------------------------
+         
+     TBuf<256> lineName(KMmTsyVoice1LineName);    
+     // Open new line
+     RLine line;
+     errorCode = line.Open(iPhone, lineName);
+     ASSERT_EQUALS(KErrNone, errorCode);
+     CleanupClosePushL(line);      
+     // open call
+     _LIT(KDoubleColon, "::");    
+     TBuf<256> name;
+     name = KMmTsyPhoneName;
+     name.Append(KDoubleColon);
+     name.Append(lineName);
+     name.Append(KDoubleColon);
+     
+     RMobileCall call;
+     errorCode = call.OpenNewCall(line, name);
+     ASSERT_EQUALS(KErrNone, errorCode);
+     CleanupClosePushL(call);   
+     
+     TRequestStatus requestStatus;    
+     _LIT(KSomeNumber, "123456789");
+     
+     RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
+     
+     TInt expectCallId = 0;
  	   
     // --------  make for this call callId > 0 --------------------------------------   
-    RMobileCall::TMobileCallInfoV1 callInfo;  
-            
-	line.NotifyIncomingCall(requestStatus, incomingCallName);
+    RMobileCall::TMobileCallInfoV8 callInfo;  
 
-    callInfo.iService = mobileService;
-    TMockLtsyCallData1<RMobileCall::TMobileCallInfoV1> idleCallData(callId, mobileService, callInfo);
-    idleCallData.SerialiseL(completeData);
-	
-	TRequestStatus mockLtsyStatus;
-    iMockLTSY.NotifyTerminated(mockLtsyStatus);
-    iMockLTSY.CompleteL(EEtelLineNotifyIncomingCall, KErrNone, completeData);
-    User::WaitForRequest(mockLtsyStatus);
-    AssertMockLtsyStatusL();
-    ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
-    
-    User::WaitForRequest(requestStatus);
-    AssertMockLtsyStatusL();
-    ASSERT_EQUALS(KErrNone, requestStatus.Int());
-    
-    RMobileCall call;
-    errorCode = call.OpenExistingCall(line, incomingCallName);
-    ASSERT_EQUALS(KErrNone, errorCode);
-	CleanupClosePushL(call);
-	//------------------------------------------------------------------------- 
-	
+    //-------------------------------------------------------------------------
+	// Test cancelling of RMobileCall::DialNoFdnCheck
  	//-------------------------------------------------------------------------
-	// Test cancelling of RCall::GetCallParams
- 	//-------------------------------------------------------------------------
- 	_LIT(KSomeNumber, "123456789"); 
- 	// data for ExpextL
+ 	
+    // data for ExpextL
  	RMobileCall::TMobileCallParamsV1 callParams; 
     RMobileCall::TMobileCallParamsV1Pckg    pckgCallParams(callParams); 	
  	 	
- 	callInfo.iRemoteParty.iDirection = RMobileCall::EMobileTerminated;  
- 	callInfo.iValid = RMobileCall::KCallDialledParty | RMobileCall::KCallAlternating;    
-	callInfo.iService	= mobileService;  
-	callInfo.iDialledParty.iTelNumber.Copy( KSomeNumber );
-	    
+    callInfo.iValid = RMobileCall::KCallDialledParty | RMobileCall::KCallAlternating;    
+    callInfo.iService   = mobileService;
+    callInfo.iStatus    = RMobileCall::EStatusUnknown;
+    callInfo.iCallId    = -1;
+    callInfo.iExitCode  =0; 
+    callInfo.iEmergency =0;
+    callInfo.iForwarded =0; 
+    callInfo.iPrivacy               = RMobilePhone::EPrivacyUnspecified;
+    callInfo.iAlternatingCall       = RMobilePhone::EAlternatingModeUnspecified;    
+    callInfo.iTch = RMobileCall::ETchUnknown;               
+    callInfo.iRemoteParty.iCallingName = KNullDesC;
+    callInfo.iRemoteParty.iRemoteIdStatus = RMobileCall::ERemoteIdentityUnknown;
+    callInfo.iRemoteParty.iRemoteNumber.iTelNumber = KNullDesC;
+    callInfo.iRemoteParty.iRemoteNumber.iNumberPlan = RMobilePhone::EUnknownNumberingPlan;
+    callInfo.iRemoteParty.iRemoteNumber.iTypeOfNumber = RMobilePhone::EUnknownNumber;
+    callInfo.iDialledParty.iTelNumber.Copy( KSomeNumber );
+    callInfo.iDialledParty.iNumberPlan = 
+            RMobilePhone::EUnknownNumberingPlan;
+    callInfo.iDialledParty.iTypeOfNumber = 
+            RMobilePhone::EUnknownNumber;   
+	
     TMockLtsyCallData2< RMobileCall::TMobileCallParamsV1, RMobileCall::TMobileCallInfoV1 >
-    											 mockCallData(callId, mobileService, callParams, callInfo);
+    											 mockCallData(expectCallId, mobileService, callParams, callInfo);
     mockCallData.SerialiseL(expectData);
     
+    // Expect the dial
+    
     iMockLTSY.ExpectL(EMobileCallDialNoFdnCheck, expectData, KErrNone);   
      
+    // Dial and cancel
     call.DialNoFdnCheck(requestStatus, pckgCallParams, KSomeNumber);
     call.CancelAsyncRequest(EMobileCallDialNoFdnCheck);
+    
+    // prepare and complete Mobile Call info
+    
+    TInt callId = 1;
+    
+    _LIT(KNullDesC , "");
         
-    User::WaitForRequest(requestStatus);    
-          
-    ASSERT_EQUALS(KErrCancel, requestStatus.Int());      
-    AssertMockLtsyStatusL();
-     
-	CleanupStack::PopAndDestroy(5, this); // expectData, this ...
-	
-	}
-
+    RBuf8 data;
+    CleanupClosePushL(data);
 
-/**
-@SYMTestCaseID BA-CTSY-FXD-CDNFC-0003
-@SYMComponent  telephony_ctsy
-@SYMTestCaseDesc Test support in CTSY for RMobileCall::DialNoFdnCheck with bad parameter data for voice calls
-@SYMTestPriority High
-@SYMTestActions Invokes RMobileCall::DialNoFdnCheck with bad parameter data for voice calls
-@SYMTestExpectedResults Pass
-@SYMTestType CT
-*/
-void CCTsyFixedDiallingFU::TestDialNoFdnCheck0003L()
-	{
-
-	OpenEtelServerL(EUseExtendedError);
-	CleanupStack::PushL(TCleanupItem(Cleanup,this));
-	OpenPhoneL();
+    RMobileCall::TMobileCallInfoV1 callInfo2;
+    callInfo2.iDialledParty.iTelNumber.Copy(KSomeNumber);
+    callInfo2.iService = mobileService;
+    callInfo2.iEmergency = EFalse;
+    callInfo2.iRemoteParty.iCallingName = KNullDesC;
+    callInfo2.iRemoteParty.iRemoteIdStatus = RMobileCall::ERemoteIdentityUnknown;
+    callInfo2.iRemoteParty.iRemoteNumber.iTelNumber = KNullDesC;
+    callInfo2.iRemoteParty.iRemoteNumber.iNumberPlan = RMobilePhone::EUnknownNumberingPlan;
+    callInfo2.iRemoteParty.iRemoteNumber.iTypeOfNumber = RMobilePhone::EUnknownNumber;
+    callInfo2.iForwarded = EFalse;
+    callInfo2.iValid = RMobileCall::KCallDialledParty | RMobileCall::KCallRemoteParty;
 
-	RBuf8 expectData;
-	CleanupClosePushL(expectData);
-	
-	RBuf8 completeData;
-	CleanupClosePushL(completeData);
-	
-	 //-- For Voice1 -------------------------    
-    TBuf<256> lineName(KMmTsyVoice1LineName);
-    
-    // Open new line
-    RLine line;
-    TInt errorCode = line.Open(iPhone, lineName);
-    ASSERT_EQUALS(KErrNone, errorCode);
-    CleanupClosePushL(line);  
-    
-    // some data for opening call
-    _LIT(KDoubleColon, "::");
+    TMockLtsyCallData1<RMobileCall::TMobileCallInfoV1> callInfoData(callId, mobileService, callInfo2);
+    callInfoData.SerialiseL(data);
+
+    iMockLTSY.CompleteL(EMobileCallGetMobileCallInfo, KErrNone, data);
+
+    //Pause the MockLTSY so we can program the sequence of Expect - Completes involved 
+    //with cancelling 
+    iMockLTSY.PauseCompletion();
     
-    TBuf<256> name;
-    name = KMmTsyPhoneName;
-    name.Append(KDoubleColon);
-    name.Append(lineName);
-    name.Append(KDoubleColon);
-        
-   	TInt callId = 1;   	
- 	// create new incoming call
- 	TName incomingCallName;
- 	RMobileCall::TMobileCallStatus mobileCallStatus = RMobileCall::EStatusIdle; 
- 	RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;	
- 	
- 	TRequestStatus requestStatus;
-	errorCode = CreateIncomingCallL(line, callId, lineName, incomingCallName, 
-                             mobileService, mobileCallStatus);	
-	ASSERT_EQUALS(KErrNone, errorCode);	 	
- 	   
-    // --------  make for this call callId > 0 --------------------------------------   
-    RMobileCall::TMobileCallInfoV1 callInfo;  
-            
-	line.NotifyIncomingCall(requestStatus, incomingCallName);
+    RMobileCall::TMobileCallStatus  mobileCallStatus = RMobileCall::EStatusDialling; 
+    TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallDataStatus(callId, mobileService, mobileCallStatus);
+    completeData.Close();
+    mockCallDataStatus.SerialiseL(completeData);
+    
+    //Change state to dialling, this set the call ID
+    iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrNone, completeData);
 
-    callInfo.iService = mobileService;
-    TMockLtsyCallData1<RMobileCall::TMobileCallInfoV1> idleCallData(callId, mobileService, callInfo);
-    idleCallData.SerialiseL(completeData);
-	
-	TRequestStatus mockLtsyStatus;
-    iMockLTSY.NotifyTerminated(mockLtsyStatus);
-    iMockLTSY.CompleteL(EEtelLineNotifyIncomingCall, KErrNone, completeData);
-    User::WaitForRequest(mockLtsyStatus);
-    AssertMockLtsyStatusL();
-    ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
+    
+    TInt hangUpCause = KErrGsmReleaseByUser;
+    TBool autoStChangeDisable = ETrue;
+    TMockLtsyCallData2<TInt, TBool> mockCallData2(callId, mobileService, 
+                                                          hangUpCause, 
+                                                          autoStChangeDisable);    
+    expectData.Close();
+    mockCallData2.SerialiseL(expectData);
+    // Since the call ID has been set, the CTSY will go ahead with the cancellation
+    // by hanging up.
+    iMockLTSY.ExpectL(EEtelCallHangUp, expectData);
     
-    User::WaitForRequest(requestStatus);
-    AssertMockLtsyStatusL();
-    ASSERT_EQUALS(KErrNone, requestStatus.Int());
+    // Cancelled Dial request. After this CTSY hangs up the call and it goes to idle state.
+   
     
-    RMobileCall call;
-    errorCode = call.OpenExistingCall(line, incomingCallName);
-    ASSERT_EQUALS(KErrNone, errorCode);
-	CleanupClosePushL(call);
-	//------------------------------------------------------------------------- 
-	    
-    _LIT(KSomeNumber, "123456789");    
+    RMobileCall::TMobileCallStatus  mobileCallStatus2 = RMobileCall::EStatusIdle; 
+    TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallDataStatus2(callId, mobileService, mobileCallStatus2);
+    completeData.Close();
+    mockCallDataStatus2.SerialiseL(completeData);
+
+    // Complete the hangup
+    iMockLTSY.CompleteL(EMobileCallNotifyMobileCallStatusChange, KErrGsmReleaseByUser, completeData);
+ 
+    // Release the MockLTSY so that the above sequence is triggered.
+    iMockLTSY.ResumeCompletion();
     
     
-	//-------------------------------------------------------------------------
-	// Test B: Test passing wrong descriptor size to parameter in
-	// RCall::GetCallParams
- 	//-------------------------------------------------------------------------
- 	RMobileCall::TMobileCallParamsV1 		callParams; 	
- 	RMobileCall::TMobileCallParamsV1Pckg    pckgCallParams(callParams);	
- 	
- 	// --- data for ExpectL ---
- 	// set up callParams for case of pckgCallParams zero length
- 	callParams.iSpeakerControl = 
-	            RCall::EMonitorSpeakerControlOnUntilCarrier;
-	callParams.iSpeakerVolume = RCall::EMonitorSpeakerVolumeLow;
-	callParams.iInterval = 0;
-	callParams.iWaitForDialTone = RCall::EDialToneWait;
-	callParams.iIdRestrict = RMobileCall::EIdRestrictDefault;
-	callParams.iCug.iExplicitInvoke = EFalse;
-	callParams.iCug.iCugIndex = 0xFFFF;
-	callParams.iCug.iSuppressPrefCug = EFalse;
-	callParams.iCug.iSuppressOA = EFalse;
-	callParams.iAutoRedial = EFalse; 	
- 	// set up callInfo#
+    // Check results.
+    User::WaitForRequest(requestStatus);    
+    AssertMockLtsyStatusL();
+    ASSERT_EQUALS(KErrCancel, requestStatus.Int());      
+
+     
+	CleanupStack::PopAndDestroy(6, this); // expectData, this ...
 	
-	RMobileCall::TMobileCallInfoV8 callInformation; 
-	callInformation.iRemoteParty.iDirection = RMobileCall::EMobileTerminated;  
-	callInformation.iValid = RMobileCall::KCallDialledParty | RMobileCall::KCallAlternating;    
-	callInformation.iService	= mobileService;  
-	callInformation.iDialledParty.iTelNumber.Copy( KSomeNumber ); 	
- 	TMockLtsyCallData2< RMobileCall::TMobileCallParamsV1, RMobileCall::TMobileCallInfoV8 >
-    											 mockCallData2(callId, mobileService, callParams, callInformation);
-    mockCallData2.SerialiseL(expectData);
-    
- 	// --- data for CompleteL ---
- 	TMockLtsyCallData0 mockDataComplete(callId, mobileService);
- 	completeData.Close();
- 	mockDataComplete.SerialiseL(completeData);
- 
-	iMockLTSY.ExpectL(EMobileCallDialNoFdnCheck, expectData);   	
-  	iMockLTSY.CompleteL(EMobileCallDialNoFdnCheck, KErrNone, completeData);   	
-  	
-    // set Length of param to 0 
-  	pckgCallParams.SetLength(0);
-  	// call DialNoFdnCheck itself
-    call.DialNoFdnCheck(requestStatus, pckgCallParams, KSomeNumber);   
-    
-    User::WaitForRequest(requestStatus);          
-    ASSERT_EQUALS(KErrNone, requestStatus.Int());
-    AssertMockLtsyStatusL();   
- 			
-	//-------------------------------------------------------------------------
-	// Test A: Test passing wrong version of parameters to
-	// RCall::GetCallParams use TMobileCallParamsV2 instead of TMobileCallParamsV1
- 	//------------------------------------------------------------------------- 	
-    RMobileCall::TMobileCallParamsV2 callParamsV2; 
-    RMobileCall::TMobileCallParamsV2Pckg    pckgCallParamsV2(callParamsV2);    	
- 
- 	// data for ExpextL 	
- 	callInfo.iRemoteParty.iDirection = RMobileCall::EMobileTerminated;  
- 	callInfo.iValid = RMobileCall::KCallDialledParty | RMobileCall::KCallAlternating;    
-	callInfo.iService	= mobileService;  
-	callInfo.iDialledParty.iTelNumber.Copy( KSomeNumber );
-	    
-    TMockLtsyCallData2< RMobileCall::TMobileCallParamsV1, RMobileCall::TMobileCallInfoV1 >
-    											 mockCallData(callId, mobileService, callParams, callInfo);
-    expectData.Close();
-    mockCallData.SerialiseL(expectData);    
-       
-	iMockLTSY.ExpectL(EMobileCallDialNoFdnCheck, expectData, KErrGeneral);  // use KErrGeneral just only to avoid waiting for timeout
-   	call.DialNoFdnCheck(requestStatus, pckgCallParamsV2, KSomeNumber);
-   	User::WaitForRequest(requestStatus);
-   	
-   	// Possible defect. There is no checking of iExtensionId of geting params in 
-   	// TInt CMmVoiceCallTsy::DialNoFdnCheck(const TTsyReqHandle aTsyReqHandle, const TDesC8* aCallParams, TDesC* aTelNumber )
-   	// and in 
-   	// TInt CMmCallGsmWcdmaExt::DialL(RMobilePhone::TMobileService aCallMode,  const TDesC8* aCallParams, const TDesC* aTelNumber, TInt aExtensionId )
-    ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 120105);      
-    ASSERT_EQUALS(KErrArgument, requestStatus.Int());     
-	AssertMockLtsyStatusL();
-	
-	// Done !
-	CleanupStack::PopAndDestroy(5, this); // this...
-
 	}
 
 
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsymailboxnumbersfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsymailboxnumbersfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -28,11 +28,16 @@
 #include "tmockltsydata.h"
 #include <ctsy/serviceapi/gsmerror.h>
 
+const TInt KOneSecond=1000000;  // Used in a time out function, 1 second (in microSeconds)
+
 CTestSuite* CCTsyMailboxNumbersFU::CreateSuiteL(const TDesC& aName)
 	{
 	SUB_SUITE;
 
-	ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0001L);
+    ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0001L);
+    ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0001bL);
+    ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0001cL);
+    ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0001dL);
 	ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0002L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0003L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyMailboxNumbersFU, TestGetMailboxNumbers0004L);
@@ -63,6 +68,11 @@
 	OpenEtelServerL(EUseExtendedError);
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
+	
+	RMobilePhoneBookStore bookStore;
+	TName name(KETelIccVoiceMailBox);
+	OpenPhoneBookStoreL(bookStore, name, iPhone);
+	CleanupClosePushL(bookStore);
 
 	RBuf8 data;
 	CleanupClosePushL(data);
@@ -147,10 +157,272 @@
 	ASSERT_EQUALS(KErrNone, reqStatus.Int());
 	AssertMockLtsyStatusL();
 
-	CleanupStack::PopAndDestroy(2, this); // data, this
+	CleanupStack::PopAndDestroy(3, this); // data, bookStore, this
 	
 	}
 
+/**
+@SYMTestCaseID BA-CTSY-MBXN-MGMN-0001b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is not exist
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhone::GetMailboxNumbers
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyMailboxNumbersFU::TestGetMailboxNumbers0001bL()
+    {
+	// Since we can not read the mail box number from the SIM if the VMBX storage was not initilized, the 
+	// CTSY must make sure that the VMBX storage was initilize before requesting the mail box number from 
+	// the LTSY. This test test if the CTSY knows to create a new VMBX and wait for the initilization to complete.
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+    OpenPhoneL();
+    
+    RBuf8 data;
+    CleanupClosePushL(data);
+
+    TRequestStatus reqStatus;
+
+    TName name(KETelIccVoiceMailBox);
+    TMockLtsyPhoneBookData0 storeInitData(name);
+    storeInitData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, data);   
+
+
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 voicemailIds;
+    voicemailIds.iVoice = 1;
+    voicemailIds.iData = 2;
+    voicemailIds.iFax = 3;
+    voicemailIds.iOther = 4;
+    RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg voicemailIdsPckg(voicemailIds);
+
+    iPhone.GetMailboxNumbers(reqStatus, voicemailIdsPckg);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+
+    CStorageInfoData storageData;
+    SetStorageInfoData(storageData);
+    
+    // only after the book store is ready, and CTSY can send the EMobilePhoneGetMailboxNumbers.
+	TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData);
+    data.Close();
+    retStoreInitC.SerialiseL(data);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, data, 0);
+
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 expVoicemailIds;
+    expVoicemailIds.iVoice = 1;
+    expVoicemailIds.iData = 2;
+    expVoicemailIds.iFax = 3;
+    expVoicemailIds.iOther = 4;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3>
+                                                 voicemailIdsData( expVoicemailIds );
+    data.Close();
+    voicemailIdsData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMobilePhoneGetMailboxNumbers, data, KErrNone);
+
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+    
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 completeVoicemailIds;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3>
+                                 completeVoicemailIdsData( completeVoicemailIds );
+    completeVoicemailIds.iVoice = 5;
+    completeVoicemailIds.iData = 6;
+    completeVoicemailIds.iFax = 7;
+    completeVoicemailIds.iOther = 8;
+    data.Close();
+    completeVoicemailIdsData.SerialiseL(data);
+    iMockLTSY.CompleteL(EMobilePhoneGetMailboxNumbers, KErrNone, data);
+    
+    User::WaitForRequest(reqStatus);
+    ASSERT_EQUALS(KErrNone, reqStatus.Int());
+    AssertMockLtsyStatusL();
+    ASSERT_EQUALS(completeVoicemailIds.iVoice, voicemailIds.iVoice);
+    ASSERT_EQUALS(completeVoicemailIds.iData,  voicemailIds.iData);
+    ASSERT_EQUALS(completeVoicemailIds.iFax,   voicemailIds.iFax);
+    ASSERT_EQUALS(completeVoicemailIds.iOther, voicemailIds.iOther);
+ 
+    CleanupStack::PopAndDestroy(2, this); // data, this
+    
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-MBXN-MGMN-0001c
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is exist but not ready
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhone::GetMailboxNumbers
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyMailboxNumbersFU::TestGetMailboxNumbers0001cL()
+    {
+	// Since we can not read the mail box number from the SIM if the VMBX storage was not initilized, the 
+	// CTSY must make sure that the VMBX storage was initilize before requesting the mail box number from 
+	// the LTSY. This test test if the CTSY knows to wait for an previous initilize request to complete 
+	// before requesting to get the mail box number.
+
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+    OpenPhoneL();
+    
+    RBuf8 data;
+    CleanupClosePushL(data);
+
+    TRequestStatus reqStatus;
+
+    TName name(KETelIccVoiceMailBox);
+    TMockLtsyPhoneBookData0 storeInitData(name);
+    storeInitData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, data);   
+
+    RMobilePhoneBookStore bookStore;
+    CleanupClosePushL(bookStore);
+    TInt ret = bookStore.Open(iPhone, name);    
+    ASSERT_EQUALS(KErrNone, ret);   
+    
+
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 voicemailIds;
+    voicemailIds.iVoice = 1;
+    voicemailIds.iData = 2;
+    voicemailIds.iFax = 3;
+    voicemailIds.iOther = 4;
+    RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg voicemailIdsPckg(voicemailIds);
+
+    iPhone.GetMailboxNumbers(reqStatus, voicemailIdsPckg);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+
+    CStorageInfoData storageData;
+    SetStorageInfoData(storageData);
+    
+    TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData);
+    data.Close();
+    retStoreInitC.SerialiseL(data);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, data, 0);
+
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 expVoicemailIds;
+    expVoicemailIds.iVoice = 1;
+    expVoicemailIds.iData = 2;
+    expVoicemailIds.iFax = 3;
+    expVoicemailIds.iOther = 4;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3>
+                                                 voicemailIdsData( expVoicemailIds );
+    data.Close();
+    voicemailIdsData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMobilePhoneGetMailboxNumbers, data, KErrNone);
+
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+    
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 completeVoicemailIds;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3>
+                                 completeVoicemailIdsData( completeVoicemailIds );
+    completeVoicemailIds.iVoice = 5;
+    completeVoicemailIds.iData = 6;
+    completeVoicemailIds.iFax = 7;
+    completeVoicemailIds.iOther = 8;
+    data.Close();
+    completeVoicemailIdsData.SerialiseL(data);
+    iMockLTSY.CompleteL(EMobilePhoneGetMailboxNumbers, KErrNone, data);
+    
+    User::WaitForRequest(reqStatus);
+    ASSERT_EQUALS(KErrNone, reqStatus.Int());
+    AssertMockLtsyStatusL();
+    ASSERT_EQUALS(completeVoicemailIds.iVoice, voicemailIds.iVoice);
+    ASSERT_EQUALS(completeVoicemailIds.iData,  voicemailIds.iData);
+    ASSERT_EQUALS(completeVoicemailIds.iFax,   voicemailIds.iFax);
+    ASSERT_EQUALS(completeVoicemailIds.iOther, voicemailIds.iOther);
+ 
+    CleanupStack::PopAndDestroy(3, this); // data, bookStore, this
+    
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-MBXN-MGMN-0001d
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMailboxNumbers when VMBX storage is not exist but another phone book store (ADN) exist
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhone::GetMailboxNumbers
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyMailboxNumbersFU::TestGetMailboxNumbers0001dL()
+    {
+	// Since we can not read the mail box number from the SIM if the VMBX storage was not initilized, the 
+	// CTSY must make sure that the VMBX storage was initilize before requesting the mail box number from 
+	// the LTSY. This test test if the CTSY knows that another phone book store (ADN) initilization would do.
+
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+    OpenPhoneL();
+    
+    TName name(KETelIccAdnPhoneBook);
+    RMobilePhoneBookStore adnBookStore;
+    OpenPhoneBookStoreL(adnBookStore, name, iPhone);
+    CleanupClosePushL(adnBookStore);
+    
+    RBuf8 data;
+    CleanupClosePushL(data);
+
+    TRequestStatus reqStatus;
+
+    RMobilePhoneBookStore bookStore;
+    CleanupClosePushL(bookStore);
+    TInt ret = bookStore.Open(iPhone, name);    
+    ASSERT_EQUALS(KErrNone, ret);   
+    
+
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 voicemailIds;
+    voicemailIds.iVoice = 1;
+    voicemailIds.iData = 2;
+    voicemailIds.iFax = 3;
+    voicemailIds.iOther = 4;
+    RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg voicemailIdsPckg(voicemailIds);
+
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 expVoicemailIds;
+    expVoicemailIds.iVoice = 1;
+    expVoicemailIds.iData = 2;
+    expVoicemailIds.iFax = 3;
+    expVoicemailIds.iOther = 4;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3>
+                                                 voicemailIdsData( expVoicemailIds );
+    data.Close();
+    voicemailIdsData.SerialiseL(data);
+    iMockLTSY.ExpectL(EMobilePhoneGetMailboxNumbers, data, KErrNone);
+    
+    iPhone.GetMailboxNumbers(reqStatus, voicemailIdsPckg);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, reqStatus.Int());
+
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 completeVoicemailIds;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneVoicemailIdsV3>
+                                 completeVoicemailIdsData( completeVoicemailIds );
+    completeVoicemailIds.iVoice = 5;
+    completeVoicemailIds.iData = 6;
+    completeVoicemailIds.iFax = 7;
+    completeVoicemailIds.iOther = 8;
+    data.Close();
+    completeVoicemailIdsData.SerialiseL(data);
+    iMockLTSY.CompleteL(EMobilePhoneGetMailboxNumbers, KErrNone, data);
+    
+    User::WaitForRequest(reqStatus);
+    ASSERT_EQUALS(KErrNone, reqStatus.Int());
+    AssertMockLtsyStatusL();
+    ASSERT_EQUALS(completeVoicemailIds.iVoice, voicemailIds.iVoice);
+    ASSERT_EQUALS(completeVoicemailIds.iData,  voicemailIds.iData);
+    ASSERT_EQUALS(completeVoicemailIds.iFax,   voicemailIds.iFax);
+    ASSERT_EQUALS(completeVoicemailIds.iOther, voicemailIds.iOther);
+ 
+    CleanupStack::PopAndDestroy(4, this); // data, adnBookStore, bookStore, this
+    
+    }
 
 /**
 @SYMTestCaseID BA-CTSY-MBXN-MGMN-0002
@@ -171,6 +443,11 @@
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
 
+    RMobilePhoneBookStore bookStore;
+    TName name(KETelIccVoiceMailBox);
+    OpenPhoneBookStoreL(bookStore, name, iPhone);
+    CleanupClosePushL(bookStore);
+
 	TRequestStatus mockLtsyStatus;
 	iMockLTSY.NotifyTerminated(mockLtsyStatus);
 
@@ -208,7 +485,7 @@
 	ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
 	AssertMockLtsyStatusL();
 
-	CleanupStack::PopAndDestroy(2); // data, this
+	CleanupStack::PopAndDestroy(3); // data, bookStore, this
 	
 	}
 
@@ -264,6 +541,11 @@
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
 
+    RMobilePhoneBookStore bookStore;
+    TName name(KETelIccVoiceMailBox);
+    OpenPhoneBookStoreL(bookStore, name, iPhone);
+    CleanupClosePushL(bookStore);
+
 	RBuf8 data;
 	CleanupClosePushL(data);
 
@@ -323,7 +605,7 @@
 
 	AssertMockLtsyStatusL();
 	// Done !
-	CleanupStack::PopAndDestroy(4, this); // phone2, telServer2, data, this
+	CleanupStack::PopAndDestroy(5, this); // phone2, bookStore, telServer2, data, this
 
 	}
 
@@ -345,6 +627,11 @@
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
 
+    RMobilePhoneBookStore bookStore;
+    TName name(KETelIccVoiceMailBox);
+    OpenPhoneBookStoreL(bookStore, name, iPhone);
+    CleanupClosePushL(bookStore);
+
 	RBuf8 data;
 	CleanupClosePushL(data);
 
@@ -368,7 +655,7 @@
 	AssertMockLtsyStatusL();
 
 	// Done !
-	CleanupStack::PopAndDestroy(2, this); // data, this
+	CleanupStack::PopAndDestroy(3, this); // data, bookStore, this
 
 	}
 
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsynetworkcontrolfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsynetworkcontrolfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -5272,14 +5272,27 @@
 
 	OpenEtelServerL(EUseExtendedError);
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
-	OpenPhoneL();
-
+
+	TRequestStatus requestStatus;
+    RMobilePhone::TMobilePhoneRegistrationStatus status;
+    
+    // Initial test to verify that GetNetworkRegistrationStatus completes 
+    // with an error if the modem is not ready (i.e., before the LTSY sends
+    // a EMmTsyBootNotifyModemStatusReadyIPC notification to CTSY)
+    TInt err = iPhone.Open(iTelServer,KMmTsyPhoneName);
+    ASSERT_EQUALS(KErrNone, err);
+
+    iPhone.GetNetworkRegistrationStatus(requestStatus, status);
+    User::WaitForRequest(requestStatus);
+    ASSERT_EQUALS(KErrNotReady, requestStatus.Int());
+
+	iPhone.Close();
+	
+	OpenPhoneL(); // whole phone bootup procedure for rest of tests
+	
 	RBuf8 data;
 	CleanupClosePushL(data);
 
-	TRequestStatus requestStatus;
-	RMobilePhone::TMobilePhoneRegistrationStatus status;
-
  	//-------------------------------------------------------------------------
 	// TEST A: failure to dispatch request to LTSY
  	//-------------------------------------------------------------------------
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyonstorefu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyonstorefu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -32,6 +32,8 @@
 #include "cctsyactiveretriever.h"
 #include <mmretrieve.h>
 
+const TInt KOneSecond=1000000;  // Used in a time out function, 1 second (in microSeconds)
+
 CTestSuite* CCTsyONStoreFU::CreateSuiteL(const TDesC& aName)
 	{
 	SUB_SUITE;
@@ -61,7 +63,10 @@
 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestDelete0003L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestDelete0004L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestDelete0005L);
-	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001L);
+    ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001L);
+    ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001bL);
+    ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001cL);
+    ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0001dL);
 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0002L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0003L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyONStoreFU, TestGetInfo0004L);
@@ -1199,6 +1204,7 @@
     ASSERT_EQUALS(KErrNone, ret);
     CleanupClosePushL(onStore);
 
+    // Test 1: Bad package size
     TRequestStatus requestStatus;
     RMobileNamStore::TMobileNamEntryV1 info;    // bad param 
     RMobileNamStore::TMobileNamEntryV1Pckg infoPckg(info);
@@ -1208,6 +1214,16 @@
     User::WaitForRequest(requestStatus);
     ASSERT_EQUALS(KErrArgument, requestStatus.Int());
 
+    // Test 2: Bad index
+    RMobileONStore::TMobileONEntryV1 info2;  
+    RMobileONStore::TMobileONEntryV1Pckg infoPckg2(info2);
+    info2.iIndex = -2; // bad param
+    
+    onStore.Read(requestStatus, infoPckg2);
+
+    User::WaitForRequest(requestStatus);
+    ASSERT_EQUALS(KErrArgument, requestStatus.Int());
+    
     AssertMockLtsyStatusL();
 
     CleanupStack::PopAndDestroy(2); // this, onStore
@@ -1602,32 +1618,26 @@
 	ASSERT_EQUALS(KErrNone, ret);
 	CleanupClosePushL(onStore);
 
+	// Test 1: Bad index
 	TRequestStatus requestStatus;
     RMobileONStore::TMobileONEntryV1 info;  
     RMobileONStore::TMobileONEntryV1Pckg infoPckg(info);
     
     info.iIndex = -2;   //bad index
 	    
-    TMockLtsyData1<RMobileONStore::TMobileONEntryV1> tsyData(info);
-    tsyData.SerialiseL(expData);
-
-    const TInt KLocation(2);
-    TInt location(KLocation);
-
-    TMockLtsyData1<TInt> tsyData2(location);           
-    tsyData2.SerialiseL(completeData);
-
-	iMockLTSY.ExpectL(EMmTsyONStoreWriteIPC, expData);
-	iMockLTSY.CompleteL(EMmTsyONStoreWriteIPC, KErrNone, completeData);
-	
     onStore.Write(requestStatus, infoPckg);
-    
     User::WaitForRequest(requestStatus);  
     
-	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 160401);	
-          
-	ASSERT_EQUALS(KLocation, info.iIndex);	
-	ASSERT_TRUE(KErrNone != requestStatus.Int());	
+    ASSERT_EQUALS(KErrArgument, requestStatus.Int());
+	
+	// Test 2: Bad package
+    RMobileNamStore::TMobileNamEntryV1 info2;    // bad param 
+    RMobileNamStore::TMobileNamEntryV1Pckg infoPckg2(info2);
+    
+    onStore.Write(requestStatus, infoPckg);
+    User::WaitForRequest(requestStatus);  
+    
+    ASSERT_EQUALS(KErrArgument, requestStatus.Int());
 
 	AssertMockLtsyStatusL();
 
@@ -2093,6 +2103,12 @@
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
 
+	// Open ADN phonebook
+    TName name(KETelIccAdnPhoneBook);
+    RMobilePhoneBookStore bookStore;
+    OpenPhoneBookStoreL(bookStore, name, iPhone);
+    CleanupClosePushL(bookStore);
+
 	RBuf8 expData;
 	CleanupClosePushL(expData);
 
@@ -2177,50 +2193,490 @@
 
 	AssertMockLtsyStatusL();
 	
-	//-------------------------------------------------------------------------
-	// TEST F: DEF132954: GetInfo fails when another phonebook's initialisation
-	// is in progress.
-	//-------------------------------------------------------------------------
-	
-	TName name(KETelIccAdnPhoneBook);
-	RMobilePhoneBookStore bookStore;
-	
-	RBuf8 data;
-	CleanupClosePushL(data);
-	    	
-	RBuf8 data2;
-	CleanupClosePushL(data2);
-	    	
-	iMockLTSY.NotifyTerminated(mockLtsyStatus);
-              
-	//EMmTsyPhoneBookStoreInitIPC
-	TMockLtsyPhoneBookData0 storeInitData(name);
-	storeInitData.SerialiseL(data);
-	        
-	iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, data);		
-	
-	//Open
-	ret = bookStore.Open(iPhone, name);
-	ASSERT_EQUALS(KErrNone, ret);
-	CleanupClosePushL(bookStore);
-	
-	User::WaitForRequest(mockLtsyStatus);        	
-	ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());	
-	
-	onStore.GetInfo(requestStatus, storePckg);		
-	    
-	User::WaitForRequest(requestStatus);        
-	ASSERT_EQUALS(KErrNotReady, requestStatus.Int());
-
-	AssertMockLtsyStatusL(); 	
-		    		
-	CleanupStack::PopAndDestroy(3); //data, data2, bookStore
-	
-	CleanupStack::PopAndDestroy(4, this); // this, etc...
+	CleanupStack::PopAndDestroy(5, this); // this, etc...
 	}
 
 
 /**
+@SYMTestCaseID BA-CTSY-PBON-OSGI-0001b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobileONStore::GetInfo when there is no ADN store
+@SYMTestPriority High
+@SYMTestActions Invokes RMobileONStore::GetInfo
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyONStoreFU::TestGetInfo0001bL()
+    {
+	// Since we can not get the ON store info from the SIM if the ADN storage was not initilized, the 
+	// CTSY must make sure that the ADN storage was initilize before requesting to get the ON store info from 
+	// the LTSY. This test test if the CTSY knows to create a new ADN and wait for the initilization to complete.
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+    OpenPhoneL();
+
+    RBuf8 expData;
+    CleanupClosePushL(expData);
+
+    RBuf8 completeData;
+    CleanupClosePushL(completeData);
+
+    RMobileONStore  onStore;
+    TInt ret = onStore.Open(iPhone);
+    ASSERT_EQUALS(KErrNone, ret);
+    CleanupClosePushL(onStore);
+        
+        
+    TRequestStatus requestStatus;
+    RMobileONStore::TMobileONStoreInfoV1 storeInfo;
+    RMobileONStore::TMobileONStoreInfoV1Pckg storePckg(storeInfo);
+    
+    TName name(KETelIccAdnPhoneBook);
+    expData.Close();
+    TMockLtsyPhoneBookData0 storeInitData(name);
+    storeInitData.SerialiseL(expData);
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, expData);   
+
+    onStore.GetInfo(requestStatus, storePckg);      
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+
+    CStorageInfoData storageData;
+    SetStorageInfoData(storageData);
+    
+    ASSERT_EQUALS(KErrNone, iMockLTSY.PauseCompletion());
+    
+    TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData);
+    completeData.Close();
+    retStoreInitC.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, completeData, 0);
+
+    //EMmTsyPhoneBookStoreCacheIPC
+    CArrayPtrSeg<CPhoneBookStoreEntry>* cache = new(ELeave) CArrayPtrSeg<CPhoneBookStoreEntry>( 1 );
+    CleanupStack::PushL(cache);
+    
+    TMockLtsyPhoneBookData1<CArrayPtrSeg<CPhoneBookStoreEntry>*> storeCacheData(name, cache);
+    completeData.Close();
+    storeCacheData.SerialiseL(completeData);   
+    expData.Close();
+    storeInitData.SerialiseL(expData);
+    
+                  
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreCacheIPC, expData);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreCacheIPC, KErrNone, completeData, 0);
+    
+    TInt readIndex(-1);
+    TMockLtsyData1<TInt> tsyData(readIndex);
+    expData.Close();
+    tsyData.SerialiseL(expData);
+    iMockLTSY.ExpectL(EMmTsyONStoreGetInfoIPC, expData);
+
+    ASSERT_EQUALS(KErrNone, iMockLTSY.ResumeCompletion());
+
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    
+    const TInt KNumOfEntries = 11;
+    const TInt KUsedEntries = 21;
+    const TInt KNameLen = 31;
+    const TInt KNumLen = 41;
+    TServiceType serviceType = {KNumOfEntries, KUsedEntries, KNameLen, KNumLen};
+    TMockLtsyData1<TServiceType> tsyData2(serviceType);           
+    completeData.Close();
+    tsyData2.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMmTsyONStoreGetInfoIPC, KErrNone, completeData);
+    
+    
+    User::WaitForRequest(requestStatus);        
+    ASSERT_EQUALS(KErrNone, requestStatus.Int());   
+        
+    ASSERT_EQUALS(RMobilePhoneStore::EOwnNumberStore, storeInfo.iType);
+    ASSERT_EQUALS(KONStoreCaps, storeInfo.iCaps);
+    ASSERT_TRUE(0 == storeInfo.iName.Compare(KETelOwnNumberStore));
+    ASSERT_EQUALS(KUsedEntries, storeInfo.iUsedEntries);
+    ASSERT_EQUALS(KNumOfEntries, storeInfo.iTotalEntries);
+    ASSERT_EQUALS(KNumLen, storeInfo.iNumberLen);
+    ASSERT_EQUALS(KNameLen, storeInfo.iTextLen);
+        
+    CleanupStack::PopAndDestroy(5, this); // this, etc...
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-PBON-OSGI-0001c
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobileONStore::GetInfo when there is no ADN store and another store is initilize
+@SYMTestPriority High
+@SYMTestActions Invokes RMobileONStore::GetInfo
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyONStoreFU::TestGetInfo0001cL()
+    {
+	// Since we can not get the ON store info from the SIM if the ADN storage was not initilized, the 
+	// CTSY must make sure that the ADN storage was initilize before requesting to get the ON store info from 
+	// the LTSY. This test test if the CTSY knows what to do when another storage creation was initilize but not completed.
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+    OpenPhoneL();
+
+    RBuf8 expData;
+    CleanupClosePushL(expData);
+
+    RBuf8 completeData;
+    CleanupClosePushL(completeData);
+
+    RMobileONStore  onStore;
+    TInt ret = onStore.Open(iPhone);
+    ASSERT_EQUALS(KErrNone, ret);
+    CleanupClosePushL(onStore);
+        
+        
+    TRequestStatus requestStatus;
+    RMobileONStore::TMobileONStoreInfoV1 storeInfo;
+    RMobileONStore::TMobileONStoreInfoV1Pckg storePckg(storeInfo);
+    
+    TName mbdnName(KETelIccMbdnPhoneBook);
+    expData.Close();
+    TMockLtsyPhoneBookData0 storeInitData(mbdnName);
+    storeInitData.SerialiseL(expData);
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, expData);
+    
+    RMobilePhoneBookStore mbdnBookStore;
+    CleanupClosePushL(mbdnBookStore);
+    ASSERT_EQUALS(KErrNone, mbdnBookStore.Open(iPhone, KETelIccMbdnPhoneBook));
+    
+
+    onStore.GetInfo(requestStatus, storePckg);      
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+
+    CStorageInfoData storageData;
+    SetStorageInfoData(storageData);
+    
+    ASSERT_EQUALS(KErrNone, iMockLTSY.PauseCompletion());
+    
+    TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(mbdnName, storageData);
+    completeData.Close();
+    retStoreInitC.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, completeData, 0);
+
+    //EMmTsyPhoneBookStoreCacheIPC
+    CArrayPtrSeg<CPhoneBookStoreEntry>* cache = new(ELeave) CArrayPtrSeg<CPhoneBookStoreEntry>( 1 );
+    CleanupStack::PushL(cache);
+    
+    TName adnName(KETelIccAdnPhoneBook);
+    TMockLtsyPhoneBookData1<CArrayPtrSeg<CPhoneBookStoreEntry>*> storeCacheData(adnName, cache);
+    completeData.Close();
+    storeCacheData.SerialiseL(completeData);   
+    TMockLtsyPhoneBookData0 adnStoreInitData(adnName);
+    expData.Close();
+    adnStoreInitData.SerialiseL(expData);
+    
+                  
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreCacheIPC, expData);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreCacheIPC, KErrNone, completeData, 0);
+    
+    TInt readIndex(-1);
+    TMockLtsyData1<TInt> tsyData(readIndex);
+    expData.Close();
+    tsyData.SerialiseL(expData);
+    iMockLTSY.ExpectL(EMmTsyONStoreGetInfoIPC, expData);
+
+    ASSERT_EQUALS(KErrNone, iMockLTSY.ResumeCompletion());
+
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    
+    const TInt KNumOfEntries = 12;
+    const TInt KUsedEntries = 23;
+    const TInt KNameLen = 3;
+    const TInt KNumLen = 14;
+    TServiceType serviceType = {KNumOfEntries, KUsedEntries, KNameLen, KNumLen};
+    TMockLtsyData1<TServiceType> tsyData2(serviceType);           
+    completeData.Close();
+    tsyData2.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMmTsyONStoreGetInfoIPC, KErrNone, completeData);
+    
+    
+    User::WaitForRequest(requestStatus);        
+    ASSERT_EQUALS(KErrNone, requestStatus.Int());   
+        
+    ASSERT_EQUALS(RMobilePhoneStore::EOwnNumberStore, storeInfo.iType);
+    ASSERT_EQUALS(KONStoreCaps, storeInfo.iCaps);
+    ASSERT_TRUE(0 == storeInfo.iName.Compare(KETelOwnNumberStore));
+    ASSERT_EQUALS(KUsedEntries, storeInfo.iUsedEntries);
+    ASSERT_EQUALS(KNumOfEntries, storeInfo.iTotalEntries);
+    ASSERT_EQUALS(KNumLen, storeInfo.iNumberLen);
+    ASSERT_EQUALS(KNameLen, storeInfo.iTextLen);
+        
+    CleanupStack::PopAndDestroy(6, this); // this, etc...
+    }
+
+
+/**
+@SYMTestCaseID BA-CTSY-PBON-OSGI-0001d
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobileONStore::GetInfo when there is no ADN store and SIM is not ready
+@SYMTestPriority High
+@SYMTestActions Invokes RMobileONStore::GetInfo
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyONStoreFU::TestGetInfo0001dL()
+    {
+	// Since we can not get the ON store info from the SIM if the ADN storage was not initilized, the 
+	// CTSY must make sure that the ADN storage was initilize before requesting to get the ON store info from 
+	// the LTSY. We can not initilize the storage if the SIM is not ready. This test test if the CTSY knows 
+	// to wait for the SIM to be ready, the wait for the storage to complete the initilization and only then to
+	// ask the ON storage info from the LTSY.
+    OpenEtelServerL(EUseExtendedError);
+    CleanupStack::PushL(TCleanupItem(Cleanup,this));
+
+    RBuf8 expData;
+    CleanupClosePushL(expData);
+
+    RBuf8 completeData;
+    CleanupClosePushL(completeData);
+
+    // Open the phone
+    RMobilePhone::TMobilePhoneNetworkInfoV8 homeNetwork;
+    homeNetwork.iMode = RMobilePhone::ENetworkModeWcdma;
+    homeNetwork.iStatus = RMobilePhone::ENetworkStatusCurrent;
+    homeNetwork.iBandInfo = RMobilePhone::EBandUnknown;
+    homeNetwork.iCountryCode = _L("234");
+    homeNetwork.iCdmaSID = _L("");
+    homeNetwork.iAnalogSID = _L("");
+    homeNetwork.iNetworkId = _L("23499");
+    homeNetwork.iDisplayTag = _L("symbian");
+    homeNetwork.iShortName = _L("symbian");
+    homeNetwork.iLongName = _L("symbian mobile");
+    homeNetwork.iAccess = RMobilePhone::ENetworkAccessUtran;
+    homeNetwork.iEgprsAvailableIndicator = ETrue;
+    homeNetwork.iHsdpaAvailableIndicator = ETrue;
+    homeNetwork.iHsupaAvailableIndicator = ETrue;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneNetworkInfoV8> homeNetworkData(homeNetwork);
+    homeNetworkData.SerialiseL(completeData);
+
+    TInt err = iPhone.Open(iTelServer,KMmTsyPhoneName);
+    ASSERT_EQUALS(KErrNone, err);
+
+    err=iMockLTSY.Connect();
+    ASSERT_EQUALS(KErrNone, err);
+
+    // EMmTsyBootNotifyModemStatusReadyIPC
+    ASSERT_EQUALS(KErrNone, iMockLTSY.PauseCompletion());
+    iMockLTSY.CompleteL(EMmTsyBootNotifyModemStatusReadyIPC,KErrNone);
+
+    // EMobilePhoneGetNetworkRegistrationStatus
+    iMockLTSY.ExpectL(EMobilePhoneGetNetworkRegistrationStatus);
+    iMockLTSY.CompleteL(EMobilePhoneGetNetworkRegistrationStatus,KErrNone,0);
+    // EMmTsyBootNotifySimStatusReadyIPC
+    iMockLTSY.ExpectL(EMmTsyBootNotifySimStatusReadyIPC);
+
+    ASSERT_EQUALS(KErrNone, iMockLTSY.ResumeCompletion());
+    
+    
+    
+
+    
+    RMobileONStore  onStore;
+    TInt ret = onStore.Open(iPhone);
+    ASSERT_EQUALS(KErrNone, ret);
+    CleanupClosePushL(onStore);
+        
+        
+    TRequestStatus requestStatus;
+    RMobileONStore::TMobileONStoreInfoV1 storeInfo;
+    RMobileONStore::TMobileONStoreInfoV1Pckg storePckg(storeInfo);
+    
+    onStore.GetInfo(requestStatus, storePckg);      
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+
+    ASSERT_EQUALS(KErrNone, iMockLTSY.PauseCompletion());
+
+    TRequestStatus mockLtsyStatus;
+    iMockLTSY.NotifyTerminated(mockLtsyStatus);
+    iMockLTSY.CompleteL(EMmTsyBootNotifySimStatusReadyIPC,KErrNone,0);
+                        
+    // EMobilePhoneGetHomeNetwork
+    iMockLTSY.ExpectL(EMobilePhoneGetHomeNetwork);
+    iMockLTSY.CompleteL(EMobilePhoneGetHomeNetwork,KErrNone,completeData,0);
+
+    // EMmTsyPhoneGetPin1DisableSupportedIPC
+    iMockLTSY.ExpectL(EMmTsyPhoneGetPin1DisableSupportedIPC);
+    
+    // EMmTsySimRefreshRegisterIPC
+    iMockLTSY.ExpectL(EMmTsySimRefreshRegisterIPC);
+    
+    // EMobilePhoneGetServiceTable
+    RMobilePhone::TMobilePhoneServiceTable serviceTable = RMobilePhone::ESIMServiceTable;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneServiceTable> serviceTableData(serviceTable);
+    expData.Close();
+    serviceTableData.SerialiseL(expData);
+    iMockLTSY.ExpectL(EMobilePhoneGetServiceTable, expData);
+  
+    TName name(KETelIccAdnPhoneBook);
+    expData.Close();
+    TMockLtsyPhoneBookData0 storeInitData(name);
+    storeInitData.SerialiseL(expData);
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, expData);   
+
+
+    CStorageInfoData storageData;
+    SetStorageInfoData(storageData);
+    
+    
+    TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData);
+    completeData.Close();
+    retStoreInitC.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, completeData, 0);
+
+
+    // EMobilePhoneGetALSLine
+    iMockLTSY.ExpectL(EMobilePhoneGetALSLine);
+  
+    iMockLTSY.ExpectL(ECustomGetIccCallForwardingStatusIPC);
+  
+    // EMobilePhoneGetIccMessageWaitingIndicators
+    iMockLTSY.ExpectL(EMobilePhoneGetIccMessageWaitingIndicators);
+
+    //ECustomCheckAlsPpSupportIPC
+    iMockLTSY.ExpectL(ECustomCheckAlsPpSupportIPC);
+
+    //EMobilePhoneGetCustomerServiceProfile
+    iMockLTSY.ExpectL(EMobilePhoneGetCustomerServiceProfile);
+    
+    
+    // Complete for EMmTsyPhoneGetPin1DisableSupportedIPC 
+    TBool pin1DisableSupport = ETrue;
+    TMockLtsyData1<TBool> pin1DisableSupportData(pin1DisableSupport);
+    completeData.Close();
+    pin1DisableSupportData.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMmTsyPhoneGetPin1DisableSupportedIPC,KErrNone,completeData,0);
+
+    // Complete for EMmTsySimRefreshRegisterIPC
+    iMockLTSY.CompleteL(EMmTsySimRefreshRegisterIPC, KErrGeneral, 0);       
+
+    // Complete for EMobilePhoneGetServiceTable
+    RMobilePhone::TMobilePhoneServiceTableV1 serviceTableResult;
+    serviceTableResult.iServices1To8  = 0xFF;
+    serviceTableResult.iServices9To16 = 0xFF;
+    serviceTableResult.iServices17To24= 0xFF;
+    serviceTableResult.iServices25To32= 0xFF;
+    serviceTableResult.iServices33To40= 0xFF;
+    serviceTableResult.iServices41To48= 0xFF;
+    serviceTableResult.iServices49To56= 0xFF;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneServiceTableV1> serviceTableResultData(serviceTableResult);
+    completeData.Close();
+    serviceTableResultData.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMobilePhoneGetServiceTable,KErrNone,completeData,0);
+    
+    
+    // Complete for EMobilePhoneGetALSLine
+    RMobilePhone::TMobilePhoneALSLine alsLine = RMobilePhone::EAlternateLinePrimary;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneALSLine> alsLineData(alsLine);
+    completeData.Close();
+    alsLineData.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMobilePhoneGetALSLine,KErrNone,completeData,0);
+
+    
+    
+    // Complete for EMobilePhoneGetIccMessageWaitingIndicators
+    RMobilePhone::TMobilePhoneMessageWaitingV1 expectedMessageIndicators;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneMessageWaitingV1>
+                                    indicatorsData(expectedMessageIndicators);
+    completeData.Close();
+    indicatorsData.SerialiseL(completeData); 
+    iMockLTSY.CompleteL(EMobilePhoneGetIccMessageWaitingIndicators, KErrNone, completeData);
+    
+    //Complete for ECustomCheckAlsPpSupportIPC
+    RMmCustomAPI::TAlsSupport alsSupport(RMmCustomAPI::EAlsSupportOff); 
+    TMockLtsyData1< RMmCustomAPI::TAlsSupport > alsSupportData(alsSupport);
+    completeData.Close();   
+    alsSupportData.SerialiseL(completeData);
+    iMockLTSY.CompleteL(ECustomCheckAlsPpSupportIPC, KErrNone, completeData);
+    
+    // Complete for EMobilePhoneGetCustomerServiceProfile
+    RMobilePhone::TMobilePhoneCspFileV1 completeCsp;
+    completeCsp.iCallOfferingServices = 1;
+    completeCsp.iCallRestrictionServices = 2;
+    completeCsp.iOtherSuppServices = 3;
+    completeCsp.iCallCompletionServices = 4;
+    completeCsp.iTeleservices = 5;
+    completeCsp.iCphsTeleservices = 6;
+    completeCsp.iCphsFeatures = 7;
+    completeCsp.iNumberIdentServices = 8;
+    completeCsp.iPhase2PlusServices = 9;
+    completeCsp.iValueAddedServices = 10;
+    TMockLtsyData1<RMobilePhone::TMobilePhoneCspFileV1> completeLtsyData(completeCsp);
+    completeData.Close();
+    completeLtsyData.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMobilePhoneGetCustomerServiceProfile, KErrNone, completeData, 10); 
+
+    
+    //EMmTsyPhoneBookStoreCacheIPC
+    CArrayPtrSeg<CPhoneBookStoreEntry>* cache = new(ELeave) CArrayPtrSeg<CPhoneBookStoreEntry>( 1 );
+    CleanupStack::PushL(cache);
+    
+    TMockLtsyPhoneBookData1<CArrayPtrSeg<CPhoneBookStoreEntry>*> storeCacheData(name, cache);
+    completeData.Close();
+    storeCacheData.SerialiseL(completeData);   
+    TMockLtsyPhoneBookData0 adnStoreInitData(name);
+    expData.Close();
+    adnStoreInitData.SerialiseL(expData);
+    
+                  
+    iMockLTSY.ExpectL(EMmTsyPhoneBookStoreCacheIPC, expData);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreCacheIPC, KErrNone, completeData, 0);
+    
+    TInt readIndex(-1);
+    TMockLtsyData1<TInt> tsyData(readIndex);
+    expData.Close();
+    tsyData.SerialiseL(expData);
+    iMockLTSY.ExpectL(EMmTsyONStoreGetInfoIPC, expData);
+
+    ASSERT_EQUALS(KErrNone, iMockLTSY.ResumeCompletion());
+
+    User::WaitForRequest(mockLtsyStatus);
+    AssertMockLtsyStatusL();
+
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    User::After(KOneSecond);
+    ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+    
+    
+    const TInt KNumOfEntries = 11;
+    const TInt KUsedEntries = 21;
+    const TInt KNameLen = 31;
+    const TInt KNumLen = 41;
+    TServiceType serviceType = {KNumOfEntries, KUsedEntries, KNameLen, KNumLen};
+    TMockLtsyData1<TServiceType> tsyData2(serviceType);           
+    completeData.Close();
+    tsyData2.SerialiseL(completeData);
+    iMockLTSY.CompleteL(EMmTsyONStoreGetInfoIPC, KErrNone, completeData);
+    
+    
+    User::WaitForRequest(requestStatus);        
+    ASSERT_EQUALS(KErrNone, requestStatus.Int());   
+        
+    ASSERT_EQUALS(RMobilePhoneStore::EOwnNumberStore, storeInfo.iType);
+    ASSERT_EQUALS(KONStoreCaps, storeInfo.iCaps);
+    ASSERT_TRUE(0 == storeInfo.iName.Compare(KETelOwnNumberStore));
+    ASSERT_EQUALS(KUsedEntries, storeInfo.iUsedEntries);
+    ASSERT_EQUALS(KNumOfEntries, storeInfo.iTotalEntries);
+    ASSERT_EQUALS(KNumLen, storeInfo.iNumberLen);
+    ASSERT_EQUALS(KNameLen, storeInfo.iTextLen);
+        
+    CleanupStack::PopAndDestroy(5, this); // this, etc...
+    }
+
+/**
 @SYMTestCaseID BA-CTSY-PBON-OSGI-0002
 @SYMComponent  telephony_ctsy
 @SYMTestCaseDesc Test support in CTSY for cancelling of RMobileONStore::GetInfo
@@ -2236,6 +2692,12 @@
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
 
+    // Open ADN phonebook
+    TName name(KETelIccAdnPhoneBook);
+    RMobilePhoneBookStore bookStore;
+    OpenPhoneBookStoreL(bookStore, name, iPhone);
+    CleanupClosePushL(bookStore);
+
 	TRequestStatus mockLtsyStatus;
 	iMockLTSY.NotifyTerminated(mockLtsyStatus);
 
@@ -2281,7 +2743,7 @@
 	User::WaitForRequest(mockLtsyStatus);
 	AssertMockLtsyStatusL();
 	
-	CleanupStack::PopAndDestroy(4); // expData, this
+	CleanupStack::PopAndDestroy(5); // expData, this
 	
 	}
 
@@ -2357,6 +2819,12 @@
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
 
+    // Open ADN phonebook
+    TName name(KETelIccAdnPhoneBook);
+    RMobilePhoneBookStore bookStore;
+    OpenPhoneBookStoreL(bookStore, name, iPhone);
+    CleanupClosePushL(bookStore);
+
 	RTelServer telServer2;
 	TInt ret = telServer2.Connect();
 	ASSERT_EQUALS(KErrNone, ret);
@@ -2442,7 +2910,7 @@
 	
 	AssertMockLtsyStatusL();
 	
-	CleanupStack::PopAndDestroy(7, this); 
+	CleanupStack::PopAndDestroy(8, this); 
 	}
 
 
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyphonebookstorefu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyphonebookstorefu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -141,33 +141,39 @@
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestDelete00028L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestDelete00029L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestDelete00030L);
-	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0001L);     //adn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0001L);     //adn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0001bL);
 	//ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0002L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0003L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0004L);
 	//ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0005L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0006L);     //fdn
-	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0006bL);
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0006bL);
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0006cL);
 	//ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0007L);  
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0008L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo0009L);
 	//ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00010L);
-	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00011L);   //sdn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00011L);   //sdn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00011bL);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00012L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00013L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00014L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00015L);
-	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00016L);    //vmbx
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00016L);    //vmbx
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00016bL);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00017L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00018L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00019L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00020L);
-	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00021L);    //bdn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00021L);    //bdn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00021bL);
 	//ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00022L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00023L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00024L);
 	//ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00025L);
-	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00026L);    //mbdn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00026L);    //mbdn
+    ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00026bL);
 	//ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00027L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00028L);
 	ADD_TEST_STEP_ISO_CPP(CCTsyPhoneBookStoreFU, TestGetInfo00029L);
@@ -2121,9 +2127,24 @@
 @SYMTestType CT
 */
 void CCTsyPhoneBookStoreFU::TestGetInfo0001L()
-	{
-    AuxGetInfo1L(KETelIccAdnPhoneBook);	
-	}
+    {
+    AuxGetInfo1L(KETelIccAdnPhoneBook); 
+    }
+
+
+/**
+@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0001b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for ADN phonebook with a slow SIM
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for ADN phonebook
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyPhoneBookStoreFU::TestGetInfo0001bL()
+    {
+    AuxGetInfo1bL(KETelIccAdnPhoneBook); 
+    }
 
 
 
@@ -2168,9 +2189,9 @@
 @SYMTestType CT
 */
 void CCTsyPhoneBookStoreFU::TestGetInfo0006L()
-	{
-    AuxGetInfo1L(KETelIccFdnPhoneBook);	    
-	}
+    {
+    AuxGetInfo1L(KETelIccFdnPhoneBook);     
+    }
 
 /**
 @SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0006b
@@ -2236,6 +2257,21 @@
     CleanupStack::PopAndDestroy(4, this); // this, data, completeData, bookStore, cache   
     }
 
+
+/**
+@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0006c
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for FDN phonebook with a slow SIM
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for FDN phonebook
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyPhoneBookStoreFU::TestGetInfo0006cL()
+    {
+    AuxGetInfo1bL(KETelIccFdnPhoneBook);     
+    }
+
 /**
 @SYMTestCaseID BA-CTSY-PBSTR-PBSGI-0008
 @SYMComponent  telephony_ctsy
@@ -2277,9 +2313,23 @@
 @SYMTestType CT
 */
 void CCTsyPhoneBookStoreFU::TestGetInfo00011L()
-	{
-    AuxGetInfo1L(KETelIccSdnPhoneBook);	    
-	}
+    {
+    AuxGetInfo1L(KETelIccSdnPhoneBook);     
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00011b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for SDN phonebook with a slow SIM
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for SDN phonebook
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyPhoneBookStoreFU::TestGetInfo00011bL()
+    {
+    AuxGetInfo1bL(KETelIccSdnPhoneBook);     
+    }
 
 
 /**
@@ -2357,9 +2407,23 @@
 @SYMTestType CT
 */
 void CCTsyPhoneBookStoreFU::TestGetInfo00016L()
-	{
-    AuxGetInfo1L(KETelIccVoiceMailBox);	    
-	}
+    {
+    AuxGetInfo1L(KETelIccVoiceMailBox);     
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00016b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for VMBX phonebook with a slow SIM
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for VMBX phonebook
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyPhoneBookStoreFU::TestGetInfo00016bL()
+    {
+    AuxGetInfo1bL(KETelIccVoiceMailBox);     
+    }
 
 
 /**
@@ -2433,9 +2497,23 @@
 @SYMTestType CT
 */
 void CCTsyPhoneBookStoreFU::TestGetInfo00021L()
-	{
-    AuxGetInfo1L(KETelIccBdnPhoneBook);	    
-	}
+    {
+    AuxGetInfo1L(KETelIccBdnPhoneBook);     
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00021b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for BDN phonebook with slow SIM
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for BDN phonebook
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyPhoneBookStoreFU::TestGetInfo00021bL()
+    {
+    AuxGetInfo1bL(KETelIccBdnPhoneBook);     
+    }
 
 
 /**
@@ -2478,9 +2556,23 @@
 @SYMTestType CT
 */
 void CCTsyPhoneBookStoreFU::TestGetInfo00026L()
-	{
-    AuxGetInfo1L(KETelIccMbdnPhoneBook);	    
-	}
+    {
+    AuxGetInfo1L(KETelIccMbdnPhoneBook);        
+    }
+
+/**
+@SYMTestCaseID BA-CTSY-PBSTR-PBSGI-00026b
+@SYMComponent  telephony_ctsy
+@SYMTestCaseDesc Test support in CTSY for RMobilePhoneBookStore::GetInfo for MBDN phonebook with slow SIM
+@SYMTestPriority High
+@SYMTestActions Invokes RMobilePhoneBookStore::GetInfo for MBDN phonebook
+@SYMTestExpectedResults Pass
+@SYMTestType CT
+*/
+void CCTsyPhoneBookStoreFU::TestGetInfo00026bL()
+    {
+    AuxGetInfo1bL(KETelIccMbdnPhoneBook);        
+    }
 
 
 
@@ -5446,7 +5538,7 @@
     	ASSERT_EQUALS((TUint16)0, bookInfo.iChangeCounter);	
     	if(!name.CompareF( KETelIccVoiceMailBox ))
     		{
-	    	ASSERT_EQUALS((TUint32)0, bookInfo.iCaps);	
+	    	ASSERT_EQUALS(KPBTypeVMBXCaps, bookInfo.iCaps);	
     		}
     	else
     		{
@@ -5502,6 +5594,14 @@
 	    					RMobilePhoneBookStore::KCapsRestrictedWriteAccess),
 	    		bookInfo.iCaps);	
     		}
+        else if( !name.CompareF( KETelIccVoiceMailBox ))
+            {
+            ASSERT_EQUALS(KPBTypeVMBXCaps, bookInfo.iCaps);
+            }
+        else if( !name.CompareF( KETelIccMbdnPhoneBook ))
+            {
+            ASSERT_EQUALS(KPBTypeMBDNCaps, bookInfo.iCaps);
+            }
     	else
     		{
 	    	ASSERT_EQUALS((TUint32)0, bookInfo.iCaps);	
@@ -5563,10 +5663,13 @@
     	ASSERT_TRUE(bookInfo.iLocation == bookInfo2.iLocation); 
     	ASSERT_TRUE(bookInfo.iIdentity == bookInfo2.iIdentity); 
     	ASSERT_TRUE(bookInfo.iChangeCounter == bookInfo2.iChangeCounter);   // no write or delete was done
-        if ( !name.CompareF( KETelIccVoiceMailBox ) || 
-        		!name.CompareF( KETelIccMbdnPhoneBook ) )
+        if ( !name.CompareF( KETelIccVoiceMailBox ) )
             {
-        	ASSERT_EQUALS(KCaps, bookInfo2.iCaps);	
+            ASSERT_EQUALS(KPBTypeVMBXCaps, bookInfo2.iCaps);  
+            }
+        else if ( !name.CompareF( KETelIccMbdnPhoneBook ) )
+            {
+            ASSERT_EQUALS(KPBTypeMBDNCaps, bookInfo2.iCaps);  
             }
         }
 
@@ -5615,6 +5718,130 @@
     }
     
 
+void CCTsyPhoneBookStoreFU::AuxGetInfo1bL(const TDesC& aName)
+    {
+	// Since we can not get the phone book info from the SIM if the phone book was not initilized, the 
+	// CTSY must make sure that the phone book  was initilize before requesting the info from 
+	// the LTSY. This test test if the CTSY knows to wait for the initilize request to complete 
+	// before requesting to get the phone book info.
+
+	OpenEtelServerL(EUseExtendedError);
+	CleanupStack::PushL(TCleanupItem(Cleanup,this));
+	OpenPhone2L();
+
+	RBuf8 data;
+	CleanupClosePushL(data);
+	
+	RBuf8 data2;
+	CleanupClosePushL(data2);
+
+	TName name(aName);
+	RMobilePhoneBookStore bookStore;
+	CleanupClosePushL(bookStore);
+	
+    TMockLtsyPhoneBookData0 storeInitData(name);
+    storeInitData.SerialiseL(data);
+  	iMockLTSY.ExpectL(EMmTsyPhoneBookStoreInitIPC, data);	
+
+	TInt ret = bookStore.Open(iPhone, name);	
+	
+	ASSERT_EQUALS(KErrNone, ret);	
+	
+	TRequestStatus requestStatus;
+   	TRequestStatus mockLtsyStatus;
+	RMobilePhoneBookStore::TMobilePhoneBookInfoV1 bookInfo;
+	RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg bookPckg(bookInfo);
+	bookStore.GetInfo(requestStatus, bookPckg); 	
+	
+	ASSERT_EQUALS(KRequestPending, requestStatus.Int());	
+	User::After(KOneSecond);
+	ASSERT_EQUALS(KRequestPending, requestStatus.Int());	
+	
+
+    CStorageInfoData storageData;
+	SetStorageInfoData(storageData);
+	
+    TMockLtsyPhoneBookData1< CStorageInfoData > retStoreInitC(name, storageData); 
+    retStoreInitC.SerialiseL(data2);
+    iMockLTSY.CompleteL(EMmTsyPhoneBookStoreInitIPC, KErrNone, data2, 0);
+
+    TInt expected = KErrNone;
+    TInt usedEntries(12);
+    if ( !aName.CompareF( KETelIccAdnPhoneBook ) ||
+            !aName.CompareF( KETelIccFdnPhoneBook ))
+        {
+        data.Close();
+        storeInitData.SerialiseL(data);
+        iMockLTSY.ExpectL(EMmTsyPhoneBookStoreCacheIPC, data);
+        CArrayPtrSeg<CPhoneBookStoreEntry>* cache = new(ELeave) CArrayPtrSeg<CPhoneBookStoreEntry>( 1 );
+        CleanupStack::PushL(cache);
+    
+        TMockLtsyPhoneBookData1<CArrayPtrSeg<CPhoneBookStoreEntry>*> storeCacheData(name, cache);
+        data2.Close();
+        storeCacheData.SerialiseL(data2);   
+    
+                  
+        iMockLTSY.CompleteL(EMmTsyPhoneBookStoreCacheIPC, KErrNone, data2, 0);
+        CleanupStack::PopAndDestroy(cache);
+        expected = KErrNotReady;
+        }
+    else if ( ( !aName.CompareF( KETelIccBdnPhoneBook ) ) || (!aName.CompareF( KETelIccMbdnPhoneBook ) ) )
+        {
+        usedEntries = 0;
+        }
+    else
+        {
+        data.Close();
+        TMockLtsyPhoneBookData0 tsyData(name);           
+        tsyData.SerialiseL(data);
+
+        iMockLTSY.ExpectL(EMmTsyPhoneBookStoreGetInfoIPC, data);
+        ASSERT_EQUALS(KRequestPending, requestStatus.Int());    
+        User::After(KOneSecond);
+        ASSERT_EQUALS(KRequestPending, requestStatus.Int());
+        TMockLtsyPhoneBookData1< TInt > styData2(name, usedEntries);
+        data2.Close();    
+        styData2.SerialiseL(data2);
+        iMockLTSY.CompleteL(EMmTsyPhoneBookStoreGetInfoIPC, KErrNone, data2, 10);
+        }
+
+
+    User::WaitForRequest(requestStatus);        
+   	AssertMockLtsyStatusL();
+   	ASSERT_EQUALS(expected, requestStatus.Int());
+   	if ( ( aName.CompareF( KETelIccBdnPhoneBook ) ) && (KErrNone == expected) )
+   	    {
+        ASSERT_TRUE(0 == bookInfo.iName.Compare(name));
+        
+        ASSERT_EQUALS(usedEntries, bookInfo.iUsedEntries);	
+        ASSERT_EQUALS(-1, bookInfo.iTotalEntries);	
+        ASSERT_EQUALS(50, bookInfo.iMaxTextLength);	
+        ASSERT_EQUALS(50, bookInfo.iMaxNumLength);	
+        ASSERT_EQUALS(RMobilePhoneBookStore::ELocationIccMemory, bookInfo.iLocation);	
+        ASSERT_EQUALS((TUint16)0, bookInfo.iChangeCounter);	
+        if( !name.CompareF( KETelIccVoiceMailBox ))
+            {
+            ASSERT_EQUALS(KPBTypeVMBXCaps, bookInfo.iCaps);
+            }
+        else if( !name.CompareF( KETelIccMbdnPhoneBook ))
+            {
+            ASSERT_EQUALS(KPBTypeMBDNCaps, bookInfo.iCaps);
+            }
+        else if( !name.CompareF( KETelIccSdnPhoneBook ))
+            {
+            ASSERT_EQUALS((TUint32)RMobilePhoneStore::KCapsReadAccess, bookInfo.iCaps);
+            }
+        else
+            {
+            ASSERT_EQUALS((TUint32)0, bookInfo.iCaps);  
+            }
+	
+   	    }
+	AssertMockLtsyStatusL();
+
+	CleanupStack::PopAndDestroy(4, this); // data, data2, this...	
+    }
+
 
 void CCTsyPhoneBookStoreFU::AuxGetInfo2L(const TDesC& aName)
     {
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsysmsmessagingfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsysmsmessagingfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -406,6 +406,7 @@
     compTsyData.SerialiseL(data);
     
     iMockLTSY.CompleteL(EMobileSmsMessagingSendMessage, KErrGeneral, data, 10);
+    
     messaging.SendMessage(reqStatus, tmpName, smsAttrPckg);
 
     data.Close();
@@ -417,6 +418,7 @@
     User::WaitForRequest(reqStatus);
     ASSERT_EQUALS(KErrGeneral, reqStatus.Int());
     
+    
     AssertMockLtsyStatusL();
 
     //-------------------------------------------------------------------------
@@ -459,6 +461,28 @@
 
     AssertMockLtsyStatusL();
 
+    //--------------------------------------------------------------------------
+    // TEST B3: failure on completion of pending request from LTSY->CTSY
+    //--------------------------------------------------------------------------
+    TMockLtsyData1<TSendSmsDataAndAttributes> expData(dataAndAttr);           
+    expData.SerialiseL(data);    
+    iMockLTSY.ExpectL(EMobileSmsMessagingSendMessage, data);
+   
+    data.Close();
+    compTsyData.SerialiseL(data);  
+    //simulate error code sent by network when SMS msg has an invalid destination number
+    TInt compErrorCode = -298123266;
+    iMockLTSY.CompleteL(EMobileSmsMessagingSendMessage, compErrorCode, data, 10);
+   
+    messaging.SendMessage(reqStatus, tmpName, smsAttrPckg);
+
+    
+    User::WaitForRequest(reqStatus);
+    ASSERT_EQUALS(KErrGsmSMSNetworkOutOfOrder, reqStatus.Int());
+   
+    AssertMockLtsyStatusL();
+
+    
     //-------------------------------------------------------------------------
     // TEST C: Successful completion request of
     // RMobileSmsMessaging::SendMessage when result is not cached.
--- a/telephonyserverplugins/common_tsy/test/component/src/cctsyussdmessagingfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/common_tsy/test/component/src/cctsyussdmessagingfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -1295,13 +1295,9 @@
 
     User::WaitForRequest(requestStatus2);        
 
-	/*
-	 * The function returned KErrNone instead of KErrServerBusy.
-	 */
-
-	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 380303);
-
-	ASSERT_EQUALS(KErrServerBusy, requestStatus2.Int());	
+    // CTSY treats USSD receive requests as multiple completion requests, and completes
+    // all client requests when a message comes in.
+	ASSERT_EQUALS(KErrNone, requestStatus2.Int());	
 
 	ASSERT_EQUALS(completeAttributes1.iFlags , attributes1.iFlags );
 	ASSERT_EQUALS(completeAttributes1.iFormat, attributes1.iFormat);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/common_tsy/test/integration/group/integration_test.pkg	Fri Mar 19 09:55:57 2010 +0200
@@ -0,0 +1,1 @@
+"\sf\os\cellularsrv\telephonyserverplugins\common_tsy\test\integration\scripts_implemented\te_ctsyintegration_dtmf_auto.script"-"c:\testdata\scripts\te_ctsyintegration_dtmf_auto.script"
--- a/telephonyserverplugins/ctsydispatchlayer/exportinc/mltsydispatchcallcontrolinterface.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/exportinc/mltsydispatchcallcontrolinterface.h	Fri Mar 19 09:55:57 2010 +0200
@@ -475,6 +475,7 @@
 public:
 
 	static const TInt KLtsyDispatchCallControlSwapApiId = KDispatchCallControlFuncUnitId + 14;
+	static const TInt KLtsyDispatchCallControlSingleSwapApiId = KDispatchCallControlFuncUnitId + 29;
 
 	/**
 	 * The CTSY Dispatcher shall invoke this function on receiving the EMobileCallSwap
@@ -483,30 +484,50 @@
 	 * It is a request call that is completed by invoking
 	 * CCtsyDispatcherCallback::CallbackCallControlSwapComp()
 	 *
-	 * This request should be completed when the request to swap the call has
-	 * been placed.
+	 * This request should be completed when the request to swap two calls has
+	 * been placed. One is held and the other connected. The held call becomes connected
+	 * (RMobileCall::EStatusConnected) and the connected call becomes held 
+	 * (RMobileCall::EStatusHold).
 	 *
 	 * Implementation of this interface should request that the Licensee TSY
-	 * swap the specified calls.  Swapping requires two calls to be active,
-	 * one held and one connected.  It involves switching the states of the
-	 * two call such that the held call becomes connected (RMobileCall::EStatusConnected)
-	 * and the connected call becomes held (RMobileCall::EStatusHold).
+	 * swap the specified calls. Swapping is allowed for one or two active calls.
 	 *
-	 * @param aHeldCallId The Call ID of the held call to swap.
-	 *
-	 * @param aConnectedCallId The Call ID of the connected call to swap with
-	 * aHeldCallId.
+	 * @param aCallId The Call ID of the call to swap.
 	 *
 	 * @return KErrNone on success, otherwise another error code indicating the
 	 * failure.
 	 *
 	 * @see RMobileCall::Swap()
 	 */
-	virtual TInt HandleSwapReqL(TInt aHeldCallId, TInt aConnectedCallId) = 0;
+	virtual TInt HandleSwapReqL(TInt aCallId, TInt aSecondCallId) = 0;
+
+	/**
+	 * The CTSY Dispatcher shall invoke this function on receiving the EMobileCallSwap
+	 * request, for a single call, from the CTSY.
+	 *
+	 * It is a request call that is completed by invoking
+	 * CCtsyDispatcherCallback::CallbackCallControlSwapComp()
+	 *
+	 * This request should be completed when the request to swap the single call has
+	 * been placed.
+	 *
+	 * Implementation of this interface should request that the Licensee TSY
+	 * swap the specified call. The state of the call will be swapped from held to connected 
+	 * (or visa versa)
+	 *
+	 * @param aCallId The Call ID of the single call to swap.
+	 *
+	 * @return KErrNone on success, otherwise another error code indicating the
+	 * failure.
+	 *
+	 * @see RMobileCall::Swap()
+	 */
+	virtual TInt HandleSwapReqL(TInt aCallId) = 0;
 
 	}; // class MLtsyDispatchCallControlSwap
 
 
+	
 class MLtsyDispatchCallControlLoanDataPort : public MLtsyDispatchInterface
 	{
 public:
@@ -909,6 +930,9 @@
 
 	}; // class MLtsyDispatchCallControlUpdateLifeTimer
 
-
+	
+// Note: A static constant has been defined in MLtsyDispatchCallControlSwap (abbove) with the highest Id 
+// in this file... "KLtsyDispatchCallControlSingleSwapApiId = KDispatchCallControlFuncUnitId + 29"
+// If adding a new Id it must be greater than KDispatchCallControlFuncUnitId + 29.
 
 #endif /*MLTSYDISPATCHCALLCONTROLINTERFACE_H_*/
--- a/telephonyserverplugins/ctsydispatchlayer/inc/ccallcontroldispatcher.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/inc/ccallcontroldispatcher.h	Fri Mar 19 09:55:57 2010 +0200
@@ -218,6 +218,7 @@
     MLtsyDispatchCallControlSendDtmfTones* iLtsyDispatchCallControlSendDtmfTones;
     MLtsyDispatchCallControlGetIdentityServiceStatus* iLtsyDispatchCallControlGetIdentityServiceStatus;
     MLtsyDispatchCallControlSwap* iLtsyDispatchCallControlSwap;
+    MLtsyDispatchCallControlSwap* iLtsyDispatchCallControlSingleSwap;
     MLtsyDispatchCallControlLoanDataPort* iLtsyDispatchCallControlLoanDataPort;
     MLtsyDispatchCallControlRecoverDataPort* iLtsyDispatchCallControlRecoverDataPort;
     MLtsyDispatchCallControlStartDtmfTone* iLtsyDispatchCallControlStartDtmfTone;
@@ -283,13 +284,13 @@
      * These Call IDs should only have a value != -1 when there is a pending swap
      * operation.
      */
-    TInt iSwapHeldCallId;
-    TInt iSwapConnectedCallId;
+    TInt iSwapCallId;
+    TInt iSecondSwapCallId;
 
     /**
      * These are the two Call IDs of the calls on which a transfer operation
-     * has been requested. It is needed for the same reason as iSwapHeldCallId
-     * and iSwapConnectedCallId above.
+     * has been requested. It is needed for the same reason as iSwapCallId
+     * and iSecondSwapCallId above.
      */
     TInt iTransferHeldCallId;
     TInt iTransferSecondCallId;
--- a/telephonyserverplugins/ctsydispatchlayer/src/ccallcontroldispatcher.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/src/ccallcontroldispatcher.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -32,8 +32,8 @@
 		iMessageManagerCallback(aMessageManagerCallback),
 		iRequestAsyncOneShot(aRequestAsyncOneShot),
 		iFoundDtmfStop(EFalse), iModeUsedForVoiceCallDial(RMobilePhone::EServiceUnspecified),
-		iFdnCheckPerformed(EFalse),iSwapHeldCallId(KInvalidCallId),
-		iSwapConnectedCallId(KInvalidCallId),iTransferHeldCallId(KInvalidCallId),
+		iFdnCheckPerformed(EFalse),iSwapCallId(KInvalidCallId),
+		iSecondSwapCallId(KInvalidCallId),iTransferHeldCallId(KInvalidCallId),
 		iTransferSecondCallId(KInvalidCallId)
 	{
 	iDtmfString.Zero();
@@ -237,6 +237,17 @@
         __ASSERT_DEBUG(iLtsyDispatchCallControlSwap, CtsyDispatcherPanic(EInvalidNullPtr));
   		}
 
+	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId))
+		{
+		TAny* swapInterface = NULL;
+		iLtsyFactoryV1.GetDispatchHandler(
+		       	MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId,
+		       	swapInterface);
+		iLtsyDispatchCallControlSingleSwap =
+				static_cast<MLtsyDispatchCallControlSwap*>(swapInterface);
+        __ASSERT_DEBUG(iLtsyDispatchCallControlSingleSwap, CtsyDispatcherPanic(EInvalidNullPtr));
+  		}
+		
 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId))
 		{
 		TAny* loanDataPortInterface = NULL;
@@ -839,9 +850,23 @@
 		{
 		const CCallDataPackage* dataPackage = static_cast<const CCallDataPackage*>(aDataPackage);
 		RMobilePhone::TMobileService mode;
-		dataPackage->GetCallIdAndMode(iSwapHeldCallId, mode);
-		dataPackage->UnPackData(iSwapConnectedCallId);
-		ret = iLtsyDispatchCallControlSwap->HandleSwapReqL(iSwapHeldCallId, iSwapConnectedCallId);
+		dataPackage->GetCallIdAndMode(iSwapCallId, mode);
+		dataPackage->UnPackData(iSecondSwapCallId);
+
+		if (iSwapCallId == KInvalidCallId)
+			{
+			// Swapping a single call.
+			ret = iLtsyDispatchCallControlSwap->HandleSwapReqL(iSecondSwapCallId);
+			}
+		else if (iSecondSwapCallId == KInvalidCallId)
+			{
+			// Swapping a single call.
+			ret = iLtsyDispatchCallControlSwap->HandleSwapReqL(iSwapCallId);
+			}		
+		else
+			{
+			ret = iLtsyDispatchCallControlSwap->HandleSwapReqL(iSwapCallId, iSecondSwapCallId);
+			}
 		}
 
 	return TSYLOGSETEXITERR(ret);
@@ -1651,7 +1676,7 @@
 	if (iTransferSecondCallId != KInvalidCallId)
 		{
 		dataPackage.SetCallIdAndMode(iTransferSecondCallId, RMobilePhone::EServiceUnspecified);
-		iSwapConnectedCallId = KInvalidCallId;
+		iSecondSwapCallId = KInvalidCallId;
 		iMessageManagerCallback.Complete(EMobileCallTransfer, &dataPackage, aError);
 		}
 
@@ -1726,17 +1751,17 @@
 		// Check in case LTSY has completed a swap when no swap was called
 		// Don't complete back to CTSY in this case
 
-		if (iSwapHeldCallId != KInvalidCallId)
+		if (iSwapCallId != KInvalidCallId)
 			{
-			dataPackage.SetCallIdAndMode(iSwapHeldCallId, RMobilePhone::EServiceUnspecified);
-			iSwapHeldCallId = KInvalidCallId;
+			dataPackage.SetCallIdAndMode(iSwapCallId, RMobilePhone::EServiceUnspecified);
+			iSwapCallId = KInvalidCallId;
 			iMessageManagerCallback.Complete(EMobileCallSwap, &dataPackage, aError);
 			}
 
-		if (iSwapConnectedCallId != KInvalidCallId)
+		if (iSecondSwapCallId != KInvalidCallId)
 			{
-			dataPackage.SetCallIdAndMode(iSwapConnectedCallId, RMobilePhone::EServiceUnspecified);
-			iSwapConnectedCallId = KInvalidCallId;
+			dataPackage.SetCallIdAndMode(iSecondSwapCallId, RMobilePhone::EServiceUnspecified);
+			iSecondSwapCallId = KInvalidCallId;
 			iMessageManagerCallback.Complete(EMobileCallSwap, &dataPackage, aError);
 			}
 
--- a/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsycallcontrolfu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsycallcontrolfu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -103,6 +103,7 @@
 	void DriverCreateIncomingCallL(TInt aCallId, RMobilePhone::TMobileService aMode);
 	void DriverAnswerIncomingCallL(TInt aCallId, RMobilePhone::TMobileService aMode, TBool aIsIsvCall = EFalse, TInt aAnswerError = KErrNone);
 	void DriverResumeCallL(TInt aCallId, TInt aResumeError);
+	void DriverSwapCallL(TInt aCallId, TInt aSwapError, RMobileCall::TMobileCallStatus aNewCallStatus);
 	void DriverSwapCallL(TInt aCallId1, TInt aCallId2, TInt aSwapError, RMobileCall::TMobileCallStatus aNewCall1Status, RMobileCall::TMobileCallStatus aNewCall2Status);
 
 	}; // class CCTsyCallControlFU
--- a/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookfu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookfu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -79,6 +79,11 @@
 	void TestUnit0011L();
 	void TestUnit0012L();
 	
+protected:
+    virtual void OpenNonCachingPhoneBookL(DispatcherPhonebook::TPhonebook aPhonebook, RMobilePhoneBookStore& aPhoneBookStore, TInt aError);
+    virtual void OpenCachingPhoneBookL(DispatcherPhonebook::TPhonebook aPhonebook, RMobilePhoneBookStore& aPhoneBookStore, TInt aError);
+    virtual void DoCleanup();
+	
 private:
 
 	void CreateTlvFromEntryL(const CPhoneBookEntry& aPhoneBookEntry, RBuf8& aBuf);
@@ -92,9 +97,7 @@
 
 	void OpenPhoneBookL(DispatcherPhonebook::TPhonebook aPhonebook, RMobilePhoneBookStore& aPhoneBookStore, RMmCustomAPI& aCustomApi);
 	void OpenPhoneBookWithInitialisationL(DispatcherPhonebook::TPhonebook aPhonebook, RMobilePhoneBookStore& aPhoneBookStore, TInt aError);
-	void OpenCachingPhoneBookL(DispatcherPhonebook::TPhonebook aPhonebook, RMobilePhoneBookStore& aPhoneBookStore, TInt aError);
 	void CompleteCacheL(DispatcherPhonebook::TPhonebook aPhonebook, TInt aError, TBool aIsRefresh);
-	void OpenNonCachingPhoneBookL(DispatcherPhonebook::TPhonebook aPhonebook, RMobilePhoneBookStore& aPhoneBookStore, TInt aError);
 	TBool InitialisationRequired(DispatcherPhonebook::TPhonebook aPhonebook) const;
 	TBool CachingPhonebook(DispatcherPhonebook::TPhonebook aPhonebook) const;
 	
@@ -127,8 +130,6 @@
 	static void PhoneBookEntryArrayCleanup(TAny* aArray);
 
 	void OpenSmsStoreL(RMobileSmsMessaging& aSmsMessaging, RMobileSmsStore& aSmsStore, const TDesC& aSmsStoreName);
-
-	virtual void DoCleanup();
 	
 private:
 	
--- a/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookonfu.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookonfu.h	Fri Mar 19 09:55:57 2010 +0200
@@ -31,14 +31,14 @@
 #include <test/tefunit.h>
 #include <etelmm.h>
 #include <etelmmcs.h>
-#include "cctsycomponenttestbase.h"
+#include "cctsyphonebookfu.h"
 
 _LIT(KText, "Number%d");											
 _LIT(KNumber, "0000000%d");
 _LIT(KText1, "Number1");											
 _LIT(KNumber1, "11111111");
 
-class CCTsyPhonebookOnFU : public CCtsyComponentTestBase
+class CCTsyPhonebookOnFU : public CCTsyPhonebookFU
 	{
 public:
 	// Create a suite of all the tests
--- a/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookonfunegative.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchinc/cctsyphonebookonfunegative.h	Fri Mar 19 09:55:57 2010 +0200
@@ -22,9 +22,9 @@
 #ifndef CTSYPHONEBOOKONFUNEGATIVE_H_
 #define CTSYPHONEBOOKONFUNEGATIVE_H_
 
-#include "cctsycomponenttestbase.h"
+#include "cctsyphonebookfu.h"
 
-class CCTsyPhonebookOnFUNegative : public CCtsyComponentTestBase
+class CCTsyPhonebookOnFUNegative : public CCTsyPhonebookFU
 	{
 public:
 	// Create a suite of all the tests
@@ -40,9 +40,13 @@
 	void TestReadEntryIpcL();
 	void TestReadSizeIpcL();
 	void TestWriteSizeIpcL();
+    virtual void DoCleanup();
 	
 private:
 	void OpenAndPushEtelAndPhoneONStoreL(RMobileONStore& aONStore);
+	
+private:
+	RMobilePhoneBookStore iAdnPhoneBookStore;
 	}; // class CCTsyPhonebookOnFUNegative
 
 
--- a/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsycallcontrolfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsycallcontrolfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -926,6 +926,12 @@
 	// Resume call
 	DriverResumeCallL(callId, KErrNone);
 
+	// Swap single call.
+	DriverSwapCallL(callId, KErrNone, RMobileCall::EStatusHold);
+	
+	// Swap single call again.
+	DriverSwapCallL(callId, KErrNone, RMobileCall::EStatusConnected);
+
 	TInt hangUpCause = KErrGsmCCNormalCallClearing;
 	DriverHangUpCallL(callId, hangUpCause);
 
@@ -960,13 +966,32 @@
 	User::WaitForRequest(notifyStatus);
 	ASSERT_EQUALS(KErrNone, notifyStatus.Int());
 	ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
-
-	// Attempt to swap it when it is the sole call (not supported by CTSY)
+	
+	mobileCall.NotifyMobileCallStatusChange(notifyStatus, callStatus);
+	
+	// Attempt to swap it when it is the sole call.
 	TRequestStatus swapStatus;
 	mobileCall.Swap(swapStatus);
 	User::WaitForRequest(swapStatus);
-	ASSERT_EQUALS(KErrNotSupported, swapStatus.Int());
-
+	ASSERT_EQUALS(KErrNone, swapStatus.Int());
+
+	User::WaitForRequest(notifyStatus);
+	ASSERT_EQUALS(KErrNone, notifyStatus.Int());
+	ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
+	
+	mobileCall.NotifyMobileCallStatusChange(notifyStatus, callStatus);
+
+	// Swapping single call again, back to connected.
+	swapStatus;
+	mobileCall.Swap(swapStatus);
+	User::WaitForRequest(swapStatus);
+	ASSERT_EQUALS(KErrNone, swapStatus.Int());
+
+	User::WaitForRequest(notifyStatus);
+	ASSERT_EQUALS(KErrNone, notifyStatus.Int());
+	ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
+
+	
 	TRequestStatus reqStatusTerminated;
 	iMockLTSY.NotifyTerminated(reqStatusTerminated); 
 	
@@ -976,8 +1001,8 @@
 	mobileLine.Close();
 	data.Close();
 	
-	User::WaitForRequest(reqStatusTerminated);
-	ASSERT_EQUALS(KErrNone, reqStatusTerminated.Int());
+	User::WaitForRequest(notifyStatus);
+	ASSERT_EQUALS(KErrNone, notifyStatus.Int());
 
 	AssertMockLtsyStatusL();
 	CleanupStack::PopAndDestroy(4, this); // mobileCall, mobileLine, data, this
@@ -3534,6 +3559,43 @@
 /**
  * Swap the call.
  *
+ * @param aCallId Call ID of held call to swap.
+ * @param aSwapError Error returned by LTSY in response to the swap request.
+ * @param aNewCallStatus New status of the call 1 if aSwapError = KErrNone
+ *
+ * In the case where aSwapError passed is not KErrNone, the new call statuses
+ * are irrelevant as the calls don't change state.
+ */
+void CCTsyCallControlFU::DriverSwapCallL(TInt aCallId, TInt aSwapError, 
+								RMobileCall::TMobileCallStatus aNewCallStatus)
+	{
+	RBuf8 data;
+	CleanupClosePushL(data);
+
+	TMockLtsyData1<TInt> mockData2(aCallId);
+	data.Close();
+	mockData2.SerialiseL(data);
+	iMockLTSY.ExpectL(MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId, data);
+
+    iMockLTSY.CompleteL(MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId, aSwapError);
+
+    if (aSwapError == KErrNone)
+    	{
+	    TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData2(
+	    		aCallId, RMobilePhone::EServiceUnspecified, aNewCallStatus);
+	    data.Close();
+	    mockCallData2.SerialiseL(data);
+	    iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
+    	}
+
+    data.Close();
+    CleanupStack::PopAndDestroy(1, &data);
+	} // CCTsyCallControlFU::DriverSwapCallL
+
+
+/**
+ * Swap the call.
+ *
  * @param aCallId1 Call ID of held call to swap.
  * @param aCallId2 Call ID of connected call to swap.
  * @param aSwapError Error returned by LTSY in response to the swap request.
@@ -3577,8 +3639,6 @@
 	} // CCTsyCallControlFU::DriverSwapCallL
 
 
-
-
 /**
  * Waits for an incoming call notification and opens the call.
  *
--- a/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsyphonebookonfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsyphonebookonfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -229,6 +229,9 @@
 	OpenEtelServerL(EUseExtendedError);
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
+    RMobilePhoneBookStore adnPhoneBookStore;
+    CleanupClosePushL(adnPhoneBookStore);
+    OpenCachingPhoneBookL(DispatcherPhonebook::EIccAdn,adnPhoneBookStore,KErrNone);
 	
 	RMobileONStore onStore;
 	TInt ret = onStore.Open(iPhone);
@@ -378,7 +381,7 @@
 	
 	AssertMockLtsyStatusL();
     
-	CleanupStack::PopAndDestroy(4, this); // completeData, expectData, onStore, this
+	CleanupStack::PopAndDestroy(5, this); // completeData, expectData, onStore, adnPhoneBookStore, this
 	}
 
 /**
@@ -395,6 +398,9 @@
 	OpenEtelServerL(EUseExtendedError);
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
+    RMobilePhoneBookStore adnPhoneBookStore;
+    CleanupClosePushL(adnPhoneBookStore);
+    OpenCachingPhoneBookL(DispatcherPhonebook::EIccAdn,adnPhoneBookStore,KErrNone);
 	
 	RMobileONStore onStore;
 	TInt ret = onStore.Open(iPhone);
@@ -470,7 +476,7 @@
 	
 	AssertMockLtsyStatusL();
 
-	CleanupStack::PopAndDestroy(3, this); // completeData, onStore, this
+	CleanupStack::PopAndDestroy(4, this); // completeData, onStore, adnPhoneBookStore, this
 	}
 
 	
@@ -492,6 +498,9 @@
 	OpenEtelServerL(EUseExtendedError);
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
+    RMobilePhoneBookStore adnPhoneBookStore;
+    CleanupClosePushL(adnPhoneBookStore);
+    OpenCachingPhoneBookL(DispatcherPhonebook::EIccAdn,adnPhoneBookStore,KErrNone);
 	
 	RMobileONStore onStore;
 	TInt ret = onStore.Open(iPhone);
@@ -573,7 +582,7 @@
 	ASSERT_EQUALS(KErrNone, mockLtsyStatus.Int());
 	AssertMockLtsyStatusL();
 	
-	CleanupStack::PopAndDestroy(3, this); // data, onStore, this
+	CleanupStack::PopAndDestroy(4, this); // data, onStore, adnPhoneBookStore, this
 
 	}
 	
--- a/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsyphonebookonfunegative.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/dispatchertests/dispatchsrc/cctsyphonebookonfunegative.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -44,6 +44,15 @@
 	}
 
 /**
+ * Cleanup
+ */
+void CCTsyPhonebookOnFUNegative::DoCleanup()
+    {
+    iAdnPhoneBookStore.Close();
+    CCTsyPhonebookFU::DoCleanup();
+    }
+
+/**
  * Wraps up boilerplate code for starting tests with a clean RPhone session and RMobileONStore
  * initialised. On return this and aONStore have been pushed to the CleanupStack
  */
@@ -52,6 +61,8 @@
 	OpenEtelServerL(EUseExtendedError);
 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
 	OpenPhoneL();
+
+    OpenCachingPhoneBookL(DispatcherPhonebook::EIccAdn,iAdnPhoneBookStore,KErrNone);
 	
 	TInt ret = aONStore.Open(iPhone);
 	ASSERT_EQUALS(ret, KErrNone);
--- a/telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/inc/cltsycallcontrolhandler.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/inc/cltsycallcontrolhandler.h	Fri Mar 19 09:55:57 2010 +0200
@@ -130,7 +130,10 @@
     virtual TInt HandleGetIdentityServiceStatusReqL(RMobilePhone::TMobilePhoneIdService aService);
 
     // From MLtsyDispatchCallControlSwap
-    virtual TInt HandleSwapReqL(TInt aHeldCallId, TInt aConnectedCallId);
+    virtual TInt HandleSwapReqL(TInt aCallId, TInt aSecondCallId);
+
+    // From MLtsyDispatchCallControlSwap
+    virtual TInt HandleSwapReqL(TInt aCallId);
 
     // From MLtsyDispatchCallControlLoanDataPort
     virtual TInt HandleLoanDataPortSyncL(TInt aCallId, RCall::TCommPort& aCommPort);
--- a/telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/src/cltsycallcontrolhandler.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/src/cltsycallcontrolhandler.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -385,12 +385,12 @@
 	} // CLtsyCallControlHandler::HandleDialReqL
 
 
-TInt CLtsyCallControlHandler::HandleTransferReqL(TInt aHeldCallId, TInt aSecondCallId)
+TInt CLtsyCallControlHandler::HandleTransferReqL(TInt aCallId, TInt aSecondCallId)
 /**
  * This request is completed by invoking
  * CCtsyDispatcherCallback::CallbackCallControlTransferComp()
  *
- * @param aHeldCallId Call ID of the held call to transfer.
+ * @param aCallId Call ID of the held call to transfer.
  *
  * @param aSecondCallId Call ID of the other to transfer the held call to.
  *
@@ -406,7 +406,7 @@
 
 	// REMOVE this line when implementing for real LTSY
 	MTEST_ISSUE_MOCKLTSYENGINE_REQ(ret, KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlTransfer::KLtsyDispatchCallControlTransferApiId,
-			aHeldCallId, aSecondCallId);
+			aCallId, aSecondCallId);
 
 	return TSYLOGSETEXITERR(ret);
 	} // CLtsyCallControlHandler::HandleTransferReqL
@@ -467,14 +467,14 @@
 	} // CLtsyCallControlHandler::HandleGetIdentityServiceStatusReqL
 
 
-TInt CLtsyCallControlHandler::HandleSwapReqL(TInt aHeldCallId, TInt aConnectedCallId)
+TInt CLtsyCallControlHandler::HandleSwapReqL(TInt aCallId, TInt aSecondCallId)
 /**
  * This request is completed by invoking
  * CCtsyDispatcherCallback::CallbackCallControlSwapComp()
  *
- * @param aHeldCallId The Call ID of the held call to swap.
+ * @param aCallId The Call ID of the call to swap.
  *
- * @param aConnectedCallId The Call ID of the connected call to swap.
+ * @param aSecondCallId The Call ID of the second call to swap.
  *
  * @return KErrNone on success, KErrNotSupported if this request is not supported,
  * or another error code to indicate the failure otherwise.
@@ -488,11 +488,34 @@
 
 	// REMOVE this line when implementing for real LTSY
 	MTEST_ISSUE_MOCKLTSYENGINE_REQ(ret, KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSwapApiId,
-			aHeldCallId, aConnectedCallId);
+			aCallId, aSecondCallId);
 
 	return TSYLOGSETEXITERR(ret);
 	} // CLtsyCallControlHandler::HandleSwapReqL
 
+TInt CLtsyCallControlHandler::HandleSwapReqL(TInt aCallId)
+/**
+ * This request is completed by invoking
+ * CCtsyDispatcherCallback::CallbackCallControlSwapComp()
+ *
+ * @param aCallId The Call ID of the call to swap.
+ *
+ * @return KErrNone on success, KErrNotSupported if this request is not supported,
+ * or another error code to indicate the failure otherwise.
+ */
+	{
+	TSYLOGENTRYEXIT;
+
+	TInt ret = KErrNotSupported;
+
+	// Add implementation here.......
+
+	// REMOVE this line when implementing for real LTSY
+	MTEST_ISSUE_MOCKLTSYENGINE_REQ(ret, KDispatchCallControlFuncUnitId, MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId,
+			aCallId);
+
+	return TSYLOGSETEXITERR(ret);
+	} // CLtsyCallControlHandler::HandleSwapReqL
 
 TInt CLtsyCallControlHandler::HandleLoanDataPortSyncL(TInt aCallId, RCall::TCommPort& aCommPort)
 /**
--- a/telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/src/cltsyfactoryv1.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/ltsyskeleton_using_dispatcher/ltsyskeleton/src/cltsyfactoryv1.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -312,6 +312,10 @@
 		aDispatchInterface = static_cast<MLtsyDispatchCallControlSwap*>
 												(iLtsyDispatchCallControlHandler);
 		break;
+	case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId:
+		aDispatchInterface = static_cast<MLtsyDispatchCallControlSwap*>
+												(iLtsyDispatchCallControlHandler);
+		break;
 	case MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId:
 		aDispatchInterface = static_cast<MLtsyDispatchCallControlLoanDataPort*>
 												(iLtsyDispatchCallControlHandler);
--- a/telephonyserverplugins/ctsydispatchlayer/test/mockltsy_under_ctsydispatch/src/cmockcallcontrolmesshandler.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/mockltsy_under_ctsydispatch/src/cmockcallcontrolmesshandler.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -91,6 +91,7 @@
 		case MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId:
 		case MLtsyDispatchCallControlGetIdentityServiceStatus::KLtsyDispatchCallControlGetIdentityServiceStatusApiId:
 		case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSwapApiId:
+		case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId:
 		case MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId:
 		case MLtsyDispatchCallControlRecoverDataPort::KLtsyDispatchCallControlRecoverDataPortApiId:
 		case MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId:
@@ -219,6 +220,12 @@
     		TMockLtsyData2<TInt, TInt> data(heldCallId, connectedCallId);
     		return iMockLtsyEngine.ExecuteCommandL(aInterfaceId, data);
     		}
+    	case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId:
+    		{
+    		TInt callId = VA_ARG(aList, TInt);
+    		TMockLtsyData1<TInt> data(callId);
+    		return iMockLtsyEngine.ExecuteCommandL(aInterfaceId, data);
+    		}
     	case MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId:
     		{
     		TInt callId = VA_ARG(aList, TInt);
@@ -467,6 +474,11 @@
 			iCompletionCallback.CallbackCallControlSwapComp(aResult);
 			}
 			break;
+		case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId:
+		    {
+			iCompletionCallback.CallbackCallControlSwapComp(aResult);
+			}
+			break;
 		case MLtsyDispatchCallControlStartDtmfTone::KLtsyDispatchCallControlStartDtmfToneApiId:
 			{
 			iCompletionCallback.CallbackCallControlStartDtmfToneComp(aResult);
--- a/telephonyserverplugins/ctsydispatchlayer/test/mockltsy_under_ctsydispatch/src/cmockltsyengine.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/ctsydispatchlayer/test/mockltsy_under_ctsydispatch/src/cmockltsyengine.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -71,6 +71,7 @@
 _LIT(KCallControlSendDtmfTonesApiName, "CallControl SendDtmfTones");
 _LIT(KCallControlGetIdentityServiceStatusApiName, "CallControl GetIdentityServiceStatus");
 _LIT(KCallControlSwapApiName, "CallControl Swap");
+_LIT(KCallControlSingleSwapApiName, "CallControl Single Swap");
 _LIT(KCallControlLoanDataPortApiName, "CallControl LoanDataPort");
 _LIT(KCallControlRecoverDataPortApiName, "CallControl RecoverDataPort");
 _LIT(KCallControlStartDtmfToneApiName, "CallControl StartDtmfTone");
@@ -751,6 +752,8 @@
 		    return KCallControlGetIdentityServiceStatusApiName;
 		case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSwapApiId:
 		    return KCallControlSwapApiName;
+		case MLtsyDispatchCallControlSwap::KLtsyDispatchCallControlSingleSwapApiId:
+		    return KCallControlSingleSwapApiName;
 		case MLtsyDispatchCallControlLoanDataPort::KLtsyDispatchCallControlLoanDataPortApiId:
 		    return KCallControlLoanDataPortApiName;
 		case MLtsyDispatchCallControlRecoverDataPort::KLtsyDispatchCallControlRecoverDataPortApiId:
--- a/telephonyserverplugins/licenseetsystub/licensee_tsy_stub/inc/cmmmockmesshandler.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/licenseetsystub/licensee_tsy_stub/inc/cmmmockmesshandler.h	Fri Mar 19 09:55:57 2010 +0200
@@ -111,12 +111,6 @@
          */         
         CPeriodic* iTimer;
         
-        /*
-         * Pointer to the Custom stub extension
-         * Own.
-         */
-        CMmCustomStubExt* iMmCustomStubExt; 
-        
     };
 
 #endif // CMMMOCKMESSHANDLER_H
--- a/telephonyserverplugins/licenseetsystub/licensee_tsy_stub/src/cmmmockmesshandler.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/licenseetsystub/licensee_tsy_stub/src/cmmmockmesshandler.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -64,7 +64,7 @@
 //
 TInt CMmMockMessHandler::ExtFuncL( 
     TInt aIpc, 
-    const CMmDataPackage* aDataPackage )
+    const CMmDataPackage* /*aDataPackage*/)
     {
 TFLOGSTRING2("TSY: CMmMockMessHandler::ExtFuncL. IPC: %d", aIpc );
     
@@ -291,24 +291,6 @@
             ret = KErrNone;
             complete = ETrue;
             break;
-                   
-        // Custom functionality
-        case EMmTsyGetCustomVendorExtPtrIPC:
-            {
-TFLOGSTRING("TSY: CMmCustomMessHandler::ExtFuncL --- EMmTsyGetCustomVendorExtPtrIPC");            
-            // return pointer to customapi extension
-            CMmCustomVendorExt** extPtr;
-            aDataPackage->UnPackData( &extPtr );
-
-            if ( !iMmCustomStubExt )
-                {
-                iMmCustomStubExt = new ( ELeave ) CMmCustomStubExt( );
-                }
-
-            *extPtr = iMmCustomStubExt;
-            iMmCustomStubExt->SetMessageRouter( iMessageRouter );
-            break;
-            }
             
         default:
             ret = KErrNotSupported;
--- a/telephonyserverplugins/simatktsy/tests/src/ccsatcomponenttestbase.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/simatktsy/tests/src/ccsatcomponenttestbase.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -1423,7 +1423,8 @@
 			aCommandQualifier,
 			aGeneralResultAddInfo,
 			aGeneralResult,
-			aAdditionalInfoTlv);
+			aAdditionalInfoTlv,
+			aExpResult);
 	TerminalResponseL( aRSatTypeOfCommand, aRspPckg, aExpResult);
 	}
 
--- a/telephonyserverplugins/simatktsy/tests/src/ccsatsendssfu.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/simatktsy/tests/src/ccsatsendssfu.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -277,11 +277,22 @@
 	rsp.iAdditionalInfo.Zero();
 	rsp.iAdditionalInfo.Append(KSSOpCodeAndParameters);
 
-	// defect, first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL()
+// first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL()
+// Let MockLTsy expect this behaviour 
+	rsp.iAdditionalInfo.Delete( 0, 1 );
 	
-	GenerateTerminalResponseL(KCmdId,	KSendSs,	KCmdDetails,
-			RSat::ESendSs, rspPckg,	rsp.iAdditionalInfo, 
-			rsp.iGeneralResult);
+    PrepareTerminalResponseMockDataL(
+            KCmdId,
+            KSendSs,
+            KCmdDetails,
+            rsp.iAdditionalInfo,
+            rsp.iGeneralResult,
+            KNullDesC8);
+
+    rsp.iAdditionalInfo.Zero();
+    rsp.iAdditionalInfo.Append( KSSOpCodeAndParameters );
+    
+    TerminalResponseL( RSat::ESendSs, rspPckg);
 	
 	AssertMockLtsyStatusL();
 	
@@ -885,15 +896,43 @@
 				if ( rsp->iInfoType == RSat::KSendSsInfo )
 					{
 					rsp->iAdditionalInfo.Append( KSSOpCodeAndParameters );
+					
+// first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL()
+// Let MockLTsy expect this behaviour 
+					if( rsp->iGeneralResult == RSat::KSuccess ||
+					       rsp->iGeneralResult == RSat::KPartialComprehension ||
+					       rsp->iGeneralResult == RSat::KMissingInformation ||
+					       rsp->iGeneralResult == RSat::KSuccessRequestedIconNotDisplayed )
+					    {
+					    rsp->iAdditionalInfo.Delete( 0, 1 );
+					    }
 					}
 				else
 					{
 					rsp->iAdditionalInfo.Append( KResponsesToTest[i].iAdditionalInfo );
 					}
 				}
-			GenerateTerminalResponseL(KCmdId,	KSendSs,	KCmdDetails,
-					RSat::ESendSs, *rspPckg,	rsp->iAdditionalInfo, 
-					rsp->iGeneralResult, KNullDesC8, KResponsesToTest[i].iExpectedResult);
+			PrepareTerminalResponseMockDataL(
+			        KCmdId,
+			        KSendSs,
+			        KCmdDetails,
+			        rsp->iAdditionalInfo,
+			        rsp->iGeneralResult,
+			        KNullDesC8,
+			        KResponsesToTest[i].iExpectedResult);
+			
+			if ( (!KResponsesToTest[i].iIntentionallyOmmitAdditionalInfo && rsp->iInfoType == RSat::KSendSsInfo ) 
+			     &&
+			     (rsp->iGeneralResult == RSat::KSuccess ||
+                       rsp->iGeneralResult == RSat::KPartialComprehension ||
+                       rsp->iGeneralResult == RSat::KMissingInformation ||
+                       rsp->iGeneralResult == RSat::KSuccessRequestedIconNotDisplayed) )
+			    {
+                rsp->iAdditionalInfo.Zero();
+                rsp->iAdditionalInfo.Append( KSSOpCodeAndParameters );
+			    }
+			
+			TerminalResponseL( RSat::ESendSs, *rspPckg, KResponsesToTest[i].iExpectedResult);
 			}
 		else
 			{
@@ -901,10 +940,18 @@
 			rsp->iGeneralResult	= RSat::KSuccess;
 			rsp->iInfoType 		= RSat::KSendSsInfo;
 			rsp->iAdditionalInfo.Append(KSSOpCodeAndParameters);
+
+// first byte from additional info is deleted in CSatNotifySendSs::TerminalResponseL()
+// Let MockLTsy expect this behaviour 
+
+			rsp->iAdditionalInfo.Delete( 0, 1 );
 			
 			PrepareTerminalResponseMockDataL( KCmdId, KSendSs, KCmdDetails,
 					rsp->iAdditionalInfo, rsp->iGeneralResult, KNullDesC8, KErrUnknown);
 
+			rsp->iAdditionalInfo.Zero();
+			rsp->iAdditionalInfo.Append( KSSOpCodeAndParameters );
+			
 			TerminalResponseL( RSat::ESendSs, *rspPckg, KErrUnknown);
 			}
 		
--- a/telephonyserverplugins/simtsy/inc/CSimPacketContext.h	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/simtsy/inc/CSimPacketContext.h	Fri Mar 19 09:55:57 2010 +0200
@@ -34,6 +34,10 @@
 #include <ctsy/serviceapi/cmmutility.h>
 
 const TUint KNotFound=0xfffffff;
+const TInt KLimitForErrorCodeForContextGoToInactive=-700;
+const TInt KContextGoToInactiveWithNormalErrorCode=-600;
+const TInt KContextGoToInactiveWithExtendedErrorCode=-400;
+const TInt KContextGoToInactiveWithErrorWhenTryingToGetLastErrorCode = -300;
 
 enum TContextEvent //< Enum for the state machine
 	{
@@ -454,6 +458,9 @@
 	virtual void TimerCallBack(TInt aId);
 	TCommSetupItem FindCommSettings();
 
+private:
+    TInt iLastError;
+    TInt iErrorCodeForGetLastErrorCause;
 	};
 
 #endif
--- a/telephonyserverplugins/simtsy/src/CSimPacketContext.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/simtsy/src/CSimPacketContext.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -99,7 +99,7 @@
 	  iTFTCreated(EFalse), iNumTFTsCreated(-1), iNumFiltersAdded(0),
       iContextConfigParamsIndex(0), iCommPortLoaned(EFalse),iQoSObjectCount(0),
       iNotifyContextConfigChangeArray(NULL), iSetConfigData(NULL), iSetConfigCallCount(0), iTFTChangeBool(0),
-      iNotifyContextStatusChangeIndex(0),iState(RPacketContext::EStatusInactive)
+      iNotifyContextStatusChangeIndex(0),iState(RPacketContext::EStatusInactive), iLastError(KErrNone), iErrorCodeForGetLastErrorCause(KErrNone)
 	  
 /**
 * Trivial Constructor.  Initialises all the data members
@@ -2476,7 +2476,7 @@
 	return KErrNone;
 	}
 
-TInt CSimPacketContext::GetLastErrorCause(const TTsyReqHandle aTsyReqHandle,TInt* /*aError*/)
+TInt CSimPacketContext::GetLastErrorCause(const TTsyReqHandle aTsyReqHandle, TInt* aError)
 /**
 * This method is not supported in this TSY
 *
@@ -2486,7 +2486,9 @@
 */
 	{
 	LOGPACKET1("CSimPacketContext::GetLastErrorCause called");
-	ReqCompleted(aTsyReqHandle,KErrNotSupported);
+	*aError = iLastError;
+	ReqCompleted(aTsyReqHandle,iErrorCodeForGetLastErrorCause);
+	iErrorCodeForGetLastErrorCause = KErrNone;
 	return KErrNone;
 	}
 
@@ -2837,8 +2839,49 @@
 						if (found)
 							activateValue = iContextConfigsRel99->At(i).iActivateErrorCode;
 						else
-							activateValue = iActivateFail;				
-
+							activateValue = iActivateFail;	
+						if(activateValue == KContextGoToInactiveWithErrorWhenTryingToGetLastErrorCode)
+						    {
+						    //this will allow context activation move to the next state but with context being inactive 
+						    ret=ChangeState(RPacketContext::EStatusInactive);
+						    iCurrentEvent=EContextEventNone;
+						    iLastError = activateValue;
+						    iErrorCodeForGetLastErrorCause=KErrGeneral;
+						    
+						    iContextConfigsRel99->At(i).iActivateErrorCode = iLastError;
+						    ReqCompleted(iActivateRequestHandle, KErrNone);
+						    
+						    break;
+						    }
+						if(activateValue <= KContextGoToInactiveWithExtendedErrorCode && activateValue > KContextGoToInactiveWithNormalErrorCode)
+                            {
+                            //this will allow context activation move to the next state but with context being inactive     
+                            //tsy extended error case
+                            ret=ChangeState(RPacketContext::EStatusInactive);
+                            iCurrentEvent=EContextEventNone;
+                            iLastError = activateValue - KContextGoToInactiveWithExtendedErrorCode;
+                            //move the error code to the higher 16 bit.
+                            iLastError<<=16;
+                            
+                            iContextConfigsRel99->At(i).iActivateErrorCode = iLastError;
+                            ReqCompleted(iActivateRequestHandle, KErrNone);
+                            
+                            break;
+                            }
+						if(activateValue <= KContextGoToInactiveWithNormalErrorCode && activateValue > KLimitForErrorCodeForContextGoToInactive)
+						    {
+						    //this will allow context activation move to the next state but with context being inactive
+						    //normal error case
+						    ret=ChangeState(RPacketContext::EStatusInactive);
+						    iCurrentEvent=EContextEventNone;
+						    iLastError = activateValue - KContextGoToInactiveWithNormalErrorCode;
+						    
+						    iContextConfigsRel99->At(i).iActivateErrorCode = iLastError;
+						    ReqCompleted(iActivateRequestHandle, KErrNone);
+						    
+						    break;
+						    }
+						else
 						if(activateValue != KErrNone)
 							{
 							ReqCompleted(iActivateRequestHandle,activateValue);
--- a/telephonyserverplugins/simtsy/src/CSimPhone.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/simtsy/src/CSimPhone.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -222,6 +222,7 @@
 	iSectionName.Format(KSectionNameFormat,testNumber);
 	if(iConfigFile->Section(iSectionName)==NULL)
 		{
+        LOGPHONE2("Section for requested test number (%d) not found in the Config File",testNumber);
 		CleanupStack::Pop();
 		User::Leave(KErrNotFound);
 		}
--- a/telephonyserverplugins/simtsy/test/Te_SimPacket/Te_SimPacket.cpp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyserverplugins/simtsy/test/Te_SimPacket/Te_SimPacket.cpp	Fri Mar 19 09:55:57 2010 +0200
@@ -606,8 +606,6 @@
     User::WaitForRequest(stat1);
     TESTL(stat1.Int() == KErrNotSupported);
 
-    TESTL(iPacketContext[0].GetLastErrorCause(err) == KErrNotSupported);
-
     iPacketContext[0].Close();
     iPacketService.Close();
 	iPhone.Close();
--- a/telephonyutils/telephonywatchers/group/signalstrengthwatcher.mmp	Tue Feb 02 01:41:59 2010 +0200
+++ b/telephonyutils/telephonywatchers/group/signalstrengthwatcher.mmp	Fri Mar 19 09:55:57 2010 +0200
@@ -39,7 +39,7 @@
 SOURCE			../src/signalstrengthwatcher.cpp
 SOURCE			../src/SignalstrengthWatcherImplementationTable.cpp
 USERINCLUDE		../inc
-LIBRARY			euser.lib watcher.lib etel.lib etelmm.lib telwatcherbase.lib
+LIBRARY			euser.lib etel.lib etelmm.lib telwatcherbase.lib
 DEBUGLIBRARY	comsdbgutil.lib