//
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
//! @file
//! @SYMTestSuiteName  t_sendsiprequest
//! @SYMScriptTestEnvironment This test script requires a basic ROM.

///////////////////////////////////////////////////////////////////////////////
// t_sendsiprequest.script

LOAD_SUITE      t_sipclientapi
DELAY           5000

START_TESTCASE send-sip-request-master-0001 
//! @SYMTestCaseID          send-sip-request-master-0001
//! @SYMAPI                 Send SIP Request
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        04/08/2009
//! @SYMTestCaseDesc        Creates SIP request and sends it to the given destination.
//! @SYMTestActions         1.Create object for CSIPManagedProfileRegistry, CSIPManagedProfile, CSIPProfileRegistry, CSIP,
//!                           CSIPProfile, CSIPConnection, CSIPClientTransaction, CSIPResponseElements, CSIPRequestElements,
//!                           CSIPToHeader, CSIPFromHeader, CSIPMessageElements, CSIPContentTypeHeader.
//!                         2.Instantiate a new CSIP object with UID.
//!                         3.Instantiate a new CSIPProfileRegistry object with parameter CSip.
//!                         4.Instantiate a new CSIPManagedProfileRegistry object with default values for given type.
//!                         5.Instantiate a new CSIPConnection object with CSIP object and IAP name.
//!                         6.Create a SIP profile.
//!                         4.Set Parameter to this profle.
//!                         5.Save the new profile to the persistent storage and verify the registry event EProfileCreated = 0.
//!                         6.Get default profile using  CSIPProfileRegistry::DefaultProfileL
//!                         7.Enable the default profile and verify the registry event EProfileRegistered = 2
//!                         8.Instantiate a new CSIPRequestElements object with 
//!                         9.Disable the profile
//!                         10.Destroy and delete the profile and verify the registry event EProfileDestroyed = 4
//!                         11.Destruct objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: SIP request is sent out and incoming response is receieved.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPResponseElements          responseelements
        CREATE_OBJECT       CSIPRequestElements           requestelements
        CREATE_OBJECT       CSIPToHeader                  toheader
        CREATE_OBJECT       CSIPFromHeader                fromheader
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        COMMAND             sip                           NewL                      send-sip-request-master-0001-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0001-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0001-NewL_command04
        OUTSTANDING                                                                 
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0001-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0001-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0001-SaveL_command14
        OUTSTANDING                                                                 
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0001-DefaultProfileL_command15
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0001-EnableL_command16 
        OUTSTANDING
        COMMAND             requestelements               NewL                      send-sip-request-master-0001-NewL_command17
        COMMAND             toheader                      DecodeL                   send-sip-request-master-0001-DecodeL_command18
        COMMAND             requestelements               SetToHeaderL              send-sip-request-master-0001-SetToHeaderL_command19
        COMMAND             fromheader                    DecodeL                   send-sip-request-master-0001-DecodeL_command20
        COMMAND             requestelements               SetFromHeaderL            send-sip-request-master-0001-SetFromHeaderL_command21
        COMMAND             requestelements               SetMethodL                send-sip-request-master-0001-SetMethodL_command22
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0001-NewL_command23
        COMMAND             requestelements               MessageElements           send-sip-request-master-0001-MessageElements_command24
        COMMAND             messageelements               SetContentL               send-sip-request-master-0001-SetContentL_command25
        COMMAND             sipconnection                 SendRequestL              send-sip-request-master-0001-SendRequestL_command26
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0001-WaitForIncomingResponse_command27
        OUTSTANDING           
        COMMAND             clienttransaction             ResponseElements          send-sip-request-master-0001-ResponseElements_command28
        COMMAND             responseelements              StatusCode                send-sip-request-master-0001-StatusCode_command29
        COMMAND             profileregistry               Disable                   send-sip-request-master-0001-Disable_command30
        OUTSTANDING                                                                 
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0001-DestroyL_command31
        OUTSTANDING
        COMMAND             sipconnection                 ~
        COMMAND             clienttransaction             ~
        COMMAND             contenttypeheader             ~
        COMMAND             responseelements              ~
        COMMAND             requestelements               ~
        COMMAND             contenttypeheader             ~
        COMMAND             toheader                      ~
        COMMAND             fromheader                    ~
        COMMAND             profile                       ~
        COMMAND             sip                           ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             managedprofile                ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0001

DELAY           5000

START_TESTCASE              send-sip-request-master-0002
//! @SYMTestCaseID          send-sip-request-master-0002
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        28/08/2009
//! @SYMAPI                 CSIPConnection::SendRequestL(CSIPRequestElements *aElements, const MSIPRegistrationContext &aContext)
//! @SYMTestCaseDesc        Creates SIP request and sends it to the given destination. The function must not be used with 
//!                         SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. 
//!                         This provokes the Non-invite state machine. This function must be used if the user has created the 
//!                         registration binding.
//! @SYMTestActions         1.Create object for CSIPToHeader, CSIPRouteHeader, CSIPAddress, CSIPContactHeader, CSIPRefresh, CSIP,
//!                           CSIPConnection, CSIPClientTransaction, CSIPMessageElements, CSIPRegistrationBinding and objects for SIP MESSAGE.
//!                         2.Instantiate objects preparing for registration.
//!                         3.Create SIP registration binding using SIPToHeader, SIPContactHeader, SIPRouteHeader, SIPRefresh and SIPConnection
//!                         4.Send registration request with object of CSIPRequestElements and MSIPRegistrationContext.
//!                         5.Wait for the registration response from SIP stack
//!                         6.Construct message elements for SIP MESSAGE.
//!                         7.Send SIP MESSAGE.
//!                         8.Destruct objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The SIP Client can start and close successfully without causing any panic
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                     \SIP\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPToHeader                  toheader
        CREATE_OBJECT       CSIPAddress                   address
        CREATE_OBJECT       CSIPContactHeader             contactheader
        CREATE_OBJECT       CSIPRefresh                   refresh
        CREATE_OBJECT       CSIPRegistrationBinding       binding
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPRequestElements           requestelements
        CREATE_OBJECT       CSIPToHeader                  reqtoheader
        CREATE_OBJECT       CSIPFromHeader                reqfromheader
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPHttpDigest				  httpdigest
        COMMAND             sip                           NewL                      send-sip-request-master-0002-NewL_command01                          
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0002-NewL_command02
        OUTSTANDING    
        COMMAND             toheader                      DecodeL                   send-sip-request-master-0002-DecodeL_command03
        COMMAND             address                       DecodeL                   send-sip-request-master-0002-DecodeL_command04 
        COMMAND             contactheader                 NewL                      send-sip-request-master-0002-NewL_command05
        COMMAND             refresh                       NewL    
        COMMAND             binding                       NewL                      send-sip-request-master-0002-NewL_command06
        COMMAND				httpdigest					  NewL                      send-sip-request-master-0002-NewL_Command07
        COMMAND             binding                       RegisterL                 send-sip-request-master-0002-RegisterL_command08
        COMMAND             httpdigest                    WaitForChallengeReceived  send-sip-request-master-0002-WaitForChallengeReceived_Command09
        OUTSTANDING
        COMMAND				httpdigest					  SetCredentialsL			send-sip-request-master-0002-SetCredentialsL_Command10
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0002-WaitForIncomingResponse_command11
        OUTSTANDING
        COMMAND             requestelements               NewL                      send-sip-request-master-0002-NewL_command12
        COMMAND             reqtoheader                   DecodeL                   send-sip-request-master-0002-DecodeL_command13
        COMMAND             requestelements               SetToHeaderL              send-sip-request-master-0002-SetToHeaderL_command14
        COMMAND             reqfromheader                 DecodeL                   send-sip-request-master-0002-DecodeL_command15
        COMMAND             requestelements               SetFromHeaderL            send-sip-request-master-0002-SetFromHeaderL_command16
        COMMAND             requestelements               SetMethodL                send-sip-request-master-0002-SetMethodL_command17
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0002-NewL_command18
        COMMAND             requestelements               MessageElements           send-sip-request-master-0002-MessageElements_command19
        COMMAND             messageelements               SetContentL               send-sip-request-master-0002-SetContentL_command20
        COMMAND             sipconnection                 SendRequestL              send-sip-request-master-0002-SendRequestL_command21
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0002-WaitForIncomingResponse_command22
        OUTSTANDING  
        COMMAND             toheader                      ~
        COMMAND             address                       ~
        COMMAND             contactheader                 ~
        COMMAND             refresh                       ~
        COMMAND             httpdigest                    ~
        COMMAND             binding                       ~
        COMMAND             contenttypeheader             ~
        COMMAND             requestelements               ~
        COMMAND             contenttypeheader             ~
        COMMAND             reqtoheader                   ~
        COMMAND             reqfromheader                 ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE      send-sip-request-master-0002

DELAY           5000

START_TESTCASE              send-sip-request-master-0003
//! @SYMTestCaseID          send-sip-request-master-0003
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        28/08/2009
//! @SYMAPI                 CSIPConnection::SendRequestL(CSIPRequestElements *aElements, const MSIPRegistrationContext &aContext, CSIPRefresh &aRefresh)
//! @SYMTestCaseDesc        Creates SIP request and sends it to the given destination. The function must not be used with 
//!                         SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. 
//!                         This provokes the Non-invite state machine. This function must be used if the user has created the 
//!                         registration binding.
//! @SYMTestActions         1.Create object for CSIPToHeader, CSIPRouteHeader, CSIPAddress, CSIPContactHeader, CSIPRefresh, CSIP,
//!                           CSIPConnection, CSIPClientTransaction, CSIPMessageElements, CSIPRegistrationBinding and objects for SIP MESSAGE.
//!                         2.Instantiate objects preparing for registration.
//!                         3.Create SIP registration binding using SIPToHeader, SIPContactHeader, SIPRouteHeader, SIPRefresh and SIPConnection
//!                         4.Send registration request with object of CSIPRequestElements, CSIPRefresh and MSIPRegistrationContext.
//!                         5.Wait for the registration response from SIP stack
//!                         6.Construct message elements for SIP MESSAGE.
//!                         7.Send SIP MESSAGE.
//!                         12.Destruct objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The SIP Client can start and close successfully without causing any panic
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                     \SIP\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPToHeader                  toheader
        CREATE_OBJECT       CSIPAddress                   address
        CREATE_OBJECT       CSIPContactHeader             contactheader
        CREATE_OBJECT       CSIPRefresh                   refresh
        CREATE_OBJECT       CSIPRegistrationBinding       binding
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPRequestElements           requestelements
        CREATE_OBJECT       CSIPToHeader                  reqtoheader
        CREATE_OBJECT       CSIPFromHeader                reqfromheader
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPRefresh                   reqrefresh
        CREATE_OBJECT       CSIPExpiresHeader             expiresheader
        CREATE_OBJECT       CSIPHttpDigest				  httpdigest
        COMMAND             sip                           NewL                      send-sip-request-master-0003-NewL_command01                          
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0003-NewL_command02
        OUTSTANDING    
        COMMAND             toheader                      DecodeL                   send-sip-request-master-0003-DecodeL_command03
        COMMAND             address                       DecodeL                   send-sip-request-master-0003-DecodeL_command04 
        COMMAND             contactheader                 NewL                      send-sip-request-master-0003-NewL_command05
        COMMAND             refresh                       NewL    
        COMMAND             binding                       NewL                      send-sip-request-master-0003-NewL_command06
        COMMAND				httpdigest					  NewL                      send-sip-request-master-0003-NewL_Command07
        COMMAND             binding                       RegisterL                 send-sip-request-master-0003-RegisterL_command08
        COMMAND             httpdigest                    WaitForChallengeReceived  send-sip-request-master-0003-WaitForChallengeReceived_Command09
        OUTSTANDING
        COMMAND				httpdigest					  SetCredentialsL			send-sip-request-master-0003-SetCredentialsL_Command10
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0003-WaitForIncomingResponse_command11
        OUTSTANDING
        COMMAND             expiresheader                 NewL                      send-sip-request-master-0003-NewL_command12
        COMMAND             reqtoheader                   DecodeL                   send-sip-request-master-0003-DecodeL_command13
        COMMAND             reqfromheader                 DecodeL                   send-sip-request-master-0003-DecodeL_command14
        COMMAND             requestelements               NewL                      send-sip-request-master-0003-NewL_command15
        COMMAND             requestelements               SetMethodL                send-sip-request-master-0003-SetMethodL_command16
        COMMAND             requestelements               MessageElements           send-sip-request-master-0003-MessageElements_command17
        COMMAND             messageelements               SetUserHeadersL           send-sip-request-master-0003-SetUserHeadersL_command18
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0003-NewL_command19
        COMMAND             messageelements               SetContentL               send-sip-request-master-0003-SetContentL_command20 
        COMMAND             requestelements               SetFromHeaderL            send-sip-request-master-0003-SetFromHeaderL_command21
        COMMAND             requestelements               SetToHeaderL              send-sip-request-master-0003-SetToHeaderL_command22
        COMMAND             reqrefresh                    NewL
        COMMAND             sipconnection                 SendRequestL              send-sip-request-master-0003-SendRequestL_command23
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0003-WaitForIncomingResponse_command24
        OUTSTANDING
        COMMAND             toheader                      ~
        COMMAND             address                       ~
        COMMAND             contactheader                 ~
        COMMAND             refresh                       ~
        COMMAND             httpdigest                    ~
        COMMAND             binding                       ~
        COMMAND             contenttypeheader             ~
        COMMAND             requestelements               ~
        COMMAND             contenttypeheader             ~
        COMMAND             reqtoheader                   ~
        COMMAND             reqfromheader                 ~
        COMMAND             reqrefresh                    ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE      send-sip-request-master-0003

DELAY           5000

START_TESTCASE              send-sip-request-master-0004
//! @SYMTestCaseID          send-sip-request-master-0004
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        28/08/2009
//! @SYMAPI                 CSIPConnection::SendRequestL(CSIPRequestElements *aElements, CSIPRefresh &aRefresh)
//! @SYMTestCaseDesc        Creates SIP request and sends it to the given destination. The function must not be used with 
//!                         SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. 
//!                         This provokes the Non-invite state machine. This function must be used if the user has created the 
//!                         registration binding.
//! @SYMTestActions         1.Create object for CSIPToHeader, CSIPRouteHeader, CSIPAddress, CSIPContactHeader, CSIPRefresh, CSIP,
//!                           CSIPConnection, CSIPClientTransaction, CSIPMessageElements, CSIPRegistrationBinding and objects for SIP MESSAGE.
//!                         2.Instantiate objects preparing for registration.
//!                         3.Create SIP registration binding using SIPToHeader, SIPContactHeader, SIPRouteHeader, SIPRefresh and SIPConnection
//!                         4.Send registration request with object of CSIPRequestElements and CSIPRefresh.
//!                         5.Wait for the registration response from SIP stack
//!                         6.Construct message elements for SIP MESSAGE.
//!                         7.Send SIP MESSAGE.
//!                         12.Destruct objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The SIP Client can start and close successfully without causing any panic
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                     \SIP\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPToHeader                  toheader
        CREATE_OBJECT       CSIPAddress                   address
        CREATE_OBJECT       CSIPContactHeader             contactheader
        CREATE_OBJECT       CSIPRefresh                   refresh
        CREATE_OBJECT       CSIPRegistrationBinding       binding
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPRequestElements           requestelements
        CREATE_OBJECT       CSIPToHeader                  reqtoheader
        CREATE_OBJECT       CSIPFromHeader                reqfromheader
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPRefresh                   reqrefresh
        CREATE_OBJECT       CSIPExpiresHeader             expiresheader
        CREATE_OBJECT       CSIPHttpDigest				  httpdigest
        COMMAND             sip                           NewL                      send-sip-request-master-0004-NewL_command01                          
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0004-NewL_command02
        OUTSTANDING    
        COMMAND             toheader                      DecodeL                   send-sip-request-master-0004-DecodeL_command03
        COMMAND             address                       DecodeL                   send-sip-request-master-0004-DecodeL_command04 
        COMMAND             contactheader                 NewL                      send-sip-request-master-0004-NewL_command05
        COMMAND             refresh                       NewL    
        COMMAND             binding                       NewL                      send-sip-request-master-0004-NewL_command06
        COMMAND				httpdigest					  NewL                      send-sip-request-master-0004-NewL_Command07
        COMMAND             binding                       RegisterL                 send-sip-request-master-0004-RegisterL_command08
        COMMAND             httpdigest                    WaitForChallengeReceived  send-sip-request-master-0004-WaitForChallengeReceived_Command09
        OUTSTANDING
        COMMAND				httpdigest					  SetCredentialsL			send-sip-request-master-0004-SetCredentialsL_Command10
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0004-WaitForIncomingResponse_command11
        OUTSTANDING
        COMMAND             expiresheader                 NewL                      send-sip-request-master-0004-NewL_command12
        COMMAND             reqtoheader                   DecodeL                   send-sip-request-master-0004-DecodeL_command13
        COMMAND             reqfromheader                 DecodeL                   send-sip-request-master-0004-DecodeL_command14
        COMMAND             requestelements               NewL                      send-sip-request-master-0004-NewL_command15
        COMMAND             requestelements               SetMethodL                send-sip-request-master-0004-SetMethodL_command16
        COMMAND             requestelements               MessageElements           send-sip-request-master-0004-MessageElements_command17
        COMMAND             messageelements               SetUserHeadersL           send-sip-request-master-0004-SetUserHeadersL_command18
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0004-NewL_command19
        COMMAND             messageelements               SetContentL               send-sip-request-master-0004-SetContentL_command20 
        COMMAND             requestelements               SetFromHeaderL            send-sip-request-master-0004-SetFromHeaderL_command21
        COMMAND             requestelements               SetToHeaderL              send-sip-request-master-0004-SetToHeaderL_command22
        COMMAND             reqrefresh                    NewL
        COMMAND             sipconnection                 SendRequestL              send-sip-request-master-0004-SendRequestL_command23
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0004-WaitForIncomingResponse_command24
        OUTSTANDING
        COMMAND             toheader                      ~
        COMMAND             address                       ~
        COMMAND             contactheader                 ~
        COMMAND             refresh                       ~
        COMMAND             httpdigest                    ~
        COMMAND             binding                       ~
        COMMAND             contenttypeheader             ~
        COMMAND             requestelements               ~
        COMMAND             contenttypeheader             ~
        COMMAND             reqtoheader                   ~
        COMMAND             reqfromheader                 ~
        COMMAND             reqrefresh                    ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE      send-sip-request-master-0004

START_TESTCASE send-sip-request-master-0005 
//! @SYMTestCaseID          send-sip-request-master-0005
//! @SYMAPI                 Cancel SIP Request,CSIPClientTransaction::CancelAllowed(),CSIPClientTransaction::Refresh
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        04/09/2009
//! @SYMTestCaseDesc        Send INVITE request and CANCEL it.
//! @SYMTestActions         1. Create a CSIP object.
//!                         2. Create a CSIPProfileRegistry object with the CSIP object.
//!                         3. Create a CSIPManagedProfileRegistry object.
//!                         4. Instantiate a new profile with default values for given type. 
//!                         5. Set profile KSIPAccessPointId parameter. 
//!                         6. Set profile KSIPUserAor parameter. 
//!                         7. Set profile KSIPProviderName parameter. 
//!                         8. Set profile KSIPSigComp parameter. 
//!                         9. Set profile KSIPAutoRegistration parameter. 
//!                         10.Set profile KSIPDefaultProfile parameter. 
//!                         11.Set profile KSIPSecurityNegotiation parameter. 
//!                         12.Set profile KSIPRegistrar and KSIPServerAddress parameters.     
//!                         13.Save new profile to the persistent storage.
//!                         14.Get the default profile.
//!                         15.Enable the profile.
//!                         16.Open SDP Codec string pool.
//!                         17.Create a CSIPContentTypeHeader object.
//!                         18.Create a CSdpOriginField object.
//!                         19.Create a CSdpConnectionField object.
//!                         20.Create a CSdpMediaField object.
//!                         21.Create a CSdpDocument object.
//!                         22.Set the session origin field.
//!                         23.Set the session name field value.
//!                         24.Set the session level connection field.
//!                         25.Get the set of media description fields and append the CSdpMediaField object.
//!                         26.Get the SDP document formatted according to SDP syntax.
//!                         27.Create a CSIPMessageElements object.
//!                         28.Set the SIP message content and its type.
//!                         29.Create a CSIPInviteDialogAssoc object.
//!                         30.Create INVITE and send it to the remote target.
//!                         31.MSIPConnectionObserver::IncomingResponse() is called once.
//!							32.CSIPClientTransaction::Refresh is called
//!							33.CSIPClientTransaction::CancelAllowed() is called.
//!                         34.Create CANCEL and send it to the remote target.
//!                         35.MSIPConnectionObserver::IncomingResponse() is called 2 times.
//!                         36.Create SIP ACK request and send it to the remote target.
//!                         37.Wait for MSIPConnectionObserver::WaitForInviteCompleted() is called.
//!                         38.Disable the profile.
//!                         39.Remove the SIP profile from the persistent storage.
//!                         40.Destroy all objects and close SDP Codec string pool.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: INVITE is canceled without error.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPInviteDialogAssoc         invitedialogassoc
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        CREATE_OBJECT		CSIPRefresh					  refresh
        COMMAND             sip                           NewL                      send-sip-request-master-0005-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0005-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0005-NewL_command04
        OUTSTANDING
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0005-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0005-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0005-SaveL_command17
        OUTSTANDING
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0005-DefaultProfileL_command18
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0005-EnableL_command19 
        OUTSTANDING
        DELAY               3000000
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0005-NewL_command21
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0005-NewL_command22
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0005-NewL_command23
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0005-NewL_command24
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0005-SetOriginField_command26
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0005-SetSessionNameL_command27
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0005-SetConnectionField_command28
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0005-MediaFields_Append_command29
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements              NewL
        COMMAND             messageelements              SetContentL               send-sip-request-master-0005-SetContentL_command32
        COMMAND             invitedialogassoc             NewL                      send-sip-request-master-0005-NewL_command33
        COMMAND             invitedialogassoc             SendInviteL               send-sip-request-master-0005-SendInviteL_command34
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0005-WaitForIncomingResponse_command35
        OUTSTANDING 
        COMMAND             clienttransaction             Refresh					send-sip-request-master-0005-Refresh_command36
        COMMAND             clienttransaction             CancelAllowed				send-sip-request-master-0005-CancelAllowed_command37
		COMMAND             clienttransaction             CancelL					send-sip-request-master-0005-CancelL_command38       
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0005-WaitForIncomingResponse_command39
        OUTSTANDING
		COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0005-WaitForIncomingResponse_command40
        OUTSTANDING
        COMMAND             profileregistry               Disable                   send-sip-request-master-0005-Disable_command41
        OUTSTANDING
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0005-DestroyL_command42
        OUTSTANDING
        COMMAND				refresh					  ~
        COMMAND             clienttransaction             ~
        COMMAND             invitedialogassoc             ~
        COMMAND             sdpdocument                   ~
        COMMAND             sdpconnectionfield            ~
        COMMAND             sdpmediafield                 ~
        COMMAND             sdporiginfield                ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             profile                       ~
        COMMAND             managedprofile                ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0005

START_TESTCASE              send-sip-request-master-0006
//! @SYMTestCaseID          send-sip-request-master-0006
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        14/09/2009
//! @SYMAPI                 CSIPRefresh::operator==() & CSIPRefresh::TerminateL()
//! @SYMTestCaseDesc        Creates SIP request and sends it to the given destination. The function must not be used with 
//!                         SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. 
//!                         This provokes the Non-invite state machine. This function must be used if the user has created the 
//!                         registration binding.
//! @SYMTestActions         1.Create object for CSIPToHeader, CSIPRouteHeader, CSIPAddress, CSIPContactHeader, CSIPRefresh, CSIP,
//!                           CSIPConnection, CSIPClientTransaction, CSIPMessageElements, CSIPRegistrationBinding and objects for SIP MESSAGE.
//!                         2.Instantiate objects preparing for registration.
//!                         3.Create SIP registration binding using SIPToHeader, SIPContactHeader, SIPRouteHeader, SIPRefresh and SIPConnection
//!                         4.Send registration request with object of CSIPRequestElements and CSIPRefresh.
//!                         5.Wait for the registration response from SIP stack.
//!							6.Call CSIPRefresh::operator==().
//!							7.Call CSIPRefresh::IsStandAlone() & CSIPRefresh::State().
//!							8.Call CSIPRefresh::TerminateL().
//!                         6.Construct message elements for SIP MESSAGE.
//!                         7.Send SIP MESSAGE.
//!                         12.Destruct objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The SIP Client can start and close successfully without causing any panic
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                     \SIP\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPToHeader                  toheader
        CREATE_OBJECT       CSIPAddress                   address
        CREATE_OBJECT       CSIPContactHeader             contactheader
        CREATE_OBJECT       CSIPRefresh                   refresh
        CREATE_OBJECT       CSIPRegistrationBinding       binding
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPRequestElements           requestelements
        CREATE_OBJECT       CSIPToHeader                  reqtoheader
        CREATE_OBJECT       CSIPFromHeader                reqfromheader
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPRefresh                   reqrefresh
        CREATE_OBJECT       CSIPExpiresHeader             expiresheader
        CREATE_OBJECT       CSIPHttpDigest				  httpdigest
        COMMAND             sip                           NewL                      send-sip-request-master-0006-NewL_command01                          
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0006-NewL_command02
        OUTSTANDING    
        COMMAND             toheader                      DecodeL                   send-sip-request-master-0006-DecodeL_command03
        COMMAND             address                       DecodeL                   send-sip-request-master-0006-DecodeL_command04 
        COMMAND             contactheader                 NewL                      send-sip-request-master-0006-NewL_command05
        COMMAND             refresh                       NewL    
        COMMAND             binding                       NewL                      send-sip-request-master-0006-NewL_command06
        COMMAND				httpdigest					  NewL                      send-sip-request-master-0006-NewL_Command07
        COMMAND             binding                       RegisterL                 send-sip-request-master-0006-RegisterL_command08
        COMMAND             httpdigest                    WaitForChallengeReceived  send-sip-request-master-0006-WaitForChallengeReceived_Command09
        OUTSTANDING
        COMMAND				httpdigest					  SetCredentialsL			send-sip-request-master-0006-SetCredentialsL_Command10
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0006-WaitForIncomingResponse_command11
        OUTSTANDING
        COMMAND             expiresheader                 NewL                      send-sip-request-master-0006-NewL_command12
        COMMAND             reqtoheader                   DecodeL                   send-sip-request-master-0006-DecodeL_command13
        COMMAND             reqfromheader                 DecodeL                   send-sip-request-master-0006-DecodeL_command14
        COMMAND             requestelements               NewL                      send-sip-request-master-0006-NewL_command15
        COMMAND             requestelements               SetMethodL                send-sip-request-master-0006-SetMethodL_command16
        COMMAND             requestelements               MessageElements           send-sip-request-master-0006-MessageElements_command17
        COMMAND             messageelements               SetUserHeadersL           send-sip-request-master-0006-SetUserHeadersL_command18
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0006-NewL_command19
        COMMAND             messageelements               SetContentL               send-sip-request-master-0006-SetContentL_command20 
        COMMAND             requestelements               SetFromHeaderL            send-sip-request-master-0006-SetFromHeaderL_command21
        COMMAND             requestelements               SetToHeaderL              send-sip-request-master-0006-SetToHeaderL_command22
        COMMAND             reqrefresh                    NewL
        COMMAND             sipconnection                 SendRequestL              send-sip-request-master-0006-SendRequestL_command23
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0006-WaitForIncomingResponse_command24
        OUTSTANDING
		COMMAND		    	reqrefresh			  		  ==			    		send-sip-request-master-0006-OperatorEqualL_command25
		COMMAND             reqrefresh			  		  IsStandAlone
		COMMAND             reqrefresh					  State
		COMMAND             reqrefresh			  		  TerminateL		    	send-sip-request-master-0006-TerminateL_command28	
		COMMAND             reqrefresh			  		  UpdateL		    	send-sip-request-master-0006-TerminateL_command28	
		COMMAND             toheader                      ~
        COMMAND             address                       ~
        COMMAND             contactheader                 ~
        COMMAND             refresh                       ~
        COMMAND             httpdigest                    ~
        COMMAND             binding                       ~
        COMMAND             contenttypeheader             ~
        COMMAND             requestelements               ~
        COMMAND             contenttypeheader             ~
        COMMAND             reqtoheader                   ~
        COMMAND             reqfromheader                 ~
        COMMAND             reqrefresh                    ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE      send-sip-request-master-0006

START_TESTCASE              send-sip-request-master-0007
//! @SYMTestCaseID          send-sip-request-master-0007
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        14/09/2009
//! @SYMAPI                 CSIPRefresh::operator==() & CSIPRefresh::TerminateL()
//! @SYMTestCaseDesc        Creates SIP request and sends it to the given destination. The function must not be used with 
//!                         SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. 
//!                         This provokes the Non-invite state machine. This function must be used if the user has created the 
//!                         registration binding.
//! @SYMTestActions         1.Create object for CSIPToHeader, CSIPRouteHeader, CSIPAddress, CSIPContactHeader, CSIPRefresh, CSIP,
//!                           CSIPConnection, CSIPClientTransaction, CSIPMessageElements, CSIPRegistrationBinding and objects for SIP MESSAGE.
//!                         2.Instantiate objects preparing for registration.
//!                         3.Create SIP registration binding using SIPToHeader, SIPContactHeader, SIPRouteHeader, SIPRefresh and SIPConnection
//!                         4.Send registration request with object of CSIPRequestElements and CSIPRefresh.
//!                         5.Wait for the registration response from SIP stack.
//!							6.Call CSIPRefresh::operator==().
//!							7.Call CSIPRefresh::IsStandAlone() & CSIPRefresh::State().
//!							8.Call CSIPRefresh::TerminateL().
//!                         6.Construct message elements for SIP MESSAGE.
//!                         7.Send SIP MESSAGE.
//!                         12.Destruct objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The SIP Client can start and close successfully without causing any panic
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                     \SIP\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPToHeader                  toheader
        CREATE_OBJECT       CSIPAddress                   address
        CREATE_OBJECT       CSIPContactHeader             contactheader
        CREATE_OBJECT       CSIPRefresh                   refresh
        CREATE_OBJECT       CSIPRegistrationBinding       binding
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPRequestElements           requestelements
        CREATE_OBJECT       CSIPToHeader                  reqtoheader
        CREATE_OBJECT       CSIPFromHeader                reqfromheader
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPRefresh                   reqrefresh
        CREATE_OBJECT       CSIPExpiresHeader             expiresheader
        CREATE_OBJECT       CSIPHttpDigest				  httpdigest
        COMMAND             sip                           NewL                      send-sip-request-master-0006-NewL_command01                          
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0006-NewL_command02
        OUTSTANDING    
        COMMAND             toheader                      DecodeL                   send-sip-request-master-0006-DecodeL_command03
        COMMAND             address                       DecodeL                   send-sip-request-master-0006-DecodeL_command04 
        COMMAND             contactheader                 NewL                      send-sip-request-master-0006-NewL_command05
        COMMAND             refresh                       NewL    
        COMMAND             binding                       NewL                      send-sip-request-master-0006-NewL_command06
        COMMAND				httpdigest					  NewL                      send-sip-request-master-0006-NewL_Command07
        COMMAND             binding                       RegisterL                 send-sip-request-master-0006-RegisterL_command08
        COMMAND             httpdigest                    WaitForChallengeReceived  send-sip-request-master-0006-WaitForChallengeReceived_Command09
        OUTSTANDING
        COMMAND				httpdigest					  SetCredentialsL			send-sip-request-master-0006-SetCredentialsL_Command10
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0006-WaitForIncomingResponse_command11
        OUTSTANDING
        COMMAND             expiresheader                 NewL                      send-sip-request-master-0006-NewL_command12
        COMMAND             reqtoheader                   DecodeL                   send-sip-request-master-0006-DecodeL_command13
        COMMAND             reqfromheader                 DecodeL                   send-sip-request-master-0006-DecodeL_command14
        COMMAND             requestelements               NewL                      send-sip-request-master-0006-NewL_command15
        COMMAND             requestelements               SetMethodL                send-sip-request-master-0006-SetMethodL_command16
        COMMAND             requestelements               MessageElements           send-sip-request-master-0006-MessageElements_command17
        COMMAND             messageelements               SetUserHeadersL           send-sip-request-master-0006-SetUserHeadersL_command18
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0006-NewL_command19
        COMMAND             messageelements               SetContentL               send-sip-request-master-0006-SetContentL_command20 
        COMMAND             requestelements               SetFromHeaderL            send-sip-request-master-0006-SetFromHeaderL_command21
        COMMAND             requestelements               SetToHeaderL              send-sip-request-master-0006-SetToHeaderL_command22
        COMMAND             reqrefresh                    NewL
        COMMAND             sipconnection                 SendRequestL              send-sip-request-master-0006-SendRequestL_command23
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0006-WaitForIncomingResponse_command24
        OUTSTANDING
				COMMAND		 !Error=-6   	reqrefresh			  		  SetIntervalL			    		send-sip-request-master-0007-SetIntervalL_command25

				COMMAND             toheader                      ~
        COMMAND             address                       ~
        COMMAND             contactheader                 ~
        COMMAND             refresh                       ~
        COMMAND             httpdigest                    ~
        COMMAND             binding                       ~
        COMMAND             contenttypeheader             ~
        COMMAND             requestelements               ~
        COMMAND             contenttypeheader             ~
        COMMAND             reqtoheader                   ~
        COMMAND             reqfromheader                 ~
        COMMAND             reqrefresh                    ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE      send-sip-request-master-0007

DELAY 5000

START_TESTCASE send-sip-request-master-0101 
//! @SYMTestCaseID          send-sip-request-master-0101
//! @SYMAPI                 Send SIP Request
//! @SYMAuthor              Forbes Fu
//! @SYMCreationDate        17/08/2009
//! @SYMTestCaseDesc        Creating a dialog and send the INVITE request.
//! @SYMTestActions         1. Create a CSIP object.
//!                         2. Create a CSIPProfileRegistry object with the CSIP object.
//!                         3. Create a CSIPManagedProfileRegistry object.
//!                         4. Instantiate a new profile with default values for given type. 
//!                         5. Set profile KSIPAccessPointId parameter. 
//!                         6. Set profile KSIPUserAor parameter. 
//!                         7. Set profile KSIPProviderName parameter. 
//!                         8. Set profile KSIPSigComp parameter. 
//!                         9. Set profile KSIPAutoRegistration parameter. 
//!                         10.Set profile KSIPDefaultProfile parameter. 
//!                         11.Set profile KSIPSecurityNegotiation parameter. 
//!                         12.Set profile KSIPRegistrar and KSIPServerAddress parameters.     
//!                         13.Save new profile to the persistent storage.
//!                         14.Get the default profile.
//!                         15.Enable the profile.
//!                         16.Open SDP Codec string pool.
//!                         17.Create a CSIPContentTypeHeader object.
//!                         18.Create a CSdpOriginField object.
//!                         19.Create a CSdpConnectionField object.
//!                         20.Create a CSdpMediaField object.
//!                         21.Create a CSdpDocument object.
//!                         22.Set the session origin field.
//!                         23.Set the session name field value.
//!                         24.Set the session level connection field.
//!                         25.Get the set of media description fields and append the CSdpMediaField object.
//!                         26.Get the SDP document formatted according to SDP syntax.
//!                         27.Create a CSIPMessageElements object.
//!                         28.Set the SIP message content and its type.
//!                         29.Create a CSIPInviteDialogAssoc object.
//!                         30.Create INVITE and send it to the remote target.
//!                         31.MSIPConnectionObserver::IncomingResponse() is called 3 times.
//!                         32.Create SIP ACK request and send it to the remote target.
//!                         33.Wait for MSIPConnectionObserver::WaitForInviteCompleted() is called.
//!                         34.Disable the profile.
//!                         35.Remove the SIP profile from the persistent storage.
//!                         36.Destroy all objects and close SDP Codec string pool.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: INVITE is sent without error.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction1
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPInviteDialogAssoc         invitedialogassoc
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        CREATE_OBJECT       CSIPDialog                    sipdialog
        CREATE_OBJECT       CSIPCallIDHeader              callidheader
        COMMAND             sip                           NewL                      send-sip-request-master-0101-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0101-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0101-NewL_command04
        OUTSTANDING
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0101-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0101-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0101-SaveL_command14
        OUTSTANDING
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0101-DefaultProfileL_command15
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0101-EnableL_command16 
        OUTSTANDING
        DELAY               3000000
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0101-NewL_command17
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0101-NewL_command18
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0101-NewL_command19
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0101-NewL_command20
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0101-SetOriginField_command21
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0101-SetSessionNameL_command22
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0101-SetConnectionField_command23
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0101-MediaFields_Append_command24
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements               NewL
        COMMAND             messageelements               SetContentL               send-sip-request-master-0101-SetContentL_command25
        COMMAND             invitedialogassoc             NewL                      send-sip-request-master-0101-NewL_command26
        COMMAND             invitedialogassoc             SendInviteL               send-sip-request-master-0101-SendInviteL_command27
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0101-WaitForIncomingResponse_command28
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0101-WaitForIncomingResponse_command29
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0101-WaitForIncomingResponse_command30
        OUTSTANDING
        COMMAND             invitedialogassoc             Dialog                    send-sip-request-master-0101-Dialog_command31
        COMMAND             sipdialog                     CallIdL                   send-sip-request-master-0101-CallIdL_command32
        COMMAND             invitedialogassoc             SendAckL                  send-sip-request-master-0101-SendAckL_command33
        COMMAND             sipconnection                 WaitForInviteCompleted    send-sip-request-master-0101-WaitForInviteCompleted_command34
        OUTSTANDING
        COMMAND             profileregistry               Disable                   send-sip-request-master-0101-Disable_command35
        OUTSTANDING
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0101-DestroyL_command36
        OUTSTANDING
        COMMAND             clienttransaction1            ~
        COMMAND             invitedialogassoc             ~
        COMMAND             sdpdocument                   ~
        COMMAND             sdpconnectionfield            ~
        COMMAND             sdpmediafield                 ~
        COMMAND             sdporiginfield                ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             profile                       ~
        COMMAND             managedprofile                ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0101


START_TESTCASE send-sip-request-master-0102 
//! @SYMTestCaseID          send-sip-request-master-0102
//! @SYMAPI                 Send SIP Request
//! @SYMAuthor              Wekey Weng
//! @SYMCreationDate        17/08/2009
//! @SYMTestCaseDesc        Creating a dialog and send the INVITE request.
//! @SYMTestActions         1. Create a CSIP object.
//!                         2. Create a CSIPProfileRegistry object with the CSIP object.
//!                         3. Create a CSIPManagedProfileRegistry object.
//!                         4. Instantiate a new profile with default values for given type. 
//!                         5. Set profile KSIPAccessPointId parameter. 
//!                         6. Set profile KSIPUserAor parameter. 
//!                         7. Set profile KSIPProviderName parameter. 
//!                         8. Set profile KSIPSigComp parameter. 
//!                         9. Set profile KSIPAutoRegistration parameter. 
//!                         10.Set profile KSIPDefaultProfile parameter. 
//!                         11.Set profile KSIPSecurityNegotiation parameter. 
//!                         12.Set profile KSIPRegistrar and KSIPServerAddress parameters.     
//!                         13.Save new profile to the persistent storage.
//!                         14.Get the default profile.
//!                         15.Enable the profile.
//!                         16.Open SDP Codec string pool.
//!                         17.Create a CSIPContentTypeHeader object.
//!                         18.Create a CSdpOriginField object.
//!                         19.Create a CSdpConnectionField object.
//!                         20.Create a CSdpMediaField object.
//!                         21.Create a CSdpDocument object.
//!                         22.Set the session origin field.
//!                         23.Set the session name field value.
//!                         24.Set the session level connection field.
//!                         25.Get the set of media description fields and append the CSdpMediaField object.
//!                         26.Get the SDP document formatted according to SDP syntax.
//!                         27.Create a CSIPMessageElements object.
//!                         28.Set the SIP message content and its type.
//!                         29.Create a CSIPInviteDialogAssoc object.
//!                         30.Create INVITE and send it to the remote target.
//!                         31.MSIPConnectionObserver::IncomingResponse() is called 3 times.
//!                         32.Create SIP PRACK request and send it to the remote target.
//!                         33.Wait for a incoming response(PRACK)
//!                         34.Wait for MSIPConnectionObserver::WaitForInviteCompleted() is called.
//!                         35.Disable the profile.
//!                         36.Remove the SIP profile from the persistent storage.
//!                         37.Destroy all objects and close SDP Codec string pool.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: INVITE and PRACK are sent without error.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction1
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPInviteDialogAssoc         invitedialogassoc
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        COMMAND             sip                           NewL                      send-sip-request-master-0102-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0102-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0102-NewL_command04
        OUTSTANDING
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0102-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0102-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0102-SaveL_command14
        OUTSTANDING
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0102-DefaultProfileL_command15
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0102-EnableL_command16 
        OUTSTANDING
        DELAY               3000000
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0102-NewL_command17
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0102-NewL_command18
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0102-NewL_command19
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0102-NewL_command20
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0102-SetOriginField_command21
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0102-SetSessionNameL_command22
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0102-SetConnectionField_command23
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0102-MediaFields_Append_command24
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements               NewL
        COMMAND             messageelements               SetContentL               send-sip-request-master-0102-SetContentL_command25
        COMMAND             invitedialogassoc             NewLC                     send-sip-request-master-0102-NewLC_command26
        COMMAND             invitedialogassoc             SendInviteL               send-sip-request-master-0102-SendInviteL_command27
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0102-WaitForIncomingResponse_command28
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0102-WaitForIncomingResponse_command29
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0102-WaitForIncomingResponse_command30
        OUTSTANDING
        COMMAND             invitedialogassoc             SendPrackL                send-sip-request-master-0102-SendPrackL_command31
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0102-WaitForIncomingResponse_command32
        OUTSTANDING
        COMMAND             sipconnection                 WaitForInviteCompleted    send-sip-request-master-0102-WaitForInviteCompleted_command33
        OUTSTANDING
        COMMAND             profileregistry               Disable                   send-sip-request-master-0102-Disable_command34
        OUTSTANDING
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0102-DestroyL_command35
        OUTSTANDING
        COMMAND             clienttransaction1            ~
        COMMAND             invitedialogassoc             ~
        COMMAND             messageelements              ~
        COMMAND             sdpdocument                   ~
        COMMAND             sdpconnectionfield            ~
        COMMAND             sdpmediafield                 ~
        COMMAND             sdporiginfield                ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             profile                       ~
        COMMAND             managedprofile                ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0102


START_TESTCASE send-sip-request-master-0103 
//! @SYMTestCaseID          send-sip-request-master-0103
//! @SYMAPI                 Send SIP Request
//! @SYMAuthor              Wekey Weng
//! @SYMCreationDate        17/08/2009
//! @SYMTestCaseDesc        Creating a dialog and send the INVITE request.
//! @SYMTestActions         1. Create a CSIP object.
//!                         2. Create a CSIPProfileRegistry object with the CSIP object.
//!                         3. Create a CSIPManagedProfileRegistry object.
//!                         4. Instantiate a new profile with default values for given type. 
//!                         5. Set profile KSIPAccessPointId parameter. 
//!                         6. Set profile KSIPUserAor parameter. 
//!                         7. Set profile KSIPProviderName parameter. 
//!                         8. Set profile KSIPSigComp parameter. 
//!                         9. Set profile KSIPAutoRegistration parameter. 
//!                         10.Set profile KSIPDefaultProfile parameter. 
//!                         11.Set profile KSIPSecurityNegotiation parameter. 
//!                         12.Set profile KSIPRegistrar and KSIPServerAddress parameters.     
//!                         13.Save new profile to the persistent storage.
//!                         14.Get the default profile.
//!                         15.Enable the profile.
//!                         16.Open SDP Codec string pool.
//!                         17.Create a CSIPContentTypeHeader object.
//!                         18.Create a CSdpOriginField object.
//!                         19.Create a CSdpConnectionField object.
//!                         20.Create a CSdpMediaField object.
//!                         21.Create a CSdpDocument object.
//!                         22.Set the session origin field.
//!                         23.Set the session name field value.
//!                         24.Set the session level connection field.
//!                         25.Get the set of media description fields and append the CSdpMediaField object.
//!                         26.Get the SDP document formatted according to SDP syntax.
//!                         27.Create a CSIPMessageElements object.
//!                         28.Set the SIP message content and its type.
//!                         29.Create a CSIPInviteDialogAssoc object.
//!                         30.Create INVITE and send it to the remote target.
//!                         31.MSIPConnectionObserver::IncomingResponse() is called 3 times.
//!                         32.Create SIP PRACK request and send it to the remote target.
//!                         33.Wait for a incoming response(UPDATE)
//!                         34.Wait for MSIPConnectionObserver::WaitForInviteCompleted() is called.
//!                         35.Disable the profile.
//!                         36.Remove the SIP profile from the persistent storage.
//!                         37.Destroy all objects and close SDP Codec string pool.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: INVITE and UPDATE are sent without error.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction1
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPInviteDialogAssoc         invitedialogassoc
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       CSIPFromHeader                fromheader
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        COMMAND             sip                           NewL                      send-sip-request-master-0103-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0103-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0103-NewL_command04
        OUTSTANDING
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0103-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0103-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0103-SaveL_command14
        OUTSTANDING
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0103-DefaultProfileL_command15
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0103-EnableL_command16 
        OUTSTANDING
        DELAY               3000000
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0103-NewL_command17
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0103-NewL_command18
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0103-NewL_command19
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0103-NewL_command20
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0103-SetOriginField_command21
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0103-SetSessionNameL_command22
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0103-SetConnectionField_command23
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0103-MediaFields_Append_command24
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements               NewL
        COMMAND             messageelements               SetContentL               send-sip-request-master-0103-SetContentL_command25
        COMMAND             fromheader                    DecodeL                   send-sip-request-master-0103-DecodeL_command26
        COMMAND             invitedialogassoc             NewL                      send-sip-request-master-0103-NewL_command27
        COMMAND             invitedialogassoc             SendInviteL               send-sip-request-master-0103-SendInviteL_command28
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0103-WaitForIncomingResponse_command29
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0103-WaitForIncomingResponse_command30
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0103-WaitForIncomingResponse_command31
        OUTSTANDING
        COMMAND             invitedialogassoc             SendUpdateL                send-sip-request-master-0103-SendUpdateL_command32
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0103-WaitForIncomingResponse_command33
        OUTSTANDING
        COMMAND             sipconnection                 WaitForInviteCompleted    send-sip-request-master-0103-WaitForInviteCompleted_command34
        OUTSTANDING
        COMMAND             profileregistry               Disable                   send-sip-request-master-0103-Disable_command35
        OUTSTANDING
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0103-DestroyL_command36
        OUTSTANDING
        COMMAND             fromheader                    ~
        COMMAND             clienttransaction1            ~
        COMMAND             invitedialogassoc             ~
        COMMAND             messageelements              ~
        COMMAND             sdpdocument                   ~
        COMMAND             sdpconnectionfield            ~
        COMMAND             sdpmediafield                 ~
        COMMAND             sdporiginfield                ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             profile                       ~
        COMMAND             managedprofile                ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0103


START_TESTCASE send-sip-request-master-0104 
//! @SYMTestCaseID          send-sip-request-master-0104
//! @SYMAPI                 Send SIP Request
//! @SYMAuthor              Wekey Weng
//! @SYMCreationDate        17/08/2009
//! @SYMTestCaseDesc        Creating a dialog and send the INVITE request.
//! @SYMTestActions         1. Create a CSIP object.
//!                         2. Create a CSIPProfileRegistry object with the CSIP object.
//!                         3. Create a CSIPManagedProfileRegistry object.
//!                         4. Instantiate a new profile with default values for given type. 
//!                         5. Set profile KSIPAccessPointId parameter. 
//!                         6. Set profile KSIPUserAor parameter. 
//!                         7. Set profile KSIPProviderName parameter. 
//!                         8. Set profile KSIPSigComp parameter. 
//!                         9. Set profile KSIPAutoRegistration parameter. 
//!                         10.Set profile KSIPDefaultProfile parameter. 
//!                         11.Set profile KSIPSecurityNegotiation parameter. 
//!                         12.Set profile KSIPRegistrar and KSIPServerAddress parameters.     
//!                         13.Save new profile to the persistent storage.
//!                         14.Get the default profile.
//!                         15.Enable the profile.
//!                         16.Open SDP Codec string pool.
//!                         17.Create a CSIPContentTypeHeader object.
//!                         18.Create a CSdpOriginField object.
//!                         19.Create a CSdpConnectionField object.
//!                         20.Create a CSdpMediaField object.
//!                         21.Create a CSdpDocument object.
//!                         22.Set the session origin field.
//!                         23.Set the session name field value.
//!                         24.Set the session level connection field.
//!                         25.Get the set of media description fields and append the CSdpMediaField object.
//!                         26.Get the SDP document formatted according to SDP syntax.
//!                         27.Create a CSIPMessageElements object.
//!                         28.Set the SIP message content and its type.
//!                         29.Create a CSIPInviteDialogAssoc object.
//!                         30.Create INVITE and send it to the remote target.
//!                         31.MSIPConnectionObserver::IncomingResponse() is called 3 times.
//!                         32.Create SIP BYE request and send it to the remote target.
//!                         33.Wait for a incoming response(BYE)
//!                         34.Wait for MSIPConnectionObserver::WaitForInviteCompleted() is called.
//!                         35.Disable the profile.
//!                         36.Remove the SIP profile from the persistent storage.
//!                         37.Destroy all objects and close SDP Codec string pool.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: INVITE and BYE are sent without error.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction1
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPInviteDialogAssoc         invitedialogassoc
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       CSIPFromHeader                fromheader
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        COMMAND             sip                           NewL                      send-sip-request-master-0104-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0104-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0104-NewL_command04
        OUTSTANDING
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0104-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0104-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0104-SaveL_command14
        OUTSTANDING
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0104-DefaultProfileL_command15
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0104-EnableL_command16 
        OUTSTANDING
        DELAY               3000000
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0104-NewL_command17
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0104-NewL_command18
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0104-NewL_command19
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0104-NewL_command20
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0104-SetOriginField_command21
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0104-SetSessionNameL_command22
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0104-SetConnectionField_command23
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0104-MediaFields_Append_command24
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements               NewL
        COMMAND             messageelements               SetContentL               send-sip-request-master-0104-SetContentL_command25
        COMMAND             fromheader                    DecodeL                   send-sip-request-master-0104-DecodeL_command26
        COMMAND             invitedialogassoc             NewLC                     send-sip-request-master-0104-NewLC_command27
        COMMAND             invitedialogassoc             SendInviteL               send-sip-request-master-0104-SendInviteL_command28
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0104-WaitForIncomingResponse_command29
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0104-WaitForIncomingResponse_command30
        OUTSTANDING
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0104-WaitForIncomingResponse_command31
        OUTSTANDING
        COMMAND             invitedialogassoc             SendByeL                  send-sip-request-master-0104-SendByeL_command32
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0104-WaitForIncomingResponse_command33
        OUTSTANDING
        COMMAND             sipconnection                 WaitForInviteCompleted    send-sip-request-master-0104-WaitForInviteCompleted_command34
        OUTSTANDING
        COMMAND             profileregistry               Disable                   send-sip-request-master-0104-Disable_command35
        OUTSTANDING
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0104-DestroyL_command36
        OUTSTANDING
        COMMAND             fromheader                    ~
        COMMAND             clienttransaction1            ~
        COMMAND             invitedialogassoc             ~
        COMMAND             messageelements              ~
        COMMAND             sdpdocument                   ~
        COMMAND             sdpconnectionfield            ~
        COMMAND             sdpmediafield                 ~
        COMMAND             sdporiginfield                ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             profile                       ~
        COMMAND             managedprofile                ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0104


START_TESTCASE send-sip-request-master-0105 
//! @SYMTestCaseID          send-sip-request-master-0105
//! @SYMAPI                 Send SIP Request
//! @SYMAuthor              Wekey Weng
//! @SYMCreationDate        17/08/2009
//! @SYMTestCaseDesc        Creating a dialog and send the INVITE request.
//! @SYMTestActions         1. Create a CSIP object.
//!                         2. Create a CSIPProfileRegistry object with the CSIP object.
//!                         3. Create a CSIPManagedProfileRegistry object.
//!                         4. Instantiate a new profile with default values for given type. 
//!                         5. Set profile KSIPAccessPointId parameter. 
//!                         6. Set profile KSIPUserAor parameter. 
//!                         7. Set profile KSIPProviderName parameter. 
//!                         8. Set profile KSIPSigComp parameter. 
//!                         9. Set profile KSIPAutoRegistration parameter. 
//!                         10.Set profile KSIPDefaultProfile parameter. 
//!                         11.Set profile KSIPSecurityNegotiation parameter. 
//!                         12.Set profile KSIPRegistrar and KSIPServerAddress parameters.     
//!                         13.Save new profile to the persistent storage.
//!                         14.Get the default profile.
//!                         15.Enable the profile.
//!                         16.Open SDP Codec string pool.
//!                         17.Create a CSIPContentTypeHeader object.
//!                         18.Create a CSdpOriginField object.
//!                         19.Create a CSdpConnectionField object.
//!                         20.Create a CSdpMediaField object.
//!                         21.Create a CSdpDocument object.
//!                         22.Set the session origin field.
//!                         23.Set the session name field value.
//!                         24.Set the session level connection field.
//!                         25.Get the set of media description fields and append the CSdpMediaField object.
//!                         26.Get the SDP document formatted according to SDP syntax.
//!                         27.Create a CSIPMessageElements object.
//!                         28.Set the SIP message content and its type.
//!                         29.Create a CSIPInviteDialogAssoc object.
//!                         30.Create INVITE and send it to the remote target.
//!                         31.Wait for a incoming response
//!                         32.Disable the profile.
//!                         33.Remove the SIP profile from the persistent storage.
//!                         34.Destroy all objects and close SDP Codec string pool.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: INVITE are sent without error.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction1
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPInviteDialogAssoc         invitedialogassoc
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       CSIPFromHeader                fromheader
        CREATE_OBJECT       CSIPReferDialogAssoc          referdialogassoc
        CREATE_OBJECT       CSIPReferToHeader             refertoheader
        CREATE_OBJECT       CSIPDialog                    sipdialog
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        COMMAND             sip                           NewL                      send-sip-request-master-0105-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0105-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0105-NewL_command04
        OUTSTANDING
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0105-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0105-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0105-SaveL_command14
        OUTSTANDING
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0105-DefaultProfileL_command15
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0105-EnableL_command16 
        OUTSTANDING
        DELAY               3000000
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0105-NewL_command17
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0105-NewL_command18
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0105-NewL_command19
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0105-NewL_command20
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0105-SetOriginField_command21
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0105-SetSessionNameL_command22
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0105-SetConnectionField_command23
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0105-MediaFields_Append_command24
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements               NewL
        COMMAND             messageelements               SetContentL               send-sip-request-master-0105-SetContentL_command25
        COMMAND             fromheader                    DecodeL                   send-sip-request-master-0105-DecodeL_command26
        COMMAND             refertoheader                 DecodeL                   send-sip-request-master-0105-DecodeL_command27
        COMMAND             referdialogassoc              NewL                      send-sip-request-master-0105-NewL_command28
        COMMAND             referdialogassoc              Dialog                    send-sip-request-master-0105-Dialog_command29
        COMMAND             invitedialogassoc             NewL                      send-sip-request-master-0105-NewL_command30
        COMMAND             invitedialogassoc             SendInviteL               send-sip-request-master-0105-SendInviteL_command31
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0105-WaitForIncomingResponse_command32
        OUTSTANDING
        COMMAND             profileregistry               Disable                   send-sip-request-master-0105-Disable_command33
        OUTSTANDING
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0105-DestroyL_command34
        OUTSTANDING
        COMMAND             fromheader                    ~
        COMMAND             clienttransaction1            ~
        COMMAND             invitedialogassoc             ~
        COMMAND             referdialogassoc              ~
        COMMAND             refertoheader                 ~
        COMMAND             messageelements              ~
        COMMAND             sdpdocument                   ~
        COMMAND             sdpconnectionfield            ~
        COMMAND             sdpmediafield                 ~
        COMMAND             sdporiginfield                ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             profile                       ~
        COMMAND             managedprofile                ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0105


START_TESTCASE send-sip-request-master-0106 
//! @SYMTestCaseID          send-sip-request-master-0106
//! @SYMAPI                 Send SIP Request
//! @SYMAuthor              Wekey Weng
//! @SYMCreationDate        17/08/2009
//! @SYMTestCaseDesc        Creating a dialog and send the INVITE request.
//! @SYMTestActions         1. Create a CSIP object.
//!                         2. Create a CSIPProfileRegistry object with the CSIP object.
//!                         3. Create a CSIPManagedProfileRegistry object.
//!                         4. Instantiate a new profile with default values for given type. 
//!                         5. Set profile KSIPAccessPointId parameter. 
//!                         6. Set profile KSIPUserAor parameter. 
//!                         7. Set profile KSIPProviderName parameter. 
//!                         8. Set profile KSIPSigComp parameter. 
//!                         9. Set profile KSIPAutoRegistration parameter. 
//!                         10.Set profile KSIPDefaultProfile parameter. 
//!                         11.Set profile KSIPSecurityNegotiation parameter. 
//!                         12.Set profile KSIPRegistrar and KSIPServerAddress parameters.     
//!                         13.Save new profile to the persistent storage.
//!                         14.Get the default profile.
//!                         15.Enable the profile.
//!                         16.Open SDP Codec string pool.
//!                         17.Create a CSIPContentTypeHeader object.
//!                         18.Create a CSdpOriginField object.
//!                         19.Create a CSdpConnectionField object.
//!                         20.Create a CSdpMediaField object.
//!                         21.Create a CSdpDocument object.
//!                         22.Set the session origin field.
//!                         23.Set the session name field value.
//!                         24.Set the session level connection field.
//!                         25.Get the set of media description fields and append the CSdpMediaField object.
//!                         26.Get the SDP document formatted according to SDP syntax.
//!                         27.Create a CSIPMessageElements object.
//!                         28.Set the SIP message content and its type.
//!                         29.Create a CSIPInviteDialogAssoc object.
//!                         30.Create INVITE and send it to the remote target.
//!                         31.Wait for a incoming response
//!                         32.Disable the profile.
//!                         33.Remove the SIP profile from the persistent storage.
//!                         34.Destroy all objects and close SDP Codec string pool.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: INVITE are sent without error.  
//! @SYMTestType            CIT

    START_TEST_BLOCK        300   t_sipclientapi          \sip\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPManagedProfileRegistry    managedprofileregistry
        CREATE_OBJECT       CSIPManagedProfile            managedprofile 
        CREATE_OBJECT       CSIPProfileRegistry           profileregistry
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPProfile                   profile
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction1
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPInviteDialogAssoc         invitedialogassoc
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       CSIPFromHeader                fromheader
        CREATE_OBJECT       CSIPReferDialogAssoc          referdialogassoc
        CREATE_OBJECT       CSIPReferToHeader             refertoheader
        CREATE_OBJECT       CSIPDialog                    sipdialog
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        COMMAND             sip                           NewL                      send-sip-request-master-0106-NewL_command01
        COMMAND             profileregistry               NewL                      send-sip-request-master-0106-NewL_command02     
        COMMAND             managedprofileregistry        NewL                      
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0106-NewL_command04
        OUTSTANDING
        COMMAND             managedprofileregistry        CreateL                   send-sip-request-master-0106-CreateL_command05
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command06
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command07
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command08
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command09
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command10
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command11
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command12
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command13
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command14
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command15
        COMMAND             managedprofile                SetParameter              send-sip-request-master-0106-SetParameter_command16
        COMMAND             managedprofileregistry        SaveL                     send-sip-request-master-0106-SaveL_command14
        OUTSTANDING
        COMMAND             profileregistry               DefaultProfileL           send-sip-request-master-0106-DefaultProfileL_command15
        COMMAND             profileregistry               EnableL                   send-sip-request-master-0106-EnableL_command16 
        OUTSTANDING
        DELAY               3000000
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0106-NewL_command17
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0106-NewL_command18
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0106-NewL_command19
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0106-NewL_command20
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0106-SetOriginField_command21
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0106-SetSessionNameL_command22
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0106-SetConnectionField_command23
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0106-MediaFields_Append_command24
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements               NewL
        COMMAND             messageelements               SetContentL               send-sip-request-master-0106-SetContentL_command25
        COMMAND             fromheader                    DecodeL                   send-sip-request-master-0106-DecodeL_command26
        COMMAND             refertoheader                 DecodeL                   send-sip-request-master-0106-DecodeL_command27
        COMMAND             referdialogassoc              NewL                      send-sip-request-master-0106-NewL_command28
        COMMAND             referdialogassoc              Dialog                    send-sip-request-master-0106-Dialog_command29
        COMMAND             invitedialogassoc             NewLC                     send-sip-request-master-0106-NewLC_command30
        COMMAND             invitedialogassoc             SendInviteL               send-sip-request-master-0106-SendInviteL_command31
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0106-WaitForIncomingResponse_command32
        OUTSTANDING
        COMMAND             profileregistry               Disable                   send-sip-request-master-0106-Disable_command33
        OUTSTANDING
        COMMAND             managedprofileregistry        DestroyL                  send-sip-request-master-0106-DestroyL_command34
        OUTSTANDING
        COMMAND             fromheader                    ~
        COMMAND             clienttransaction1            ~
        COMMAND             invitedialogassoc             ~
        COMMAND             referdialogassoc              ~
        COMMAND             refertoheader                 ~
        COMMAND             messageelements              ~
        COMMAND             sdpdocument                   ~
        COMMAND             sdpconnectionfield            ~
        COMMAND             sdpmediafield                 ~
        COMMAND             sdporiginfield                ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             profile                       ~
        COMMAND             managedprofile                ~
        COMMAND             profileregistry               ~
        COMMAND             managedprofileregistry        ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0106

DELAY 5000

START_TESTCASE              send-sip-request-master-0107
//! @SYMTestCaseID          send-sip-request-master-0107
//! @SYMAuthor              Felix Rao
//! @SYMCreationDate        01/09/2009
//! @SYMAPI                 CSIPReferDialogAssoc::SendReferL(CSIPMessageElements{prt})
//! @SYMTestCaseDesc        Send REFER to remote target
//! @SYMTestActions         1. Create wrapper objects of CSIPConnection, CSIPReferToHeader, CSIPContactHeader, CSIPToHeader, CSIP, CSIPReferDialogAssoc and CSIPFromHeader.
//!                         2. Initialize objects of CSIP and CSIPConnection.
//!                         3. Initialize objects of CSIPFromHeader, CSIPToHeader, CSIPContactHeader and CSIPReferToHeader.
//!                         4. Initialize object of CSIPReferDialogAssoc.
//!                         4. Initialize object of CSIPReferDialogAssoc using CSIPDialog object and CSIPReferToHeader object.
//!                         5. Destroy all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The REFER can be sent successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                     \SIP\sipclient\send-sip-request-master.ini
        CREATE_OBJECT       CSIPRegistrationBinding       binding
        CREATE_OBJECT       CSIPConnection                sipconnection
        CREATE_OBJECT       CSIP                          sip
        CREATE_OBJECT       CSIPAddress                   address
        CREATE_OBJECT       CSIPToHeader                  toheader
        CREATE_OBJECT       CSIPToHeader                  toheader2
        CREATE_OBJECT       CSIPFromHeader                fromheader
        CREATE_OBJECT       CSIPReferToHeader             refertoheader
        CREATE_OBJECT       CSIPContactHeader             contactheader
        CREATE_OBJECT       CSIPClientTransaction         clienttransaction
        CREATE_OBJECT       CSIPReferDialogAssoc          referdialogassoc
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPMessageElements           messageelements
        CREATE_OBJECT       CSdpOriginField               sdporiginfield
        CREATE_OBJECT       SdpCodecStringPool            sdpcodecstringpool
        CREATE_OBJECT       CSdpConnectionField           sdpconnectionfield
        CREATE_OBJECT       CSdpMediaField                sdpmediafield
        CREATE_OBJECT       CSdpDocument                  sdpdocument
        CREATE_OBJECT       CSIPRefresh                   refresh
        CREATE_OBJECT       CSIPHttpDigest				  httpdigest
        COMMAND             sip                           NewL                      send-sip-request-master-0107-NewL_Command01
        COMMAND             sipconnection                 NewL                      send-sip-request-master-0107-NewL_Command02
        OUTSTANDING    
        COMMAND             refresh                       NewL    
        COMMAND             toheader                      DecodeL                   send-sip-request-master-0107-DecodeL_Command03
        COMMAND             address                       DecodeL                   send-sip-request-master-0107-DecodeL_Command04
        COMMAND             contactheader                 NewL                      send-sip-request-master-0107-NewL_Command05
        COMMAND             binding                       NewL                      send-sip-request-master-0107-NewL_Command06
        COMMAND				httpdigest					  NewL                      send-sip-request-master-0107-NewL_Command07
        COMMAND             binding                       RegisterL                 send-sip-request-master-0107-RegisterL_Command08
        COMMAND             httpdigest                    WaitForChallengeReceived  send-sip-request-master-0107-WaitForChallengeReceived_Command09
        OUTSTANDING
        COMMAND				httpdigest					  SetCredentialsL			send-sip-request-master-0107-SetCredentialsL_Command10
        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0107-WaitForIncomingResponse_Command11
        OUTSTANDING
        COMMAND             sdpcodecstringpool            OpenL
        COMMAND             contenttypeheader             NewL                      send-sip-request-master-0107-NewL_Command12
        COMMAND             fromheader                    DecodeL                   send-sip-request-master-0107-DecodeL_Command13
        COMMAND             refertoheader                 DecodeL                   send-sip-request-master-0107-DecodeL_Command14
        COMMAND             toheader2                     DecodeL                   send-sip-request-master-0107-DecodeL_Command15
        COMMAND             sdporiginfield                NewL                      send-sip-request-master-0107-NewL_Command16
        COMMAND             sdpconnectionfield            NewL                      send-sip-request-master-0107-NewL_Command17
        COMMAND             sdpmediafield                 NewL                      send-sip-request-master-0107-NewL_Command18
        COMMAND             sdpdocument                   NewL
        COMMAND             sdpdocument                   SetOriginField            send-sip-request-master-0107-SetOriginField_Command19
        COMMAND             sdpdocument                   SetSessionNameL           send-sip-request-master-0107-SetSessionNameL_Command20
        COMMAND             sdpdocument                   SetConnectionField        send-sip-request-master-0107-SetConnectionField_Command21
        COMMAND             sdpdocument                   MediaFields_Append        send-sip-request-master-0107-MediaFields_Append_Command22
        COMMAND             sdpdocument                   EncodeL
        COMMAND             messageelements               NewL
        COMMAND             messageelements               SetContentL               send-sip-request-master-0107-SetContentL_Command23
        COMMAND             referdialogassoc              NewL                      send-sip-request-master-0107-NewL_Command24
        COMMAND             referdialogassoc              SendReferL                send-sip-request-master-0107-SendReferL_Command25
        ASYNC_DELAY     500000
//        COMMAND             sipconnection                 WaitForIncomingResponse   send-sip-request-master-0107-WaitForIncomingResponse_Command26
//        OUTSTANDING
        COMMAND             referdialogassoc              ~
        COMMAND             refresh                       ~
        COMMAND             binding                       ~
        COMMAND             httpdigest                    ~
        COMMAND             sdpdocument                   ~
        COMMAND             contenttypeheader             ~
        COMMAND             sdpcodecstringpool            Close
        COMMAND             clienttransaction             ~
        COMMAND             sipconnection                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE send-sip-request-master-0107
