[SR-Users] question regarding rtpengine and ICE candidate selection

Richard Fuchs rfuchs at sipwise.com
Thu Dec 3 23:38:37 CET 2020


On 03/12/2020 13.39, Andrew Chen wrote:
> Hi all,
>
> I was wondering if someone can help me understand how the ICE 
> parameter works in the rtpengine module works.
>
> So basically our client does an ICE candidate lookup and grabs a list 
> of them and applies it to the INVITE that gets sent to the Kamailio.  
> The list looks like this:
>
> 2020-12-03T18:05:46.456030+00:00 ashmainkama51 kamailio[22147]: 
> a=candidate:3373280875 1 udp 2122262783 
> 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71 59827 typ host generation 0 
> network-id 2 network-cost 10
> 2020-12-03T18:05:46.456057+00:00 ashmainkama51 kamailio[22147]: 
> a=candidate:3040609428 1 udp 2122197247 
> 2001:8a0:78fc:7000:d979:bf75:dbc0:69f 59828 typ host generation 0 
> network-id 3 network-cost 10
> 2020-12-03T18:05:46.456081+00:00 ashmainkama51 kamailio[22147]: 
> a=candidate:1681997092 1 udp 2122129151 192.168.1.66 59829 typ host 
> generation 0 network-id 1 network-cost 10
> 2020-12-03T18:05:46.456106+00:00 ashmainkama51 kamailio[22147]: 
> a=candidate:2274611867 1 tcp 1518283007 
> 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71 9 typ host tcptype active 
> generation 0 network-id 2 network-cost 10
> 2020-12-03T18:05:46.456131+00:00 ashmainkama51 kamailio[22147]: 
> a=candidate:4223662180 1 tcp 1518217471 
> 2001:8a0:78fc:7000:d979:bf75:dbc0:69f 9 typ host tcptype active 
> generation 0 network-id 3 network-cost 10
> 2020-12-03T18:05:46.456155+00:00 ashmainkama51 kamailio[22147]: 
> a=candidate:717406676 1 tcp 1518149375 192.168.1.66 9 typ host tcptype 
> active generation 0 network-id 1 network-cost 10
> 2020-12-03T18:05:46.456180+00:00 ashmainkama51 kamailio[22147]: 
> a=candidate:2130547417 1 udp 8199935 206.81.191.27 61165 typ relay 
> raddr 85.247.0.121 rport 53091 generation 0 network-id 1 network-cost 10
>
>
> In the rtpengine_offer, I have this:
>
> rtpengine_offer("ICE=force DTLS=passive replace-session-connection 
> replace-origin external internal");
>
> What i am trying to do is to tell the freeswitch endpoint to use 
> rtpengine as ICE candidate and I see in the SDP this is happening:
>
> a=candidate:6296910676 1 udp 659136 206.81.191.52 52766 typ host 
> generation 0
>
> Btw..206.81.191.52 is a separate AWS instance running rtpengine binary.
>
> On the rtpengine_answer, I tell the remote client side the same 
> thing..use rtpengine as your ICE candidate:
>
> rtpengine_answer("ICE=force DTLS=passive replace-session-connection 
> replace-origin internal external");
>
> and this is snippet from 200 OK:
>
> a=candidate:6296910676 1 udp 659136 206.81.191.52 52766 typ host 
> generation 0
>
> Question:
>
> Why does the rtpengine logs still show that it's trying to use 
> 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71 as RTP candidate in this scenario?
>
> Dec  3 18:05:47 ashmainrtpe42 rtpengine[8505]: DEBUG: 
> [ep1sbnkk9tikhg4kpmot]: Forward to sink endpoint: 
> 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71:59827 (RTP seq 25423 TS 0)
>
> I thought ICE=force will handle such adjustments so that all rtp is 
> handled by the rtpengine to our client and bypass the STUN server?
>
Isn't that what's happening? Rtpengine receives media from one peer and 
forwards it to one of the ICE candidates (presumably the primary one 
that was negotiated) of the other peer. Or am I misunderstanding what 
you posted?

Cheers



More information about the sr-users mailing list