/*******************************************************
   1. Create MT PS call (state: Ringing)
   2. Create 2nd MT PS call
   		Expected: Call is automatically rejected
   3. Answer call
   4. Disconnect call
*******************************************************/

[StifSettings]
CheckHeapBalance= on
[EndStifSettings]

[Test]
title 3.5.1 Two incoming MT calls, PS & PS
timeout 15000
create ccetester test
test Delay 2000

// Step 1
print Step_1

// Trigger ICM
test InitIncomingCall

// Wait plugin to initialize
test Delay 1000

// Send plugin command for PS plugin, MT call with CallID 1 is created
test SendPluginRequest CreateCall 2
test WaitEvent 0 IncomingCall
test WaitEvent 1 Ringing

// Step 2
print Step_2

// Send plugin command for PS plugin, MT call with CallID 2 is created
test SendPluginRequest CreateCall 2
test Delay 1000

// Step 3
print Step_3

// Answer call, other is put automatically on hold
test Answer 1 0
test WaitEvent 1 Answering
test WaitEvent 1 Connected

// Step 4
print Step_4

// Hangup call
test HangUp 1 0
test WaitEvent 1 Disconnecting
test WaitEvent 1 Idle
test Release 1 0

test VerifyTest
delete test
[Endtest] 
