86 iSatMessHandler( aSatMessHandler ), |
87 iSatMessHandler( aSatMessHandler ), |
87 iSatMessaging( aSatMessaging ), |
88 iSatMessaging( aSatMessaging ), |
88 iTonNpiPresent( EFalse ), |
89 iTonNpiPresent( EFalse ), |
89 iEnvelopeResponseData( NULL ) |
90 iEnvelopeResponseData( NULL ) |
90 { |
91 { |
91 OstTrace0( TRACE_NORMAL, CSATCC_CSATCC, "CSatCC::CSatCC" ); |
92 OstTrace0( TRACE_NORMAL, CSATCC_CSATCC_TD, "CSatCC::CSatCC" ); |
92 } |
93 } |
93 |
94 |
94 // ----------------------------------------------------------------------------- |
95 // ----------------------------------------------------------------------------- |
95 // CSatCC::ConstructL |
96 // CSatCC::ConstructL |
96 // Symbian 2nd phase constructor can leave. |
97 // Symbian 2nd phase constructor can leave. |
97 // ----------------------------------------------------------------------------- |
98 // ----------------------------------------------------------------------------- |
98 // |
99 // |
99 void CSatCC::ConstructL() |
100 void CSatCC::ConstructL() |
100 { |
101 { |
101 OstTrace0( TRACE_NORMAL, CSATCC_CONSTRUCTL, "CSatCC::ConstructL" ); |
102 OstTrace0( TRACE_NORMAL, CSATCC_CONSTRUCTL_TD, "CSatCC::ConstructL" ); |
102 TFLOGSTRING("TSY: CSatCC::ConstructL"); |
103 TFLOGSTRING("TSY: CSatCC::ConstructL"); |
103 |
104 |
104 // Create array for CC request information storing |
105 // Create array for CC request information storing |
105 iCallControlArray = new( ELeave ) RArray<TCallControl>( 1 ); |
106 iCallControlArray = new( ELeave ) RArray<TCallControl>( 1 ); |
106 |
107 |
356 envelope.End()); |
357 envelope.End()); |
357 } |
358 } |
358 |
359 |
359 |
360 |
360 // ----------------------------------------------------------------------------- |
361 // ----------------------------------------------------------------------------- |
361 // CSatCC::SendUSSDEnvelope |
362 // CSatCC::SendUSSDEnvelopeL |
362 // Sends call control USSD envelope |
363 // Sends call control USSD envelope |
363 // ----------------------------------------------------------------------------- |
364 // ----------------------------------------------------------------------------- |
364 // |
365 // |
365 TInt CSatCC::SendUSSDEnvelope |
366 TInt CSatCC::SendUSSDEnvelopeL |
366 ( |
367 ( |
367 const TCallControl& aCcstruct //Structure containing call event info |
368 const TCallControl& aCcstruct //Structure containing call event info |
368 ) |
369 ) |
369 { |
370 { |
370 OstTrace0( TRACE_NORMAL, CSATCC_SENDUSSDENVELOPE, "CSatCC::SendUSSDEnvelope" ); |
371 TFLOGSTRING( "TSY: CSatCC::SendUSSDEnvelopeL" ); |
|
372 OstTrace0( TRACE_NORMAL, CSATCC_SENDUSSDENVELOPEL_TD, "CSatCC::SendUSSDEnvelopeL" ); |
371 |
373 |
372 TInt ret( KErrNone ); |
374 TInt ret( KErrNone ); |
373 // create envelope |
375 // create envelope |
374 TTlv envelope; |
376 TTlv envelope; |
375 envelope.Begin( KBerTlvCallControlTag ); |
377 envelope.Begin( KBerTlvCallControlTag ); |
535 return iSatMessHandler->UiccCatReqEnvelope( aPdpCcEnvelopeTid, |
537 return iSatMessHandler->UiccCatReqEnvelope( aPdpCcEnvelopeTid, |
536 envelope.End() ); |
538 envelope.End() ); |
537 } |
539 } |
538 |
540 |
539 // ----------------------------------------------------------------------------- |
541 // ----------------------------------------------------------------------------- |
540 // CSatCC::UiccCatRespEnvelopeReceived |
542 // CSatCC::UiccCatRespEnvelopeReceivedL |
541 // Handler function of incoming call control related data notification messages |
543 // Handler function of incoming call control related data notification messages |
542 // ----------------------------------------------------------------------------- |
544 // ----------------------------------------------------------------------------- |
543 // |
545 // |
544 void CSatCC::UiccCatRespEnvelopeReceived( const TIsiReceiveC& aIsiMessage ) |
546 void CSatCC::UiccCatRespEnvelopeReceivedL( const TIsiReceiveC& aIsiMessage ) |
545 { |
547 { |
546 OstTrace0( TRACE_NORMAL, CSATCC_UICCCATRESPENVELOPERECEIVED, "CSatCC::UiccCatRespEnvelopeReceived" ); |
548 OstTrace0( TRACE_NORMAL, CSATCC_UICCCATRESPENVELOPERECEIVEDL_TD, "CSatCC::UiccCatRespEnvelopeReceivedL" ); |
547 TFLOGSTRING( "TSY:CSatCC::UiccCatRespEnvelopeReceived" ); |
549 TFLOGSTRING( "TSY:CSatCC::UiccCatRespEnvelopeReceivedL" ); |
548 |
550 |
549 TUint8 status( aIsiMessage.Get8bit( |
551 TUint8 status( aIsiMessage.Get8bit( |
550 ISI_HEADER_SIZE + UICC_CAT_RESP_OFFSET_STATUS ) ); |
552 ISI_HEADER_SIZE + UICC_CAT_RESP_OFFSET_STATUS ) ); |
551 TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
553 TUint8 transId( aIsiMessage.Get8bit( ISI_HEADER_OFFSET_TRANSID ) ); |
552 |
554 |
717 { |
719 { |
718 switch( messageId ) |
720 switch( messageId ) |
719 { |
721 { |
720 case CALL_MODEM_RESOURCE_IND: |
722 case CALL_MODEM_RESOURCE_IND: |
721 { |
723 { |
722 CallModemResourceInd( aIsiMessage ); |
724 CallModemResourceIndL( aIsiMessage ); |
723 break; |
725 break; |
724 } |
726 } |
725 case CALL_MODEM_RESOURCE_CONF_IND: |
727 case CALL_MODEM_RESOURCE_CONF_IND: |
726 { |
728 { |
727 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_IND"); |
729 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_IND"); |
728 OstTrace0( TRACE_NORMAL, DUP1_CSATCC_MESSAGERECEIVED, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_IND" ); |
730 OstTrace0( TRACE_NORMAL, DUP1_CSATCC_MESSAGERECEIVED_TD, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_IND" ); |
729 |
731 |
730 if ( CALL_MODEM_RES_CONF_STARTUP == |
732 if ( CALL_MODEM_RES_CONF_STARTUP == |
731 aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
733 aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
732 CALL_MODEM_RESOURCE_CONF_IND_OFFSET_CONFSTATUS ) ) |
734 CALL_MODEM_RESOURCE_CONF_IND_OFFSET_CONFSTATUS ) ) |
733 { |
735 { |
751 break; |
753 break; |
752 } |
754 } |
753 case CALL_MODEM_RESOURCE_CONF_RESP: |
755 case CALL_MODEM_RESOURCE_CONF_RESP: |
754 { |
756 { |
755 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP"); |
757 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP"); |
756 OstTrace0( TRACE_NORMAL, DUP2_CSATCC_MESSAGERECEIVED, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP" ); |
758 OstTrace0( TRACE_NORMAL, DUP2_CSATCC_MESSAGERECEIVED_TD, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP" ); |
757 |
759 |
758 if ( CALL_MODEM_RES_CONF_SET == |
760 if ( CALL_MODEM_RES_CONF_SET == |
759 aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
761 aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
760 CALL_MODEM_RESOURCE_CONF_RESP_OFFSET_CONFOPERATION ) ) |
762 CALL_MODEM_RESOURCE_CONF_RESP_OFFSET_CONFOPERATION ) ) |
761 { |
763 { |
762 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP Resource configured"); |
764 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP Resource configured"); |
763 OstTrace0( TRACE_NORMAL, DUP3_CSATCC_MESSAGERECEIVED, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP Resource configured" ); |
765 OstTrace0( TRACE_NORMAL, DUP3_CSATCC_MESSAGERECEIVED_TD, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_CONF_RESP Resource configured" ); |
764 |
766 |
765 } |
767 } |
766 break; |
768 break; |
767 } |
769 } |
768 case CALL_MODEM_RESOURCE_RESP: |
770 case CALL_MODEM_RESOURCE_RESP: |
769 { |
771 { |
770 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_RESP Resource control sequence done"); |
772 TFLOGSTRING("TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_RESP Resource control sequence done"); |
771 OstTrace0( TRACE_NORMAL, DUP4_CSATCC_MESSAGERECEIVED, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_RESP Resource control sequence done" ); |
773 OstTrace0( TRACE_NORMAL, DUP4_CSATCC_MESSAGERECEIVED_TD, "TSY: CSatCC::MessageReceived, CALL_MODEM_RESOURCE_RESP Resource control sequence done" ); |
772 |
774 |
773 break; |
775 break; |
774 } |
776 } |
775 default: |
777 default: |
776 { |
778 { |
784 { |
786 { |
785 switch( messageId ) |
787 switch( messageId ) |
786 { |
788 { |
787 case SS_RESOURCE_CONTROL_IND: |
789 case SS_RESOURCE_CONTROL_IND: |
788 { |
790 { |
789 SsResourceControlInd( aIsiMessage ); |
791 SsResourceControlIndL( aIsiMessage ); |
790 break; |
792 break; |
791 } |
793 } |
792 case SS_RESOURCE_CONF_IND: |
794 case SS_RESOURCE_CONF_IND: |
793 { |
795 { |
794 TFLOGSTRING("TSY: CSatCC::MessageReceived, SS_RESOURCE_CONF_IND"); |
796 TFLOGSTRING("TSY: CSatCC::MessageReceived, SS_RESOURCE_CONF_IND"); |
795 OstTrace0( TRACE_NORMAL, DUP5_CSATCC_MESSAGERECEIVED, "TSY: CSatCC::MessageReceived, SS_RESOURCE_CONF_IND" ); |
797 OstTrace0( TRACE_NORMAL, DUP5_CSATCC_MESSAGERECEIVED_TD, "TSY: CSatCC::MessageReceived, SS_RESOURCE_CONF_IND" ); |
796 |
798 |
797 if ( SS_RESOURCE_CONF_READY == |
799 if ( SS_RESOURCE_CONF_READY == |
798 aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
800 aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
799 SS_RESOURCE_CONF_IND_OFFSET_CONFSTATUS ) ) |
801 SS_RESOURCE_CONF_IND_OFFSET_CONFSTATUS ) ) |
800 { |
802 { |
857 break; |
859 break; |
858 } |
860 } |
859 case GPDS_RESOURCE_CONTROL_RESP: |
861 case GPDS_RESOURCE_CONTROL_RESP: |
860 { |
862 { |
861 TFLOGSTRING("TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONTROL_RESP Resource control sequence done"); |
863 TFLOGSTRING("TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONTROL_RESP Resource control sequence done"); |
862 OstTrace0( TRACE_NORMAL, DUP7_CSATCC_MESSAGERECEIVED, "TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONTROL_RESP Resource control sequence done" ); |
864 OstTrace0( TRACE_NORMAL, DUP7_CSATCC_MESSAGERECEIVED_TD, "TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONTROL_RESP Resource control sequence done" ); |
863 |
865 |
864 break; |
866 break; |
865 } |
867 } |
866 case GPDS_RESOURCE_CONF_IND: |
868 case GPDS_RESOURCE_CONF_IND: |
867 { |
869 { |
868 TFLOGSTRING("TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONF_IND"); |
870 TFLOGSTRING("TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONF_IND"); |
869 OstTrace0( TRACE_NORMAL, DUP8_CSATCC_MESSAGERECEIVED, "TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONF_IND" ); |
871 OstTrace0( TRACE_NORMAL, DUP8_CSATCC_MESSAGERECEIVED_TD, "TSY: CSatCC::MessageReceived, GPDS_RESOURCE_CONF_IND" ); |
870 |
872 |
871 if ( iCallControlOnGPRSEnabled ) |
873 if ( iCallControlOnGPRSEnabled ) |
872 { |
874 { |
873 iSatMessHandler->GpdsResourceConfReq(); |
875 iSatMessHandler->GpdsResourceConfReq(); |
874 } |
876 } |
928 uiccSbFileDataOffset + UICC_SB_FILE_DATA_OFFSET_DATA, |
930 uiccSbFileDataOffset + UICC_SB_FILE_DATA_OFFSET_DATA, |
929 fileDataLength ) ); |
931 fileDataLength ) ); |
930 // Check call control status |
932 // Check call control status |
931 if ( KUiccTrIdServiceTableByte4 == trId ) |
933 if ( KUiccTrIdServiceTableByte4 == trId ) |
932 { |
934 { |
933 TUint8 usedBitMaskCallControl( KCallControlBitMaskUsim ); |
935 TInt ret( KErrNone ); |
934 if ( UICC_CARD_TYPE_ICC == cardType ) |
|
935 { |
|
936 usedBitMaskCallControl = KCallControlBitMaskSim; |
|
937 } |
|
938 // Bit 6 is the status bit of call control |
936 // Bit 6 is the status bit of call control |
939 if ( fileData[0] & usedBitMaskCallControl ) |
937 if ( fileData[0] & KCallControlBitMaskUsim ) |
940 { |
938 { |
941 // Call control enabled in (U)SIM |
939 // Call control enabled in (U)SIM |
942 iCallControlEnabled = ETrue; |
940 iCallControlEnabled = ETrue; |
943 iSatMessHandler->CallModemResourceConfReq( |
941 ret = iSatMessHandler->CallModemResourceConfReq( |
944 CALL_MODEM_RES_ID_MO_INIT | |
942 CALL_MODEM_RES_ID_MO_INIT | |
945 CALL_MODEM_RES_ID_MT_INIT, |
943 CALL_MODEM_RES_ID_MT_INIT, |
946 CALL_MODEM_RES_ID_MASK_MO_INIT | |
944 CALL_MODEM_RES_ID_MASK_MO_INIT | |
947 CALL_MODEM_RES_ID_MASK_MT_INIT ); |
945 CALL_MODEM_RES_ID_MASK_MT_INIT ); |
948 iSatMessHandler->SsResourceConfReq(); |
946 User::LeaveIfError( ret ); |
|
947 ret = iSatMessHandler->SsResourceConfReq(); |
|
948 User::LeaveIfError( ret ); |
949 } |
949 } |
950 else |
950 else |
951 { |
951 { |
952 // Call control disabled in (U)SIM |
952 // Call control disabled in (U)SIM |
953 iCallControlEnabled = EFalse; |
953 iCallControlEnabled = EFalse; |
954 iSatMessHandler->CallModemResourceConfReq( |
954 ret = iSatMessHandler->CallModemResourceConfReq( |
955 CALL_MODEM_RES_ID_MT_INIT, |
955 CALL_MODEM_RES_ID_MT_INIT, |
956 CALL_MODEM_RES_ID_MASK_MT_INIT ); |
956 CALL_MODEM_RES_ID_MASK_MT_INIT ); |
|
957 User::LeaveIfError( ret ); |
957 } |
958 } |
958 } |
959 } |
959 // Check call control GPRS status |
960 // Check call control GPRS status (UICC) or |
|
961 // Call control status (ICC) |
960 else if ( KUiccTrIdServiceTableByte7 == trId ) |
962 else if ( KUiccTrIdServiceTableByte7 == trId ) |
961 { |
963 { |
962 if ( fileData[0] & KCallControlBitMaskUsim ) |
964 TInt ret( KErrNone ); |
|
965 if ( UICC_CARD_TYPE_UICC == cardType ) |
963 { |
966 { |
964 // Call control on GPRS enabled in USIM |
967 if ( fileData[0] & KCallControlBitMaskUsim ) |
965 iCallControlOnGPRSEnabled = ETrue; |
968 { |
966 iSatMessHandler->GpdsResourceConfReq(); |
969 // Call control on GPRS enabled in USIM |
|
970 iCallControlOnGPRSEnabled = ETrue; |
|
971 ret = iSatMessHandler->GpdsResourceConfReq(); |
|
972 User::LeaveIfError( ret ); |
|
973 } |
|
974 else |
|
975 { |
|
976 // Call control on GPRS disabled in USIM |
|
977 iCallControlOnGPRSEnabled = EFalse; |
|
978 } |
967 } |
979 } |
968 else |
980 else if ( UICC_CARD_TYPE_ICC == cardType ) |
969 { |
981 { |
970 // Call control on GPRS disabled in USIM |
982 if ( KCallControlBitMaskSim == ( fileData[0] & KCallControlBitMaskSim ) ) |
971 iCallControlOnGPRSEnabled = EFalse; |
983 { |
|
984 // Call control enabled in (U)SIM |
|
985 iCallControlEnabled = ETrue; |
|
986 ret = iSatMessHandler->CallModemResourceConfReq( |
|
987 CALL_MODEM_RES_ID_MO_INIT | |
|
988 CALL_MODEM_RES_ID_MT_INIT, |
|
989 CALL_MODEM_RES_ID_MASK_MO_INIT | |
|
990 CALL_MODEM_RES_ID_MASK_MT_INIT ); |
|
991 User::LeaveIfError( ret ); |
|
992 ret = iSatMessHandler->SsResourceConfReq(); |
|
993 User::LeaveIfError( ret ); |
|
994 } |
|
995 else |
|
996 { |
|
997 // Call control disabled in (U)SIM |
|
998 iCallControlEnabled = EFalse; |
|
999 ret = iSatMessHandler->CallModemResourceConfReq( |
|
1000 CALL_MODEM_RES_ID_MT_INIT, |
|
1001 CALL_MODEM_RES_ID_MASK_MT_INIT ); |
|
1002 User::LeaveIfError( ret ); |
|
1003 } |
972 } |
1004 } |
973 } |
1005 } |
974 } |
1006 } |
975 else // Subblock is mandatory |
1007 else // Subblock is mandatory |
976 { |
1008 { |
977 TFLOGSTRING("TSY: CSatCC::MessageReceivedL - Mandatory subblock UICC_SB_FILE_DATA not found"); |
1009 TFLOGSTRING("TSY: CSatCC::MessageReceivedL - Mandatory subblock UICC_SB_FILE_DATA not found"); |
978 OstTrace0( TRACE_NORMAL, DUP1_CSATCC_MESSAGERECEIVEDL, "CSatCC::MessageReceivedL - - Mandatory subblock UICC_SB_FILE_DATA not found" ); |
1010 OstTrace0( TRACE_NORMAL, DUP1_CSATCC_MESSAGERECEIVEDL_TD, "CSatCC::MessageReceivedL - - Mandatory subblock UICC_SB_FILE_DATA not found" ); |
979 } |
1011 } |
980 } // End of if ( UICC_STATUS_OK == status |
1012 } // End of if ( UICC_STATUS_OK == status |
981 break; |
1013 break; |
982 } // End of case UICC_APPL_CMD_RESP |
1014 } // End of case UICC_APPL_CMD_RESP |
983 case UICC_CAT_RESP: |
1015 case UICC_CAT_RESP: |
1010 void CSatCC::SetTonNpi |
1042 void CSatCC::SetTonNpi |
1011 ( |
1043 ( |
1012 const TUint8 aTonNpi |
1044 const TUint8 aTonNpi |
1013 ) |
1045 ) |
1014 { |
1046 { |
1015 OstTrace0( TRACE_NORMAL, CSATCC_SETTONNPI, "CSatCC::SetTonNpi" ); |
1047 OstTrace0( TRACE_NORMAL, CSATCC_SETTONNPI_TD, "CSatCC::SetTonNpi" ); |
1016 TFLOGSTRING("TSY: CSatCC::SetTonNpi"); |
1048 TFLOGSTRING("TSY: CSatCC::SetTonNpi"); |
1017 |
1049 |
1018 iTonNpiForSS = aTonNpi; |
1050 iTonNpiForSS = aTonNpi; |
1019 iTonNpiPresent = ETrue; |
1051 iTonNpiPresent = ETrue; |
1020 } |
1052 } |
1021 |
1053 |
1022 // ----------------------------------------------------------------------------- |
1054 // ----------------------------------------------------------------------------- |
1023 // CSatCC::CallModemResourceInd |
1055 // CSatCC::CallModemResourceIndL |
1024 // Handles resource control request from modem Call server |
1056 // Handles resource control request from modem Call server |
1025 // ----------------------------------------------------------------------------- |
1057 // ----------------------------------------------------------------------------- |
1026 // |
1058 // |
1027 void CSatCC::CallModemResourceInd( const TIsiReceiveC& aIsiMessage ) |
1059 void CSatCC::CallModemResourceIndL( const TIsiReceiveC& aIsiMessage ) |
1028 { |
1060 { |
1029 TFLOGSTRING("TSY: CSatCC::CallModemResourceInd"); |
1061 TFLOGSTRING("TSY: CSatCC::CallModemResourceIndL"); |
1030 OstTrace0( TRACE_NORMAL, CSATCC_CALLMODEMRESOURCEIND, "CSatCC::CallModemResourceInd" ); |
1062 OstTrace0( TRACE_NORMAL, CSATCC_CALLMODEMRESOURCEINDL_TD, "CSatCC::CallModemResourceIndL" ); |
1031 |
1063 |
1032 TUint sbStartOffset( 0 ); |
1064 TUint sbStartOffset( 0 ); |
1033 // Check if resource control is requested for MO call. |
1065 // Check if resource control is requested for MO call. |
1034 |
1066 |
1035 TInt retValue( aIsiMessage.FindSubBlockOffsetById( |
1067 TInt retValue( aIsiMessage.FindSubBlockOffsetById( |
1135 } |
1167 } |
1136 } |
1168 } |
1137 } |
1169 } |
1138 |
1170 |
1139 // ----------------------------------------------------------------------------- |
1171 // ----------------------------------------------------------------------------- |
1140 // CSatCC::SendCallModemResourceReq |
1172 // CSatCC::SendCallModemResourceReqL |
1141 // Creates resource control response for modem Call server |
1173 // Creates resource control response for modem Call server |
1142 // ----------------------------------------------------------------------------- |
1174 // ----------------------------------------------------------------------------- |
1143 // |
1175 // |
1144 void CSatCC::SendCallModemResourceReq( |
1176 void CSatCC::SendCallModemResourceReqL( |
1145 const TCallControl& aTcc, |
1177 const TCallControl& aTcc, |
1146 const TUint8 aResult, |
1178 const TUint8 aResult, |
1147 TPtrC8 aApduData ) |
1179 TPtrC8 aApduData ) |
1148 { |
1180 { |
1149 TFLOGSTRING("TSY: CSatCC::SendCallModemResourceReq"); |
1181 TFLOGSTRING("TSY: CSatCC::SendCallModemResourceReqL"); |
1150 OstTrace0( TRACE_NORMAL, CSATCC_SENDCALLMODEMRESOURCEREQ, "CSatCC::SendCallModemResourceReq" ); |
1182 OstTrace0( TRACE_NORMAL, CSATCC_SENDCALLMODEMRESOURCEREQL_TD, "CSatCC::SendCallModemResourceReqL" ); |
1151 |
1183 |
1152 TBuf8<KMaximumCcBufferSize> isiMessage; |
1184 TBuf8<KMaximumCcBufferSize> isiMessage; |
1153 TInt ret( KErrNotFound ); |
1185 TInt ret( KErrNotFound ); |
1154 TBool checkInfoNeeded( EFalse ); |
1186 TBool checkInfoNeeded( EFalse ); |
1155 TUint8 checkInfoParams( 0 ); |
1187 TUint8 checkInfoParams( 0 ); |
1322 // Temp storage for address |
1354 // Temp storage for address |
1323 TBuf8<2 * KCallServerMaxAddressLenght> asciiAddress; |
1355 TBuf8<2 * KCallServerMaxAddressLenght> asciiAddress; |
1324 TSatUtility::BCDToAscii( addressTlv.GetValue().Mid( 1 ), |
1356 TSatUtility::BCDToAscii( addressTlv.GetValue().Mid( 1 ), |
1325 asciiAddress ); |
1357 asciiAddress ); |
1326 |
1358 |
1327 // let's check is new number "112". This because of if number |
1359 // let's check is new number "112". This because of if number |
1328 // is "112" emergency call is needed to establish. otherwise |
1360 // is "112" emergency call is needed to establish. otherwise |
1329 // normal call needs to be established, even new number is found |
1361 // normal call needs to be established, even new number is found |
1330 // from EFecc. So if number is not "112" we need to add subblock |
1362 // from EFecc. So if number is not "112" we need to add subblock |
1331 // CALL_MODEM_CHECK_INFO with CALL_MODEM_CHK_DISABLE_EMERG |
1363 // CALL_MODEM_CHECK_INFO with CALL_MODEM_CHK_DISABLE_EMERG |
1332 _LIT8(KEccNbr, "112"); |
1364 _LIT8(KEccNbr, "112"); |
1333 if( 0 != asciiAddress.Compare( KEccNbr ) ) |
1365 if( 0 != asciiAddress.Compare( KEccNbr ) ) |
1334 { |
1366 { |
1335 checkInfoNeeded = ETrue; |
1367 checkInfoNeeded = ETrue; |
1417 // before sending the call control result to call server, |
1449 // before sending the call control result to call server, |
1418 // inform NTSY about call control CALL_ID and call control result |
1450 // inform NTSY about call control CALL_ID and call control result |
1419 CMmDataPackage dataPackage; |
1451 CMmDataPackage dataPackage; |
1420 TUint8 callId( aTcc.iCallId ); |
1452 TUint8 callId( aTcc.iCallId ); |
1421 dataPackage.PackData( &callId, &ccresult ); |
1453 dataPackage.PackData( &callId, &ccresult ); |
1422 iSatMessaging->GetMessageRouter()->ExtFuncL( |
1454 iSatMessaging->GetMessageRouter()->ExtFuncL( |
1423 ESatNotifyCallControlRequest, &dataPackage ); |
1455 ESatNotifyCallControlRequest, &dataPackage ); |
1424 // send request |
1456 // send request |
1425 iSatMessHandler->CallModemResourceReq( aTcc.iTransId, isiMessage ); |
1457 iSatMessHandler->CallModemResourceReq( aTcc.iTransId, isiMessage ); |
1426 |
1458 |
1427 if ( KCcEmptyResponseLenght < aApduData.Length() ) |
1459 if ( KCcEmptyResponseLenght < aApduData.Length() ) |
1433 aApduData ); |
1465 aApduData ); |
1434 } |
1466 } |
1435 } |
1467 } |
1436 |
1468 |
1437 // ----------------------------------------------------------------------------- |
1469 // ----------------------------------------------------------------------------- |
1438 // CSatCC::SsResourceControlInd |
1470 // CSatCC::SsResourceControlIndL |
1439 // Handles resource control request from modem SS server |
1471 // Handles resource control request from modem SS server |
1440 // ----------------------------------------------------------------------------- |
1472 // ----------------------------------------------------------------------------- |
1441 // |
1473 // |
1442 void CSatCC::SsResourceControlInd( const TIsiReceiveC& aIsiMessage ) |
1474 void CSatCC::SsResourceControlIndL( const TIsiReceiveC& aIsiMessage ) |
1443 { |
1475 { |
1444 TFLOGSTRING("TSY: CSatCC::SsResourceControlInd"); |
1476 TFLOGSTRING("TSY: CSatCC::SsResourceControlIndL"); |
1445 OstTrace0( TRACE_NORMAL, CSATCC_SSRESOURCECONTROLIND, "CSatCC::SsResourceControlInd" ); |
1477 OstTrace0( TRACE_NORMAL, CSATCC_SSRESOURCECONTROLINDL_TD, "CSatCC::SsResourceControlIndL" ); |
1446 |
1478 |
1447 TCallControl callcontrol; |
1479 TCallControl callcontrol; |
1448 TInt stringLength; |
1480 TInt stringLength; |
1449 // store traid's |
1481 // store traid's |
1450 callcontrol.iTransId = aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
1482 callcontrol.iTransId = aIsiMessage.Get8bit( ISI_HEADER_SIZE + |
1504 { |
1536 { |
1505 SendSSEnvelope( callcontrol ); |
1537 SendSSEnvelope( callcontrol ); |
1506 } |
1538 } |
1507 else |
1539 else |
1508 { |
1540 { |
1509 SendUSSDEnvelope( callcontrol ); |
1541 SendUSSDEnvelopeL( callcontrol ); |
1510 } |
1542 } |
1511 } |
1543 } |
1512 |
1544 |
1513 // ----------------------------------------------------------------------------- |
1545 // ----------------------------------------------------------------------------- |
1514 // CSatCC::SendSsResourceControlReq |
1546 // CSatCC::SendSsResourceControlReqL |
1515 // Creates resource control response for modem SS server |
1547 // Creates resource control response for modem SS server |
1516 // ----------------------------------------------------------------------------- |
1548 // ----------------------------------------------------------------------------- |
1517 // |
1549 // |
1518 void CSatCC::SendSsResourceControlReq( |
1550 void CSatCC::SendSsResourceControlReqL( |
1519 const TCallControl& aTcc, |
1551 const TCallControl& aTcc, |
1520 const TUint8 aSw1, |
1552 const TUint8 aSw1, |
1521 const TUint8 aSw2, |
1553 const TUint8 aSw2, |
1522 const TUint8 aResult, |
1554 const TUint8 aResult, |
1523 TPtrC8 aApduData ) |
1555 TPtrC8 aApduData ) |
1524 { |
1556 { |
1525 TFLOGSTRING("TSY: CSatCC::SendSsResourceControlReq"); |
1557 TFLOGSTRING("TSY: CSatCC::SendSsResourceControlReqL"); |
1526 OstTrace0( TRACE_NORMAL, CSATCC_SENDSSRESOURCECONTROLREQ, "CSatCC::SendSsResourceControlReq" ); |
1558 OstTrace0( TRACE_NORMAL, CSATCC_SENDSSRESOURCECONTROLREQL_TD, "CSatCC::SendSsResourceControlReqL" ); |
1527 |
1559 |
1528 TBuf8<KMaximumCcBufferSize> isiMessage; |
1560 TBuf8<KMaximumCcBufferSize> isiMessage; |
1529 CBerTlv response; |
1561 CBerTlv response; |
1530 response.SetData( aApduData ); |
1562 response.SetData( aApduData ); |
1531 // Set initial cc result, e.g. the SIM has responded with sw1/sw2 90 00 |
1563 // Set initial cc result, e.g. the SIM has responded with sw1/sw2 90 00 |
1631 changedSsServerAction = ETrue; |
1663 changedSsServerAction = ETrue; |
1632 } |
1664 } |
1633 else if ( KErrNone == response.TlvByTagValue( &ssServerString, |
1665 else if ( KErrNone == response.TlvByTagValue( &ssServerString, |
1634 KTlvUssdStringTag ) ) |
1666 KTlvUssdStringTag ) ) |
1635 { |
1667 { |
1636 // USSD string has been modified to new USSD string |
1668 // Check if modified USSD string has valid DCS |
1637 isiMessage.Append( SS_RESOURCE_ALLOWED ); |
1669 if ( ESmsUnknownOrReservedDcs |
1638 isiMessage.Append( KPadding ); |
1670 != TSatUtility::DecodeCbsDcs( ssServerString.GetValue()[0] ) ) |
1639 internalCcResult = KModified; |
1671 { |
|
1672 // USSD string has been modified to new USSD string |
|
1673 isiMessage.Append( SS_RESOURCE_ALLOWED ); |
|
1674 internalCcResult = KModified; |
|
1675 } |
|
1676 else |
|
1677 { |
|
1678 // Not valid DCS, do not send USSD to network |
|
1679 isiMessage.Append( SS_RESOURCE_DENIED ); |
|
1680 internalCcResult = KRejected; |
|
1681 } |
1640 } |
1682 } |
1641 } |
1683 } |
1642 break; |
1684 break; |
1643 } |
1685 } |
1644 default: |
1686 default: |