/***************************************************
   1. Create MT CS call
   2. Put call on Hold
   3. Create 2nd (MT CS) call
   4. Hang up 2nd call
   5. Resume 1st call
   6. Hang up 1st call
/***************************************************/

[StifSettings]
CheckHeapBalance= on
[EndStifSettings]

[Test]
title 8.1.7 Two calls, MT/CS and MT/CS
timeout 10000
create ccetester test
test Delay 1000

// Step 1
print Step_1

// Plugin 1 = PS plugin (default if not given)
// Plugin 2 = CS plugin

test SendPluginRequest 2 CreateCall 1
test WaitEvent 0 IncomingCall
test WaitEvent 1 Ringing
// Answer call
test Answer 1 0
test WaitEvent 1 Answering
test WaitEvent 1 Connected

// Step 2
print Step_2

test Hold 1 0
test WaitEvents 1 Hold, 1 LocalHold

// Step 3
print Step_3

test SendPluginRequest 2 CreateCall 1
test WaitEvent 0 IncomingCall
test WaitEvent 2 Queued
// Answer call
test Answer 2 0
test WaitEvent 2 Answering
test WaitEvent 2 Connected

// Step 4
print Step_4

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

// Step 5
print Step_5

test Resume 1 0
test WaitEvents 1 Connected, 1 LocalResume

// Step 6
print Step_6

test HangUp 1 0
test WaitEvent 1 Disconnecting
test WaitEvent 1 Idle
test Release 1 0

test VerifyTest
delete test
[Endtest]
