adaptationlayer/tsy/nokiatsy_dll/src/cmmcallmesshandler.cpp
changeset 7 fa67e03b87df
parent 5 8ccc39f9d787
child 8 6295dc2169f3
equal deleted inserted replaced
6:942573423a60 7:fa67e03b87df
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    89 const TUint8 KSecondPepType   = PN_PEP_TYPE_GPRS; // Second PEP type
    89 const TUint8 KSecondPepType   = PN_PEP_TYPE_GPRS; // Second PEP type
    90 
    90 
    91 const TUint8 KPipeTransID  = EIscNokiaDataport1;
    91 const TUint8 KPipeTransID  = EIscNokiaDataport1;
    92 
    92 
    93 const TUint8 KInvalidPipeHandle = 0xFF;
    93 const TUint8 KInvalidPipeHandle = 0xFF;
       
    94 
       
    95 const TUint8 KConnectedAddressCpnMask = 0x60;
       
    96 
       
    97 const TUint8 KInternationalPhoneNumberPrefix = '+';
    94 
    98 
    95 // From 3GPP TS 31.111, 7.3.1.6 Structure of ENVELOPE (CALL CONTROL)
    99 // From 3GPP TS 31.111, 7.3.1.6 Structure of ENVELOPE (CALL CONTROL)
    96 const TUint8 KCcResultAllowedNoModification     = 0x00;
   100 const TUint8 KCcResultAllowedNoModification     = 0x00;
    97 const TUint8 KCcResultNotAllowed                = 0x01;
   101 const TUint8 KCcResultNotAllowed                = 0x01;
    98 // MACROS
   102 // MACROS
   243 
   247 
   244     iCallOperationID = CSD_CALL_CREATE;
   248     iCallOperationID = CSD_CALL_CREATE;
   245     iVideoCallReleased = EFalse;
   249     iVideoCallReleased = EFalse;
   246     iCallControlCallId = CALL_MODEM_ID_NONE;
   250     iCallControlCallId = CALL_MODEM_ID_NONE;
   247     iCcResult = KCcResultAllowedNoModification;
   251     iCcResult = KCcResultAllowedNoModification;
       
   252     iResourceControlSuppress = EFalse;
   248     }
   253     }
   249 
   254 
   250 // -----------------------------------------------------------------------------
   255 // -----------------------------------------------------------------------------
   251 // CMmCallMessHandler::NewL
   256 // CMmCallMessHandler::NewL
   252 // Two-phased constructor.
   257 // Two-phased constructor.
   688                         iBearer.Copy( recentCallParamsV7.iBearerCap1 );
   693                         iBearer.Copy( recentCallParamsV7.iBearerCap1 );
   689 
   694 
   690                         // Prevent FDN check if call is SIM originated (SET UP CALL)
   695                         // Prevent FDN check if call is SIM originated (SET UP CALL)
   691                         if ( RMobileCall::EOriginatorSIM == recentCallParamsV7.iCallParamOrigin )
   696                         if ( RMobileCall::EOriginatorSIM == recentCallParamsV7.iCallParamOrigin )
   692                             {
   697                             {
       
   698 TFLOGSTRING("TSY: CMmCallMessHandler::ExtFuncL - iNoFdnCheck = ETrue");
       
   699 OstTrace0( TRACE_NORMAL, DUP9_CMMCALLMESSHANDLER_EXTFUNCL, "CMmCallMessHandler::ExtFuncL - iNoFdnCheck = ETrue" );
   693                             iNoFdnCheck = ETrue;
   700                             iNoFdnCheck = ETrue;
   694                             }
   701                             }
   695                         else
   702                         else
   696                             {
   703                             {
       
   704 TFLOGSTRING("TSY: CMmCallMessHandler::ExtFuncL - iNoFdnCheck = EFalse");
       
   705 OstTrace0( TRACE_NORMAL, DUP10_CMMCALLMESSHANDLER_EXTFUNCL, "CMmCallMessHandler::ExtFuncL - iNoFdnCheck = EFalse" );
   697                             iNoFdnCheck = EFalse;
   706                             iNoFdnCheck = EFalse;
   698                             }
   707                             }
   699                         }
   708                         }
   700 #endif
   709 #endif
   701                     else
   710                     else
   842             case EMobileCallActivateUUS:
   851             case EMobileCallActivateUUS:
   843                 {
   852                 {
   844                 ret = ActivateUUS( aDataPackage );
   853                 ret = ActivateUUS( aDataPackage );
   845                 break;
   854                 break;
   846                 }
   855                 }
       
   856             case ESatNotifySetUpCallPCmd:
       
   857                 {
       
   858 TFLOGSTRING("TSY: CMmCallMessHandler::ExtFuncL - ESatNotifySetUpCallPCmd");
       
   859 OstTrace0( TRACE_NORMAL, DUP11_CMMCALLMESSHANDLER_EXTFUNCL, "CMmCallMessHandler::ExtFuncL - ESatNotifySetUpCallPCmd" );
       
   860                 iResourceControlSuppress = ETrue;
       
   861                 ret = KErrNone;
       
   862                 break;
       
   863                 }
   847             default:
   864             default:
   848                 {
   865                 {
   849 TFLOGSTRING2("TSY: CMmCallMessHandler::ExtFuncL - Unknown IPC: %d", aIpc);
   866 TFLOGSTRING2("TSY: CMmCallMessHandler::ExtFuncL - Unknown IPC: %d", aIpc);
   850 OstTrace1( TRACE_NORMAL, DUP3_CMMCALLMESSHANDLER_EXTFUNCL, "CMmCallMessHandler::ExtFuncL; - Unknown IPC=%d", aIpc );
   867 OstTrace1( TRACE_NORMAL, DUP3_CMMCALLMESSHANDLER_EXTFUNCL, "CMmCallMessHandler::ExtFuncL; - Unknown IPC=%d", aIpc );
   851                 ret = KErrNotSupported;
   868                 ret = KErrNotSupported;
  2029                 // Destination address ends and post address starts.
  2046                 // Destination address ends and post address starts.
  2030                 postAddressSupported = ETrue;
  2047                 postAddressSupported = ETrue;
  2031                 postAddressStarts = i;
  2048                 postAddressStarts = i;
  2032                 break; // Exit for loop
  2049                 break; // Exit for loop
  2033                 }
  2050                 }
  2034             else if ( '+' == ( aTelNumber )[i] && preAddressLength == i )
  2051             else if ( KInternationalPhoneNumberPrefix ==
       
  2052                 ( aTelNumber )[i] && preAddressLength == i )
  2035                 {
  2053                 {
  2036                 // Destination address part contains "+" character. For example
  2054                 // Destination address part contains "+" character. For example
  2037                 // +35850123456 or *140#+35850123456. Don't add "+" char to the
  2055                 // +35850123456 or *140#+35850123456. Don't add "+" char to the
  2038                 // destination address.
  2056                 // destination address.
  2039                 internationalAddr = ETrue;
  2057                 internationalAddr = ETrue;
  2228 
  2246 
  2229             // Reset data
  2247             // Reset data
  2230             iUusData.iUUI.Zero();
  2248             iUusData.iUUI.Zero();
  2231             iUusData.iServiceReq = 0;
  2249             iUusData.iServiceReq = 0;
  2232             }
  2250             }
  2233         if ( iNoFdnDial )
  2251 
       
  2252         if ( iNoFdnDial || iNoFdnCheck )
  2234             {
  2253             {
  2235 TFLOGSTRING("TSY: CMmCallMessHandler::GetCallCreateReqSubBlock -- Create check info sub block");
  2254 TFLOGSTRING("TSY: CMmCallMessHandler::GetCallCreateReqSubBlock -- Create check info sub block");
  2236 OstTrace0( TRACE_NORMAL, DUP9_CMMCALLMESSHANDLER_GETCALLCREATEREQSUBBLOCK, "CMmCallMessHandler::GetCallCreateReqSubBlock -- Create check info sub block" );
  2255 OstTrace0( TRACE_NORMAL, DUP9_CMMCALLMESSHANDLER_GETCALLCREATEREQSUBBLOCK, "CMmCallMessHandler::GetCallCreateReqSubBlock -- Create check info sub block" );
  2237 
  2256 
  2238             // Create CALL_MODEM_SB_LINE_ID subblock.
  2257             // Create CALL_MODEM_SB_LINE_ID subblock.
  2256             aNumOfSbInMsg++;
  2275             aNumOfSbInMsg++;
  2257 
  2276 
  2258 TFLOGSTRING2("TSY: CMmCallMessHandler::GetCallCreateReqSubBlock - CALL_MODEM_SB_CHECK_INFO - Subblock Count:  %d", aNumOfSbInMsg );
  2277 TFLOGSTRING2("TSY: CMmCallMessHandler::GetCallCreateReqSubBlock - CALL_MODEM_SB_CHECK_INFO - Subblock Count:  %d", aNumOfSbInMsg );
  2259 OstTraceExt1( TRACE_NORMAL, DUP21_CMMCALLMESSHANDLER_GETCALLCREATEREQSUBBLOCK, "CMmCallMessHandler::GetCallCreateReqSubBlock - CALL_MODEM_SB_CHECK_INFO - Subblock Count=%hhu", aNumOfSbInMsg );
  2278 OstTraceExt1( TRACE_NORMAL, DUP21_CMMCALLMESSHANDLER_GETCALLCREATEREQSUBBLOCK, "CMmCallMessHandler::GetCallCreateReqSubBlock - CALL_MODEM_SB_CHECK_INFO - Subblock Count=%hhu", aNumOfSbInMsg );
  2260 
  2279 
       
  2280             }
       
  2281 
       
  2282         if ( iResourceControlSuppress )
       
  2283             {
       
  2284 TFLOGSTRING("TSY: CMmCallMessHandler::GetCallCreateReqSubBlock - suppressing resource control for this call");
       
  2285 OstTrace0( TRACE_NORMAL, DUP20_CMMCALLMESSHANDLER_GETCALLCREATEREQSUBBLOCK, "CMmCallMessHandler::GetCallCreateReqSubBlock - suppressing resource control for this call" );
       
  2286             TBuf8<SIZE_CALL_MODEM_SB_RESOURCE_CHECK_INFO> buffer;
       
  2287             TIsiSubBlock resourceCheckSb(
       
  2288                 buffer,
       
  2289                 CALL_MODEM_SB_RESOURCE_CHECK_INFO,
       
  2290                 EIsiSubBlockTypeId8Len8 );
       
  2291 
       
  2292             buffer.Append( CALL_MODEM_RES_ID_MO_INIT >> KShiftByOneByte );
       
  2293             buffer.Append( CALL_MODEM_RES_ID_MO_INIT );
       
  2294 
       
  2295             aCallIsiMsg.CopyData(
       
  2296                 aCurrentMsgOffset, resourceCheckSb.CompleteSubBlock() );
       
  2297             aCurrentMsgOffset += buffer.Length();
       
  2298             aNumOfSbInMsg++;
       
  2299 
       
  2300             iResourceControlSuppress = EFalse;
  2261             }
  2301             }
  2262         }
  2302         }
  2263     // No else
  2303     // No else
  2264     }
  2304     }
  2265 
  2305 
  3106     RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
  3146     RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
  3107     TUint8 aOrigPresentInd,
  3147     TUint8 aOrigPresentInd,
  3108     const TDes16& aOrigAddress,
  3148     const TDes16& aOrigAddress,
  3109     RMobileCall::TMobileCallDirection aDirection ) const
  3149     RMobileCall::TMobileCallDirection aDirection ) const
  3110     {
  3150     {
  3111 TFLOGSTRING3("TSY: CMmCallMessHandler::FillRemoteStatusAndNumber. OrigAdr: %s. CallDirection:%d", &aOrigAddress, aDirection);
  3151 TFLOGSTRING3("TSY: CMmCallMessHandler::FillRemoteStatusAndNumber. OrigAdr: %S. CallDirection:%d", &aOrigAddress, aDirection);
  3112 OstTraceExt2( TRACE_NORMAL, DUP5_CMMCALLMESSHANDLER_FILLREMOTESTATUSANDNUMBER, "CMmCallMessHandler::FillRemoteStatusAndNumber;OrigAddr=%S;CallDirection=%d", aOrigAddress, aDirection );
  3152 OstTraceExt2( TRACE_NORMAL, DUP5_CMMCALLMESSHANDLER_FILLREMOTESTATUSANDNUMBER, "CMmCallMessHandler::FillRemoteStatusAndNumber;OrigAddr=%S;CallDirection=%d", aOrigAddress, aDirection );
  3113 
  3153 
  3114     // Find out if telephone number is allowed to be presented.
  3154     // Find out if telephone number is allowed to be presented.
  3115     if ( RMobileCall::ERemoteIdentityUnknown ==
  3155     if ( RMobileCall::ERemoteIdentityUnknown ==
  3116         aMobileCallInfo.iRemoteParty.iRemoteIdStatus )
  3156         aMobileCallInfo.iRemoteParty.iRemoteIdStatus )
  3416             EIsiSubBlockTypeId8Len8,
  3456             EIsiSubBlockTypeId8Len8,
  3417             sbStartOffSet ) )
  3457             sbStartOffSet ) )
  3418             {
  3458             {
  3419 TFLOGSTRING("TSY: CMmCallMessHandler::CallStatusIndL: CALL_MODEM_SB_DESTINATION_ADDRESS subblock");
  3459 TFLOGSTRING("TSY: CMmCallMessHandler::CallStatusIndL: CALL_MODEM_SB_DESTINATION_ADDRESS subblock");
  3420 OstTrace0( TRACE_NORMAL, DUP5_CMMCALLMESSHANDLER_CALLSTATUSINDL, "CMmCallMessHandler::CallStatusIndL: CALL_MODEM_SB_DESTINATION_ADDRESS subblock" );
  3460 OstTrace0( TRACE_NORMAL, DUP5_CMMCALLMESSHANDLER_CALLSTATUSINDL, "CMmCallMessHandler::CallStatusIndL: CALL_MODEM_SB_DESTINATION_ADDRESS subblock" );
  3421 
  3461             ReadAllAddressDestination(
  3422             ReadAllAddressDestination( mobileCallInfo, targetOrig, aIsiMessage, sbStartOffSet, origPresentInd );
  3462                  mobileCallInfo,
       
  3463                  targetOrig,
       
  3464                  aIsiMessage,
       
  3465                  sbStartOffSet,
       
  3466                  origPresentInd );
       
  3467             }
       
  3468         else if ( KErrNone == aIsiMessage.FindSubBlockOffsetById(
       
  3469             ISI_HEADER_SIZE + SIZE_CALL_MODEM_STATUS_IND,
       
  3470             CALL_MODEM_SB_CONNECTED_ADDRESS,
       
  3471             EIsiSubBlockTypeId8Len8,
       
  3472             sbStartOffSet ) )
       
  3473             {
       
  3474 TFLOGSTRING("TSY: CMmCallMessHandler::CallStatusIndL: CALL_MODEM_SB_CONNECTED_ADDRESS subblock");
       
  3475 OstTrace0( TRACE_NORMAL, DUP19_CMMCALLMESSHANDLER_CALLSTATUSINDL, "CMmCallMessHandler::CallStatusIndL: CALL_MODEM_SB_CONNECTED_ADDRESS subblock" );
       
  3476             ReadAllAddressConnected(
       
  3477                 mobileCallInfo,
       
  3478                 targetOrig,
       
  3479                 aIsiMessage,
       
  3480                 sbStartOffSet );
  3423             }
  3481             }
  3424             // No else
  3482             // No else
  3425 
  3483 
  3426         if ( CALL_MODEM_STATUS_CREATE == callStatusISA )
  3484         if ( CALL_MODEM_STATUS_CREATE == callStatusISA )
  3427             {
  3485             {
  3597             // COMPLETE INCOMING CALL NOTIFICATION
  3655             // COMPLETE INCOMING CALL NOTIFICATION
  3598             CompleteIncomingCallNotif( mobileCallInfo, statusETel );
  3656             CompleteIncomingCallNotif( mobileCallInfo, statusETel );
  3599             // MT calls which went waiting can alert twice
  3657             // MT calls which went waiting can alert twice
  3600             // reset stored incoming call information only after they actually rang
  3658             // reset stored incoming call information only after they actually rang
  3601             // or when MT call is answered
  3659             // or when MT call is answered
  3602             if ( CALL_MODEM_STATUS_MT_ALERTING == callStatusISA || 
  3660             if ( CALL_MODEM_STATUS_MT_ALERTING == callStatusISA ||
  3603                  CALL_MODEM_STATUS_ANSWERED == callStatusISA )
  3661                  CALL_MODEM_STATUS_ANSWERED == callStatusISA )
  3604                 {
  3662                 {
  3605                 ResetIncomingCallInfo( iIncomingCallInfo );
  3663                 ResetIncomingCallInfo( iIncomingCallInfo );
  3606                 }
  3664                 }
  3607 
  3665 
  3792         if ( ( CALL_MODEM_NBR_TYPE_INTERNATIONAL == ( origAddressType & KMaskBits5to7 ) )
  3850         if ( ( CALL_MODEM_NBR_TYPE_INTERNATIONAL == ( origAddressType & KMaskBits5to7 ) )
  3793                && ( 0 != address.Length() ) )
  3851                && ( 0 != address.Length() ) )
  3794             {
  3852             {
  3795             // Add '+' character back to the string
  3853             // Add '+' character back to the string
  3796             address2.Append( KCallPadding ); // Padding
  3854             address2.Append( KCallPadding ); // Padding
  3797             address2.Append( '+' );
  3855             address2.Append( KInternationalPhoneNumberPrefix );
  3798             }
  3856             }
  3799         // No else
  3857         // No else
  3800 
  3858 
  3801         // Append tel number to address2
  3859         // Append tel number to address2
  3802         address2.Append( address );
  3860         address2.Append( address );
  4124          ( origAddressType & KMaskBits5to7 ) )
  4182          ( origAddressType & KMaskBits5to7 ) )
  4125          && ( 0 != address.Length() ) )
  4183          && ( 0 != address.Length() ) )
  4126         {
  4184         {
  4127         // Add '+' character back to the string
  4185         // Add '+' character back to the string
  4128         address2.Append( KCallPadding ); // Padding
  4186         address2.Append( KCallPadding ); // Padding
  4129         address2.Append( '+' );
  4187         address2.Append( KInternationalPhoneNumberPrefix );
  4130         }
  4188         }
  4131     // No else
  4189     // No else
  4132 
  4190 
  4133     address2.Append( address ); //append tel number to address2
  4191     address2.Append( address ); //append tel number to address2
  4134 
  4192 
  4175         aTargetOrig,
  4233         aTargetOrig,
  4176         RMobileCall::EMobileOriginated );
  4234         RMobileCall::EMobileOriginated );
  4177 
  4235 
  4178     aMobileCallInfo.iValid |=
  4236     aMobileCallInfo.iValid |=
  4179         RMobileCall::KCallRemoteParty | RMobileCall::KCallDialledParty;
  4237         RMobileCall::KCallRemoteParty | RMobileCall::KCallDialledParty;
       
  4238     }
       
  4239 
       
  4240 // -----------------------------------------------------------------------------
       
  4241 // CMmCallMessHandler::ReadAllAddressConnected
       
  4242 // Read All Address Destination
       
  4243 // (other items were commented in a header).
       
  4244 // -----------------------------------------------------------------------------
       
  4245 //
       
  4246 void CMmCallMessHandler::ReadAllAddressConnected(
       
  4247     RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
  4248     TBuf16<RMobilePhone::KMaxMobileTelNumberSize>& aTargetOrig,
       
  4249     const TIsiReceiveC &aIsiMessage,
       
  4250     TUint& aSbStartOffSet)
       
  4251     {
       
  4252 TFLOGSTRING("TSY: CMmCallMessHandler::ReadAllAddressConnected");
       
  4253 OstTrace0( TRACE_NORMAL, CMMCALLMESSHANDLER_READALLADDRESSCONNECTED, "CMmCallMessHandler::ReadAllAddressConnected" );
       
  4254 
       
  4255     TUint8 origAddressType( aIsiMessage.Get8bit(
       
  4256         aSbStartOffSet + CALL_MODEM_SB_CONNECTED_ADDRESS_OFFSET_ADDRTYPE ) );
       
  4257     TUint8 origPresentInd( aIsiMessage.Get8bit(
       
  4258         aSbStartOffSet + CALL_MODEM_SB_CONNECTED_ADDRESS_OFFSET_PRESENTATION ) );
       
  4259     origPresentInd &= KConnectedAddressCpnMask;
       
  4260 
       
  4261     // Get destinationAddress Length
       
  4262     TUint8 destinationAddressLength( aIsiMessage.Get8bit(
       
  4263         aSbStartOffSet + CALL_MODEM_SB_CONNECTED_ADDRESS_OFFSET_ADDRLEN ) );
       
  4264 
       
  4265     // Get address (telephone number)
       
  4266     TPtrC8 address( aIsiMessage.GetData(
       
  4267         aSbStartOffSet + CALL_MODEM_SB_CONNECTED_ADDRESS_OFFSET_ADDR,
       
  4268         destinationAddressLength * 2 ) );
       
  4269 
       
  4270     TBuf8<RMobilePhone::KMaxMobileTelNumberSize * 2> address2;
       
  4271 
       
  4272     // Check if number is international and addrDataLength is bigger
       
  4273     // than zero. The length of the string does not have to be checked
       
  4274     // since the original max length was 100. When the string was sent
       
  4275     // to ISA side the '+' character was cut off and now we just put
       
  4276     // it back. (three bits (5-7) contain type of number)
       
  4277     if ( ( CALL_MODEM_NBR_TYPE_INTERNATIONAL ==
       
  4278          ( origAddressType & KMaskBits5to7 ) )
       
  4279          && ( 0 != address.Length() ) )
       
  4280         {
       
  4281         // Add '+' character back to the string
       
  4282         address2.Append( KCallPadding ); // Padding
       
  4283         address2.Append( KInternationalPhoneNumberPrefix );
       
  4284         }
       
  4285     // No else
       
  4286 
       
  4287     address2.Append( address ); //append tel number to address2
       
  4288 
       
  4289     if ( address.Length() )
       
  4290         {
       
  4291         // Get address type
       
  4292         FillNumberPlanAndType( aMobileCallInfo, origAddressType );
       
  4293         }
       
  4294     // No else
       
  4295 
       
  4296     // Copy 8-bit address to the 16-bit target using correct endianess
       
  4297     TIsiUtility::CopyFromBigEndian( address2, aTargetOrig );
       
  4298 
       
  4299 TFLOGSTRING2("TSY: CMmCallMessHandler::ReadAllAddressConnected;aTargetOrig=%S", &aTargetOrig);
       
  4300 OstTraceExt1( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_READALLADDRESSCONNECTED, "CMmCallMessHandler::ReadAllAddressConnected;aTargetOrig=%S", aTargetOrig );
       
  4301 
       
  4302     if ( CALL_MODEM_PRESENTATION_ALLOWED == origPresentInd )
       
  4303         {
       
  4304 TFLOGSTRING("TSY: CMmCallMessHandler::ReadAllAddressConnected; CPN ALLOWED");
       
  4305 OstTrace0( TRACE_NORMAL, DUP2_CMMCALLMESSHANDLER_READALLADDRESSCONNECTED, "TSY: CMmCallMessHandler::ReadAllAddressConnected; CPN ALLOWED" );
       
  4306         aMobileCallInfo.iRemoteParty.iRemoteIdStatus =
       
  4307             RMobileCall::ERemoteIdentityAvailable;
       
  4308         // Copy the actual number
       
  4309         aMobileCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Copy(
       
  4310             aTargetOrig );
       
  4311         }
       
  4312     else if ( CALL_MODEM_PRESENTATION_RESTRICTED == origPresentInd )
       
  4313         {
       
  4314 TFLOGSTRING("TSY: CMmCallMessHandler::ReadAllAddressConnected; CPN RESTRICTED");
       
  4315 OstTrace0( TRACE_NORMAL, DUP3_CMMCALLMESSHANDLER_READALLADDRESSCONNECTED, "TSY: CMmCallMessHandler::ReadAllAddressConnected; CPN RESTRICTED" );
       
  4316         aMobileCallInfo.iRemoteParty.iRemoteIdStatus =
       
  4317             RMobileCall::ERemoteIdentitySuppressed;
       
  4318         aMobileCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Zero();
       
  4319         }
       
  4320     else
       
  4321         {
       
  4322 TFLOGSTRING("TSY: CMmCallMessHandler::ReadAllAddressConnected; CPN UNKNOWN");
       
  4323 OstTrace0( TRACE_NORMAL, DUP4_CMMCALLMESSHANDLER_READALLADDRESSCONNECTED, "TSY: CMmCallMessHandler::ReadAllAddressConnected; CPN UNKNOWN" );
       
  4324         aMobileCallInfo.iRemoteParty.iRemoteIdStatus =
       
  4325             RMobileCall::ERemoteIdentityUnknown;
       
  4326         aMobileCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Zero();
       
  4327         }
       
  4328 
       
  4329     aMobileCallInfo.iValid |=
       
  4330         RMobileCall::KCallRemoteParty | RMobileCall::KCallDialledParty;
       
  4331 
       
  4332     // Add dialled party information
       
  4333     if ( 0 < aTargetOrig.Length() )
       
  4334         {
       
  4335         // Copy dialled party number
       
  4336         aMobileCallInfo.iDialledParty.iTelNumber.Copy( aTargetOrig );
       
  4337         }
       
  4338     // No else
       
  4339 
  4180     }
  4340     }
  4181 
  4341 
  4182 // -----------------------------------------------------------------------------
  4342 // -----------------------------------------------------------------------------
  4183 // CMmCallMessHandler::ReadCallInfo
  4343 // CMmCallMessHandler::ReadCallInfo
  4184 // Read All Address Destination
  4344 // Read All Address Destination
  4752             // Destination address ends and post address starts.
  4912             // Destination address ends and post address starts.
  4753             postAddressSupported = ETrue;
  4913             postAddressSupported = ETrue;
  4754             postAddressStarts = i;
  4914             postAddressStarts = i;
  4755             break; // Exit for loop
  4915             break; // Exit for loop
  4756             }
  4916             }
  4757         else if ( '+' == ( aTelNumber )[i] && preAddressLength == i )
  4917         else if ( KInternationalPhoneNumberPrefix ==
       
  4918             ( aTelNumber )[i] && preAddressLength == i )
  4758             {
  4919             {
  4759             // Destination address part contains "+" character. For example
  4920             // Destination address part contains "+" character. For example
  4760             // +35850123456 or *140#+35850123456. Don't add "+" char to the
  4921             // +35850123456 or *140#+35850123456. Don't add "+" char to the
  4761             // destination address.
  4922             // destination address.
  4762             internationalAddr = ETrue;
  4923             internationalAddr = ETrue;
  4960         TInt currentMsgOffset( ISI_HEADER_SIZE + SIZE_CSD_CALL_CONTROL_REQ );
  5121         TInt currentMsgOffset( ISI_HEADER_SIZE + SIZE_CSD_CALL_CONTROL_REQ );
  4961 
  5122 
  4962         // Create subblocks for CsdCallControlReq
  5123         // Create subblocks for CsdCallControlReq
  4963         GetCSDCallControlReqSubBlock(
  5124         GetCSDCallControlReqSubBlock(
  4964             dynamic_cast<TDesC16&>( iTelNumber ),
  5125             dynamic_cast<TDesC16&>( iTelNumber ),
  4965             RMobileCall::ESendMyId,
  5126             iIdRestrict,
  4966             csdIsiMsg,
  5127             csdIsiMsg,
  4967             numOfSbInMessage,
  5128             numOfSbInMessage,
  4968             currentMsgOffset );
  5129             currentMsgOffset );
  4969         }
  5130         }
  4970 
  5131 
  5106     else
  5267     else
  5107         {
  5268         {
  5108         // MO/MT video call released. we have to remove pipe.
  5269         // MO/MT video call released. we have to remove pipe.
  5109         if ( iVideoCallReleased )
  5270         if ( iVideoCallReleased )
  5110             {
  5271             {
  5111 TFLOGSTRING("TSY: CMmCallMessHandler::CsdVideoCallStatusInd: call MO/MT releated");
  5272 TFLOGSTRING("TSY: CMmCallMessHandler::CsdVideoCallStatusInd: call MO/MT released");
  5112 OstTrace0( TRACE_NORMAL, DUP4_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd: call MO/MT released" );
  5273 OstTrace0( TRACE_NORMAL, DUP4_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd: call MO/MT released" );
  5113             //Remove Pipe for wideo telephony
  5274             //Remove Pipe for wideo telephony
  5114             PnsPipeRemoveReq();
  5275             PnsPipeRemoveReq();
  5115             iVideoCallReleased = EFalse;
  5276             iVideoCallReleased = EFalse;
  5116             }
  5277             }
  5117         }
  5278         }
  5118     // CSD_VIDEO_CALL_STATUS_DISCONNECT arrives also when call establishment
  5279     // CSD_VIDEO_CALL_STATUS_DISCONNECT arrives also when call establishment
  5119     // fails
  5280     // fails
  5120     // reset call direction to avoid further unnecessary IPC completions
  5281     // reset call direction to avoid further unnecessary IPC completions
  5121     iCallDirection = RMobileCall::EDirectionUnknown;
  5282     if ( iIsWaitingCall )
  5122 
  5283         {
       
  5284 TFLOGSTRING("TSY: CMmCallMessHandler::CsdVideoCallStatusInd. call direction reset to MT");
       
  5285 OstTrace0( TRACE_NORMAL, DUP5_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd. call direction reset to MT" );
       
  5286         iCallDirection = RMobileCall::EMobileTerminated;
       
  5287         }
       
  5288     else
       
  5289         {
       
  5290 TFLOGSTRING("TSY: CMmCallMessHandler::CsdVideoCallStatusInd. call direction reset to unknown");
       
  5291 OstTrace0( TRACE_NORMAL, DUP6_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd. call direction reset to unknown" );
       
  5292         iCallDirection = RMobileCall::EDirectionUnknown;
       
  5293         }
  5123 TFLOGSTRING2( "TSY: CMmCallMessHandler::CsdVideoCallStatusInd. VideoCallStatus: %d", iVideoCallStatus );
  5294 TFLOGSTRING2( "TSY: CMmCallMessHandler::CsdVideoCallStatusInd. VideoCallStatus: %d", iVideoCallStatus );
  5124 OstTrace1( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd. VideoCallStatus: %d", iVideoCallStatus );
  5295 OstTrace1( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_CSDVIDEOCALLSTATUSIND, "CMmCallMessHandler::CsdVideoCallStatusInd. VideoCallStatus: %d", iVideoCallStatus );
  5125     }
  5296     }
  5126 
  5297 
  5127 // -----------------------------------------------------------------------------
  5298 // -----------------------------------------------------------------------------
  5323 TFLOGSTRING("TSY: CMmCallMessHandler::DialDataCall. callParams and callInfo ok." );
  5494 TFLOGSTRING("TSY: CMmCallMessHandler::DialDataCall. callParams and callInfo ok." );
  5324 OstTrace0( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_DIALDATACALL, "CMmCallMessHandler::DialDataCall;callParams and callInfo ok." );
  5495 OstTrace0( TRACE_NORMAL, DUP1_CMMCALLMESSHANDLER_DIALDATACALL, "CMmCallMessHandler::DialDataCall;callParams and callInfo ok." );
  5325 
  5496 
  5326         // if CTSY does not set call id as valid we need to copy it from
  5497         // if CTSY does not set call id as valid we need to copy it from
  5327         // data package
  5498         // data package
  5328         if ( 0 == callInfo->iValid & RMobileCall::KCallId )
  5499         if ( 0 == ( callInfo->iValid & RMobileCall::KCallId ) )
  5329             {
  5500             {
  5330 TFLOGSTRING("TSY: CMmCallMessHandler::DialDataCall. Copy call mode into call info");
  5501 TFLOGSTRING("TSY: CMmCallMessHandler::DialDataCall. Copy call mode into call info");
  5331 OstTrace0( TRACE_NORMAL, DUP2_CMMCALLMESSHANDLER_DIALDATACALL, "CMmCallMessHandler::DialDataCall. Copy call mode into call info" );
  5502 OstTrace0( TRACE_NORMAL, DUP2_CMMCALLMESSHANDLER_DIALDATACALL, "CMmCallMessHandler::DialDataCall. Copy call mode into call info" );
  5332             aDataPackage->GetCallIdAndMode(
  5503             aDataPackage->GetCallIdAndMode(
  5333                 callInfo->iCallId, callInfo->iService );
  5504                 callInfo->iCallId, callInfo->iService );