From 96353ad9e7e8a6575b3b934dfdd7073e1522c9ef Mon Sep 17 00:00:00 2001 From: Maximilian Fridrich Date: Thu, 1 Aug 2024 14:12:46 +0200 Subject: [PATCH] apps/dial/preserve_top: simplify SIPP scenarios to fix flakiness The SIPP scenarios contained stream directions with initial answers containing audio=inactive for example which are known to trigger re-INVITEs in Asterisk. The timing of those re-INVITEs is hard to predict which can make the SIPP scenarios and tests flaky. Resolves: #60 --- tests/apps/dial/preserve_top/sipp/alice.xml | 63 +++++++++++++------ tests/apps/dial/preserve_top/sipp/bob.xml | 51 ++++++++------- tests/apps/dial/preserve_top/sipp/carol.xml | 36 +---------- tests/apps/dial/preserve_top/sipp/carol2.xml | 38 ++--------- tests/apps/dial/preserve_top/test-config.yaml | 3 +- 5 files changed, 80 insertions(+), 111 deletions(-) diff --git a/tests/apps/dial/preserve_top/sipp/alice.xml b/tests/apps/dial/preserve_top/sipp/alice.xml index 6d3527eed..2d824844a 100644 --- a/tests/apps/dial/preserve_top/sipp/alice.xml +++ b/tests/apps/dial/preserve_top/sipp/alice.xml @@ -21,14 +21,11 @@ s=- c=IN IP[media_ip_type] [media_ip] t=0 0 - m=audio [custom_media_port] RTP/AVP 9 0 8 + m=audio [custom_media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 - a=rtpmap:8 PCMA/8000 - a=rtpmap:9 G722/8000 a=sendrecv - m=video 6000 RTP/AVP 99 34 + m=video 6000 RTP/AVP 99 a=rtpmap:99 H264/90000 - a=rtpmap:34 H263/90000 a=sendrecv ]]> @@ -36,9 +33,7 @@ - - - + @@ -67,23 +62,24 @@ ]]> - + ;tag=[pid]SIPpTag[call_number] + To: [$remote_tag] [last_Call-ID:] - [last_CSeq:] - Contact: + CSeq: [cseq] INVITE + Contact: + Max-Forwards: 70 Content-Type: application/sdp Content-Length: [len] v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] + o=- 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 @@ -92,12 +88,43 @@ a=sendrecv m=video 6000 RTP/AVP 99 a=rtpmap:99 H264/90000 - a=sendonly + a=recvonly ]]> - + + + + + + + + + + + + + + + + Max-Forwards: 70 + Content-Length: 0 + + ]]> + diff --git a/tests/apps/dial/preserve_top/sipp/bob.xml b/tests/apps/dial/preserve_top/sipp/bob.xml index a7df3c3ee..c5eaac02a 100644 --- a/tests/apps/dial/preserve_top/sipp/bob.xml +++ b/tests/apps/dial/preserve_top/sipp/bob.xml @@ -33,7 +33,7 @@ - + + + + + + - + + + + + ]]> - - - - - - + diff --git a/tests/apps/dial/preserve_top/sipp/carol.xml b/tests/apps/dial/preserve_top/sipp/carol.xml index 7392aef39..8ad19c499 100644 --- a/tests/apps/dial/preserve_top/sipp/carol.xml +++ b/tests/apps/dial/preserve_top/sipp/carol.xml @@ -35,37 +35,7 @@ ]]> - - - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [custom_media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - a=inactive - m=video 6000 RTP/AVP 99 - a=rtpmap:99 H264/90000 - a=recvonly - - ]]> - - - + diff --git a/tests/apps/dial/preserve_top/sipp/carol2.xml b/tests/apps/dial/preserve_top/sipp/carol2.xml index 3b9a44950..5dca9a6dd 100644 --- a/tests/apps/dial/preserve_top/sipp/carol2.xml +++ b/tests/apps/dial/preserve_top/sipp/carol2.xml @@ -12,10 +12,10 @@ search_in="body" check_it_inverse="true" assign_to="2"/> + search_in="body" check_it_inverse="true" assign_to="3"/> + search_in="body" check_it="true" assign_to="4"/> @@ -37,36 +37,6 @@ - - - Content-Type: application/sdp - Content-Length: [len] - - v=0 - o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] - s=- - c=IN IP[media_ip_type] [media_ip] - t=0 0 - m=audio [custom_media_port] RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - a=inactive - m=video 6000 RTP/AVP 99 - a=rtpmap:99 H264/90000 - a=recvonly - - ]]> - - - - diff --git a/tests/apps/dial/preserve_top/test-config.yaml b/tests/apps/dial/preserve_top/test-config.yaml index 9b97b3a51..d9e1f9177 100644 --- a/tests/apps/dial/preserve_top/test-config.yaml +++ b/tests/apps/dial/preserve_top/test-config.yaml @@ -1,8 +1,7 @@ --- testinfo: summary: | - 'Test the Dial option "j" which preserver the initial topology of the caller.' - skip: 'The middle sipp scenario fails often. See https://github.com/asterisk/testsuite/issues/60' + 'Test the Dial option "j" which preserves the initial topology of the caller.' description: | 'Alice calls Bob whose 200 SDP answer contains an audio stream and a video stream which is set to recvonly. Bob hangs up and then the Dial