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; |
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 { |
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; |
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 ); |