diff options
Diffstat (limited to 'tests/pjsua/scripts-sipp/transfer-attended.py')
-rw-r--r-- | tests/pjsua/scripts-sipp/transfer-attended.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/pjsua/scripts-sipp/transfer-attended.py b/tests/pjsua/scripts-sipp/transfer-attended.py new file mode 100644 index 00000000..2cd6ddef --- /dev/null +++ b/tests/pjsua/scripts-sipp/transfer-attended.py @@ -0,0 +1,51 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio", # UA0 @ port 5060 + "--null-audio", # UA1 @ port 5062 + "--null-audio" # UA2 @ port 5064 + ] + +PJSUA_EXPECTS = [ + # A calls B + [0, "", "m"], + [0, "", "sip:localhost:5062"], + [1, const.EVENT_INCOMING_CALL, "a"], + [1, "", "200"], + [0, const.STATE_CONFIRMED, ""], + [1, const.STATE_CONFIRMED, ""], + + # B holds A + [1, "", "H"], + [0, const.MEDIA_HOLD, ""], + [1, const.MEDIA_HOLD, ""], + + # B calls C + [1, "", "m"], + [1, "", "sip:localhost:5064"], + [2, const.EVENT_INCOMING_CALL, "a"], + [2, "", "200"], + [1, const.STATE_CONFIRMED, ""], + [2, const.STATE_CONFIRMED, ""], + + # B holds C + [1, "", "]"], + [1, "", "H"], + [2, const.MEDIA_HOLD, ""], + [1, const.MEDIA_HOLD, ""], + [1, "", "]"], + + # B transfer A to C + [1, "", "X"], + [1, "", "1"], + [0, "Call .* is being transfered", ""], + [1, "Subscription state .* ACCEPTED", ""], + [0, const.STATE_CALLING, ""], + [2, "Call .* is being replaced", ""], + [1, "call transfered successfully", ""], + [0, const.MEDIA_ACTIVE, ""], + [2, const.MEDIA_ACTIVE, ""], + [1, "", " "], + [1, "have 0 active call", ""], + ] |