From 5386a14d91469a1a66760c694097545d64f3fc06 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 19 Dec 2024 15:17:36 -0400 Subject: [PATCH] MT#61368 add tests for OP_CONNECT Change-Id: I7b9f5a90c656e89509d26e48e844d8e6693755cc --- t/auto-daemon-tests.pl | 674 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 7fc8dc6ae..b08c000af 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -34,6 +34,7 @@ my $pcma_5 = "\xad\xac\xa2\xa6\xbd\x9a\x06\x3f\x26\x2d\x2c\x2d\x26\x3f\x06\x9a\x my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $ssrc_b, $resp, $sock_ax, $sock_bx, $port_ax, $port_bx, + $sock_cx, $sock_dx, $port_c, $port_d, $port_cx, $port_dx, $srtp_ctx_a, $srtp_ctx_b, $srtp_ctx_a_rev, $srtp_ctx_b_rev, $ufrag_a, $ufrag_b, @ret1, @ret2, @ret3, @ret4, $srtp_key_a, $srtp_key_b, $ts, $seq, $has_recv); @@ -367,6 +368,679 @@ rcv($sock_a, $port_b, rtpm(119, 5001, 7960, 0x123494f, "\x7c\x87\xfc\xe0\x9a\x50 +($sock_a, $sock_ax, $sock_b, $sock_bx, +$sock_c, $sock_cx, $sock_d, $sock_dx) = new_call([qw(198.51.100.35 3000)], [qw(198.51.100.35 3001)], + [qw(198.51.100.35 3002)], [qw(198.51.100.35 3003)], + [qw(198.51.100.35 3004)], [qw(198.51.100.35 3005)], + [qw(198.51.100.35 3006)], [qw(198.51.100.35 3007)], + ); + +($port_a, $port_ax) = offer('simple connect', { }, < $t_a, 'to-tag' => $t_c }); + +snd($sock_c, $port_d, rtp(0, 3001, 5160, 0x7532346, "\x00" x 160)); +rcv($sock_a, $port_b, rtpm(0, 3001, 5160, 0x7532346, "\x00" x 160)); +snd($sock_a, $port_b, rtp(0, 1002, 3320, 0x5432345, "\x00" x 160)); +rcv($sock_c, $port_d, rtpm(0, 1002, 3320, 0x5432345, "\x00" x 160)); + + + + + +($sock_a, $sock_ax, $sock_b, $sock_bx) = new_call([qw(198.51.100.35 3008)], [qw(198.51.100.35 3009)], + [qw(198.51.100.35 3010)], [qw(198.51.100.35 3011)], + ); + +($port_a, $port_ax) = offer('cross call connect', { }, < $t_c, 'to-tag' => $t_a, 'to-call-id' => $cid1 }); + +snd($sock_c, $port_d, rtp(0, 3001, 5160, 0x7532346, "\x00" x 160)); +rcv($sock_a, $port_b, rtpm(0, 3001, 5160, 0x7532346, "\x00" x 160)); +snd($sock_a, $port_b, rtp(0, 1002, 3320, 0x5432345, "\x00" x 160)); +rcv($sock_c, $port_d, rtpm(0, 1002, 3320, 0x5432345, "\x00" x 160)); + +rtpe_req('delete', 'delete'); + + + + +($sock_a, $sock_ax, $sock_b, $sock_bx) = new_call([qw(198.51.100.35 3024)], [qw(198.51.100.35 3025)], + [qw(198.51.100.35 3026)], [qw(198.51.100.35 3027)], + ); + +($port_a, $port_ax) = offer('cross call connect with proper delete', { }, < $t_c, 'to-tag' => $t_a, 'to-call-id' => $cid1 }); + +snd($sock_c, $port_d, rtp(0, 3001, 5160, 0x7532346, "\x00" x 160)); +rcv($sock_a, $port_b, rtpm(0, 3001, 5160, 0x7532346, "\x00" x 160)); +snd($sock_a, $port_b, rtp(0, 1002, 3320, 0x5432345, "\x00" x 160)); +rcv($sock_c, $port_d, rtpm(0, 1002, 3320, 0x5432345, "\x00" x 160)); + +rtpe_req('delete', 'delete'); +rtpe_req('delete', 'delete', { 'call-id' => $cid1 } ); + + + + + +($sock_a, $sock_ax, $sock_b, $sock_bx, +$sock_c, $sock_cx, $sock_d, $sock_dx) = new_call([qw(198.51.100.35 3032)], [qw(198.51.100.35 3033)], + [qw(198.51.100.35 3034)], [qw(198.51.100.35 3035)], + [qw(198.51.100.35 3036)], [qw(198.51.100.35 3037)], + [qw(198.51.100.35 3038)], [qw(198.51.100.35 3039)], + ); + +($port_a, $port_ax) = offer('connect with mismatched media types', { }, < $t_a, 'to-tag' => $t_c }); + +snd($sock_c, $port_d, rtp(0, 3001, 5160, 0x7532346, "\x00" x 160)); +rcv($sock_a, $port_b, rtpm(0, 3001, 5160, 0x7532346, "\x00" x 160)); +snd($sock_a, $port_b, rtp(0, 1002, 3320, 0x5432345, "\x00" x 160)); +rcv($sock_c, $port_d, rtpm(0, 1002, 3320, 0x5432345, "\x00" x 160)); + +offer('connect with mismatched media types', { 'from-tag' => $t_a, 'to-tag' => $t_c }, < $t_a, 'to-tag' => $t_c }, < $t_a, 'to-tag' => $t_c }); + +snd($sock_c, $port_d, rtp(0, 3001, 5160, 0x7532346, "\x00" x 160)); +rcv($sock_a, $port_b, rtpm(8, 3001, 5160, 0x7532346, "\x2a" x 160)); +snd($sock_a, $port_b, rtp(8, 1002, 3320, 0x5432345, "\x00" x 160)); +rcv($sock_c, $port_d, rtpm(0, 1002, 3320, 0x5432345, "\x29" x 160)); + + + + + new_call;