On 04/29/2014 06:35 PM, Juha Heinanen wrote:
i made some ICE=force_relay tests between two baresip sip uas running on the same host. the result was that they decided to use relay candidates even when direct connection would have been possible.
the question is why? is it a bug in baresip's ice implementation or is it a result of the fact that rtpengine changed ip address on c line and port on m line (which, in opinion, it should not have done), or is the priority of relay candidates wrong (i.e., smaller value means higher priority)?
sdps are shown below. any hints would be appreciated. i'll cc also to baresip list.
<snip>
----------- 200 ok sdp from sip proxy to caller v=0. o=- 2323140971 266432672 IN IP4 192.98.102.30. s=-. c=IN IP4 192.98.102.30. t=0 0. a=tool:baresip 0.4.10. a=ice-lite. a=ice-ufrag:cxB9. a=ice-pwd:mLyJkKOP8xHg3Yv9R0BClp. m=audio 50014 RTP/AVP 96 97 98 8 0 101. b=AS:125. a=rtpmap:96 opus/48000/2. a=fmtp:96 stereo=1;sprop-stereo=1. a=rtpmap:97 speex/16000. a=fmtp:97 mode="7";vbr=off;cng=on. a=rtpmap:98 speex/8000. a=fmtp:98 mode="7";vbr=off;cng=on. a=rtpmap:8 PCMA/8000. a=rtpmap:0 PCMU/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15. a=label:1. a=rtcp-rsize. a=ssrc:2733287141 cname:sip:jh@test.tutpro.com. a=ptime:20. a=candidate:c062661e 1 UDP 2113932031 192.98.102.30 10332 typ host. a=candidate:c062661e 2 UDP 2113932030 192.98.102.30 10333 typ host. a=candidate:c0a82b92 1 UDP 2113932031 192.168.43.146 10332 typ host. a=candidate:c0a82b92 2 UDP 2113932030 192.168.43.146 10333 typ host. a=candidate:c062671e 1 UDP 2113932031 192.98.103.30 10332 typ host. a=candidate:c062671e 2 UDP 2113932030 192.98.103.30 10333 typ host. a=candidate:63c01c46 1 UDP 2113932031 2002:c062:661e::1 10332 typ host. a=candidate:63c01c46 2 UDP 2113932030 2002:c062:661e::1 10333 typ host. a=candidate:1e6662c0 1 UDP 2113932031 ::192.98.102.30 10332 typ host. a=candidate:1e6662c0 2 UDP 2113932030 ::192.98.102.30 10333 typ host. a=sendrecv. a=rtcp:50015. a=candidate:bTYPlIJSc0vw3WjT 1 UDP 16777216 192.98.102.30 50014 typ relay.
^^^^^
it looks like Component 2 (RTCP) is missing here ...?
you can try to run baresip in verbose debug mode (-v) and also set "ice_debug" to "yes" in the config file.
/alfred