/*********************************************
Description: Test GetMobileCallInfo in all
             different call states
*********************************************/

[StifSettings]
CheckHeapBalance= on
[EndStifSettings]

[Test]
title 11.4.1 Misc, GetMobileCallInfo
timeout 15000
create ccetester test
test Delay 1000

// MO call

test OpenNewCall 1 0 Recipient1 2 ECCECallTypePS ECCELineTypePrimary

// Idle
test GetMobileCallInfo 1

test Dial 1 0 SubAddress Bearer
test WaitEvent 1 Dialling
test WaitEvent 1 Connecting
test WaitEvent 1 Connected

// Connected
test GetMobileCallInfo 1

// Ringing is handled as Connecting in MO call
test SendPluginRequest SetState 1 1
test WaitEvent 1 Connecting
test GetMobileCallInfo 1

test SendPluginRequest SetState 1 2
test WaitEvent 1 Connecting
test GetMobileCallInfo 1

// test forced Connected
test SendPluginRequest SetState 1 3
test WaitEvent 1 Connected
test GetMobileCallInfo 1

test SendPluginRequest SetState 1 4
test WaitEvent 1 Disconnecting
test GetMobileCallInfo 1

test SendPluginRequest SetState 1 5
test WaitEvent 1 Hold
test GetMobileCallInfo 1

test SendPluginRequest SetState 1 6
test WaitEvent 1 Transferring
test GetMobileCallInfo 1

test SendPluginRequest SetState 1 7
test WaitEvent 1 Forwarding	//event 10
test GetMobileCallInfo 1

// MO call's Queued state is ignored
//test SendPluginRequest SetState 1 8

test SendPluginRequest SetState 1 9
test WaitEvent 1 Answering
test GetMobileCallInfo 1

test SendPluginRequest SetState 1 10
test WaitEvent 1 Dialling
test GetMobileCallInfo 1

test HangUp 1 0
// From Dialling state will be set straight to Idle
test WaitEvent 1 Idle

// Release not called to prevent plugin unloading

// MT call

// Request MT call with CallID 2
test SendPluginRequest CreateCall 0
test WaitEvent 0 IncomingCall

// Call is queued because
test WaitEvent 2 Queued // event 15
test GetMobileCallInfo 2

// Call is in use until it is released
test Release 1 0

test Answer 2 0
test WaitEvent 2 Answering
test WaitEvent 2 Connected // 17
test GetMobileCallInfo 2

test SendPluginRequest SetState 2 1
test WaitEvent 2 Ringing
test GetMobileCallInfo 2

// Connecting is handled as Ringing with MT call
test SendPluginRequest SetState 2 2
test WaitEvent 2 Ringing
test GetMobileCallInfo 2

// forced Connected
test SendPluginRequest SetState 2 3
test WaitEvent 2 Connected // 20
test GetMobileCallInfo 2

test SendPluginRequest SetState 2 4
test WaitEvent 2 Disconnecting
test GetMobileCallInfo 2

test SendPluginRequest SetState 2 5
test WaitEvent 2 Hold
test GetMobileCallInfo 2

test SendPluginRequest SetState 2 6
test WaitEvent 2 Transferring
test GetMobileCallInfo 2

test SendPluginRequest SetState 2 7
test WaitEvent 2 Forwarding
test GetMobileCallInfo 2

test SendPluginRequest SetState 2 8
test WaitEvent 2 Queued
test GetMobileCallInfo 2

// test forced Answering
test SendPluginRequest SetState 2 9
test WaitEvent 2 Answering
test GetMobileCallInfo 2

// MT call's Dialling is notified as it is
test SendPluginRequest SetState 2 10
test WaitEvent 2 Dialling
test GetMobileCallInfo 2

test HangUp 2 0
test WaitEvent 2 Idle
test Release 2 0

test VerifyTest
delete test
[Endtest] 
