diff --git a/daemon/call.c b/daemon/call.c index 46008ba78..f771eb048 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1431,8 +1431,10 @@ static void __ice_offer(const sdp_ng_flags *flags, struct call_media *this, // unless instructed not to if (flags->ice_option == ICE_REMOVE) MEDIA_CLEAR(this, ICE); - else if (flags->ice_option != ICE_DEFAULT) - MEDIA_SET(this, ICE); + else if (flags->ice_option != ICE_DEFAULT) { + if (flags->opmode != OP_ANSWER && flags->opmode != OP_PUBLISH) + MEDIA_SET(this, ICE); + } if (flags->ice_reject) MEDIA_CLEAR(other, ICE); diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 6015ea44a..9f5f4561f 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -1139,6 +1139,51 @@ rcv($sock_b, $port_a, rtpm(98 | 0x80, 7003, 9480, 0x75336ce, "\x08\x0f\x00\xa0") +new_call; + +offer('ICE=force in answer', { }, < 'force'}, < ['require'] }, <