diff --git a/daemon/call.c b/daemon/call.c index ce001de68..2b4992ade 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2975,7 +2975,10 @@ static int monologue_subscribe_request1(struct call_monologue *src_ml, struct ca codec_handlers_update(dst_media, src_media, flags, sp); - MEDIA_SET(dst_media, SEND); + if (MEDIA_ISSET(src_media, RECV)) + MEDIA_SET(dst_media, SEND); + else + MEDIA_CLEAR(dst_media, SEND); MEDIA_CLEAR(dst_media, RECV); __rtcp_mux_set(flags, dst_media); diff --git a/t/auto-daemon-tests-pubsub.pl b/t/auto-daemon-tests-pubsub.pl index 90ed487d4..cce2ec46c 100755 --- a/t/auto-daemon-tests-pubsub.pl +++ b/t/auto-daemon-tests-pubsub.pl @@ -650,6 +650,237 @@ rcv($sock_c, $port_c, rtpm(8, 2001, 4160, -1, "\x2a" x 160)); +($sock_a, $sock_b, $sock_c, $sock_d) = + new_call([qw(198.51.100.14 6112)], [qw(198.51.100.14 6114)], [qw(198.51.100.14 6116)]); + +($port_a) = offer('sub pause/resume', + { }, < ft() }, < $ttr }, < tt(), 'to-tag' => ft() }, < tt(), 'to-tag' => ft() }, < ft(), 'to-tag' => $ttr }, < $ttr }, < tt(), 'to-tag' => ft() }, < tt(), 'to-tag' => ft() }, < ft(), 'to-tag' => $ttr }, < $ttr }, <