diff -r 7eb70891911c -r a2467631ae02 satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp --- a/satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp Fri Jun 11 14:07:16 2010 +0300 +++ b/satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp Wed Jun 23 18:49:32 2010 +0300 @@ -19,9 +19,9 @@ #include #include - #include "csetupcallrequesthandler.h" #include "CSetUpCallHandler.h" +#include "csetupcalldtmfsender.h" #include "msatasynctosync.h" #include "SatLog.h" @@ -60,6 +60,8 @@ CSetupCallRequestHandler* self = new ( ELeave ) CSetupCallRequestHandler( aPhone, aDispatcher ); + + self->iDtmfSender = CSetupCallDtmfSender::NewL( aPhone ); LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::NewL exiting" ) return self; @@ -76,6 +78,9 @@ CSetupCallRequestHandler::~CSetupCallRequestHandler calling" ) Cancel(); iDispatcher = NULL; + + delete iDtmfSender; + iDtmfSender = NULL; LOG( SIMPLE, "SETUPCALL: \ CSetupCallRequestHandler::~CSetupCallRequestHandler exiting" ) @@ -86,7 +91,7 @@ // ----------------------------------------------------------------------------- // void CSetupCallRequestHandler::DialNumber( const TDesC8& aCallParams, - const TDesC& aTelNumber, TBool aTerminateOtherCall, + TDes& aTelNumber, TBool aTerminateOtherCall, MSatAsyncToSync* aAsyncToSync ) { LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber calling" ) @@ -97,7 +102,7 @@ { if( aAsyncToSync ) { - iPhone.TerminateAllCalls( aAsyncToSync->RequestStatus() ); + iPhone.TerminateActiveCalls( aAsyncToSync->RequestStatus() ); terminateRes = aAsyncToSync->SetActiveAndWait(); } else @@ -112,6 +117,10 @@ { if( KErrNone == terminateRes ) { + // Separate dtmf string from whole number and store in iDtmfString + // the dtmf string will be removed from aTelNumber + iDtmfSender->SeparateDtmfFromTelNumber(aTelNumber); + // Dial the purl tel number iPhone.DialNoFdnCheck( iStatus, aCallParams, aTelNumber ); SetActive(); } @@ -138,7 +147,6 @@ if( !IsActive() ) { - iEmergencyCall = ETrue; iPhone.DialEmergencyCall( iStatus, aTelNumber ); SetActive(); } @@ -147,7 +155,8 @@ iDispatcher->SetupCallRequestComplete( KErrInUse ); } - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialEmergencyCall exiting" ) + LOG( SIMPLE, + "SETUPCALL: CSetupCallRequestHandler::DialEmergencyCall exiting" ) } // ----------------------------------------------------------------------------- @@ -157,18 +166,16 @@ // void CSetupCallRequestHandler::RunL() { - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL calling" ) + LOG2( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL calling\ + iStatus=%i", iStatus.Int() ) + + iDispatcher->SetupCallRequestComplete( iStatus.Int() ); - LOG2( NORMAL, "SETUPCALL: CSetupCallRequestHandler::RunL\ - iStatus == %i", iStatus.Int() ) - - if ( iEmergencyCall ) + if ( KErrNone == iStatus.Int() ) { - iEmergencyCall = EFalse; + iDtmfSender->SendDtmfString(); } - iDispatcher->SetupCallRequestComplete( iStatus.Int() ); - LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL exiting" ) } @@ -181,6 +188,7 @@ LOG( SIMPLE, "SETUPCALL: \ CSetupCallRequestHandler::CancelOperation calling" ) iPhone.DialCancel(); + iDtmfSender->Cancel(); LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::CancelOperation exiting" ) }