39 const TUint8 KDashChar( 0x23 ); |
39 const TUint8 KDashChar( 0x23 ); |
40 const TUint8 KDTMFChar( 0x70 ); |
40 const TUint8 KDTMFChar( 0x70 ); |
41 const TUint8 KWildChar( 0x77 ); |
41 const TUint8 KWildChar( 0x77 ); |
42 const TUint8 KExpansionChar( 0x2E ); |
42 const TUint8 KExpansionChar( 0x2E ); |
43 |
43 |
|
44 /** Maximum name length. */ |
|
45 const TInt KSatMaximumNameLength = 50; |
|
46 |
|
47 /** Maximum phone number length same as used by phone. */ |
|
48 const TInt KSatMaximumPhoneNumberLength = 100; |
|
49 |
|
50 /** The subaddress length, see ITU-T I.330 and 3GPP TS 11.14. */ |
|
51 const TInt KSatSubAddressLength = 21; |
|
52 |
|
53 /** The maximum bearer length. The bearer capabilities as |
|
54 defined in GSM 04.08. */ |
|
55 const TInt KSatBearerLength = 14; |
|
56 |
|
57 |
44 _LIT( KFixedSimEmergencyNumber, "112" ); |
58 _LIT( KFixedSimEmergencyNumber, "112" ); |
45 |
59 |
46 // ======== MEMBER FUNCTIONS ======== |
60 // ======== MEMBER FUNCTIONS ======== |
47 |
61 |
48 // ----------------------------------------------------------------------------- |
62 // ----------------------------------------------------------------------------- |
604 |
618 |
605 // ----------------------------------------------------------------------------- |
619 // ----------------------------------------------------------------------------- |
606 // Performs the request to dial |
620 // Performs the request to dial |
607 // ----------------------------------------------------------------------------- |
621 // ----------------------------------------------------------------------------- |
608 // |
622 // |
609 //ETel MM API Usage for SAT Todo |
|
610 // |
|
611 //2 RSAT::TSetUpCallV6 iCapabilityConfigParams we only have one TCcp and there |
|
612 // are two in RMobilePhone::TMobileCallParamsV7 ( according the study of tommi |
|
613 // the second TCcp in in TMobileCallParamsV7 will be ignored ) |
|
614 //3 RMobilePhone::TMobileCallParamsV7 has TBCRepeatIndicator iBCRepeatIndicator |
|
615 // RSat::TSetUpCallV6 don't have it. Does it needed from RSat |
|
616 //4 RMobilePhone::TMobileCallParamsV7 has TMobileCallMulticallBearerMode |
|
617 // iBearerMode, RSat::TSetUpCallV6 does not have it. can we just use the |
|
618 // default value? |
|
619 //5 SetShowNumber in AIW not provided by ETel MM, support needed? |
|
620 //6 SetAllowMach in AIW not provided by ETel MM, support needed? |
|
621 //8 Convert the return value from RMobilePhone::DialNoFdnCheck to the SAT error |
|
622 // code, the return value is not enough, we need get more information from |
|
623 // GetLineInfo. |
|
624 |
|
625 |
|
626 void CSetUpCallHandler::DoSetupCall( CSetupCallRequestHandler& aHandler ) |
623 void CSetUpCallHandler::DoSetupCall( CSetupCallRequestHandler& aHandler ) |
627 { |
624 { |
628 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL calling" ) |
625 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL calling" ) |
629 |
|
630 RSat::TSetUpCallType callType( iSetUpCallData.iType ); |
|
631 |
|
632 TDes& telNumber( iSetUpCallData.iAddress.iTelNumber ); |
|
633 CheckNumber( telNumber ); |
|
634 |
|
635 RMobileCall::TMobileCallParamsV7 dialParams; |
|
636 RMobileCall::TMobileCallParamsV7Pckg package( dialParams ); |
|
637 |
|
638 //Redail has been removed from MCL, no redail support. |
|
639 dialParams.iAutoRedial = EFalse; |
|
640 //TODO: check do we need to set bearer model |
|
641 dialParams.iBearerMode = RMobileCall::EMulticallNewBearer; |
|
642 dialParams.iCallParamOrigin = RMobileCall::EOriginatorSIM; |
|
643 dialParams.iSubAddress = iSetUpCallData.iSubAddress; |
|
644 dialParams.iBearerCap1 = iSetUpCallData.iCapabilityConfigParams; |
|
645 |
626 |
646 dialParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode; |
627 if( CheckSetupCallParam () ) |
|
628 { |
|
629 |
|
630 RSat::TSetUpCallType callType( iSetUpCallData.iType ); |
647 |
631 |
648 dialParams.iIconId.iQualifier = RMobileCall::ENoIconId; |
632 TDes& telNumber( iSetUpCallData.iAddress.iTelNumber ); |
|
633 CheckNumber( telNumber ); |
|
634 |
|
635 RMobileCall::TMobileCallParamsV7 dialParams; |
|
636 RMobileCall::TMobileCallParamsV7Pckg package( dialParams ); |
649 |
637 |
650 |
638 //Redail has been removed from MCL, no redail support. |
651 dialParams.iAlphaId = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId; |
639 dialParams.iAutoRedial = EFalse; |
652 LOG2( NORMAL, |
640 dialParams.iBearerMode = RMobileCall::EMulticallNewBearer; |
653 "SETUPCALL: CSetUpCallHandler::DoSetupCallL id:%S", |
641 dialParams.iCallParamOrigin = RMobileCall::EOriginatorSIM; |
654 &dialParams.iAlphaId ) |
642 dialParams.iSubAddress = iSetUpCallData.iSubAddress; |
655 |
643 dialParams.iBearerCap1 = iSetUpCallData.iCapabilityConfigParams; |
656 LOG2( NORMAL, |
644 |
657 "SETUPCALL: CSetUpCallHandler::DoSetupCallL number:%S", |
645 dialParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode; |
658 &iSetUpCallData.iAddress.iTelNumber ) |
646 |
659 |
647 dialParams.iIconId.iQualifier = RMobileCall::ENoIconId; |
660 TBool terminateOtherCall( EFalse ); |
648 |
661 // check if we need to disconnect other calls |
649 |
662 if ( ( RSat::EDisconnectOtherCalls == callType ) || |
650 dialParams.iAlphaId = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId; |
663 ( RSat::EDisconnectOtherCallsWithRedial == callType ) ) |
651 LOG2( NORMAL, |
664 { |
652 "SETUPCALL: CSetUpCallHandler::DoSetupCallL id:%S", |
665 LOG( SIMPLE, |
653 &dialParams.iAlphaId ) |
666 "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" ) |
654 |
667 terminateOtherCall = ETrue ; |
655 LOG2( NORMAL, |
668 } |
656 "SETUPCALL: CSetUpCallHandler::DoSetupCallL number:%S", |
669 |
657 &iSetUpCallData.iAddress.iTelNumber ) |
670 aHandler.DialNumber( package, iSetUpCallData.iAddress.iTelNumber, |
658 |
671 terminateOtherCall, iUtils->CreateAsyncToSyncHelper() ); |
659 TBool terminateOtherCall( EFalse ); |
|
660 // check if we need to disconnect other calls |
|
661 if ( ( RSat::EDisconnectOtherCalls == callType ) || |
|
662 ( RSat::EDisconnectOtherCallsWithRedial == callType ) ) |
|
663 { |
|
664 LOG( SIMPLE, |
|
665 "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" ) |
|
666 terminateOtherCall = ETrue ; |
|
667 } |
|
668 |
|
669 aHandler.DialNumber( package, iSetUpCallData.iAddress.iTelNumber, |
|
670 terminateOtherCall, iUtils->CreateAsyncToSyncHelper() ); |
|
671 } |
|
672 else |
|
673 { |
|
674 CompleteSetupCallWithStatus( KErrArgument ); |
|
675 } |
672 |
676 |
673 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL exiting" ) |
677 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL exiting" ) |
674 } |
678 } |
675 |
679 |
676 // ----------------------------------------------------------------------------- |
680 // ----------------------------------------------------------------------------- |
952 aHandler.DialEmergencyCall( iSetUpCallData.iAddress.iTelNumber ); |
957 aHandler.DialEmergencyCall( iSetUpCallData.iAddress.iTelNumber ); |
953 |
958 |
954 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall exiting" ) |
959 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall exiting" ) |
955 } |
960 } |
956 |
961 |
|
962 // ----------------------------------------------------------------------------- |
|
963 // check setup call param. |
|
964 // ----------------------------------------------------------------------------- |
|
965 // |
|
966 TBool CSetUpCallHandler::CheckSetupCallParam() |
|
967 { |
|
968 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam calling" ) |
|
969 |
|
970 TBool valid( ETrue ); |
|
971 if ( iSetUpCallData.iAddress.iTelNumber.Length() |
|
972 > KSatMaximumPhoneNumberLength ) |
|
973 { |
|
974 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam num" ) |
|
975 valid = EFalse; |
|
976 } |
|
977 else if ( iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId.Length() |
|
978 > KSatMaximumNameLength ) |
|
979 { |
|
980 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam name" ) |
|
981 valid = EFalse; |
|
982 } |
|
983 else if ( iSetUpCallData.iSubAddress.Length() > KSatSubAddressLength ) |
|
984 { |
|
985 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam sub" ) |
|
986 valid = EFalse; |
|
987 } |
|
988 else if ( iSetUpCallData.iCapabilityConfigParams.Length() |
|
989 > KSatBearerLength ) |
|
990 { |
|
991 LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam bear" ) |
|
992 valid = EFalse; |
|
993 } |
|
994 LOG2( SIMPLE, |
|
995 "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam exiting %d", valid ) |
|
996 return valid; |
|
997 } |
|
998 |
|
999 |
957 // End Of File |
1000 // End Of File |