Using Coturn to go through CGNat

Hi everyone,

I’m setting up Coturn with JSsip to use voip with webRTC through Asterisk 14.6.0.

I set up my coturn and it’s working well , if i test it here : , i get my relays as i expected.

same thing for JSsip, i send all parameters concerning turn credentials and domain used by turn and if i set only turn it’s working fine.

Now the problem is when i use turn ( On firefox i forced it in about:config → turnrelay = true ), I have no sound and i don’t understand why.

Here is a pcap :

Via: SIP/2.0/WS myippbx:5060;branch=z9hG4bK3ab94749;rport
To: <sip:[lsguk917@*********-devast3.******.net](mailto:lsguk917@******-****.*****.net);transport=wss>;tag=jl4mutddt2

From: <sip:9152744294@myippbx>;tag=as00af71c7

Call-ID: 48c6843120bca0904f1fc7cc0c498c08@myippbx:5060

CSeq: 102 INVITE

Contact: <sip:[lsguk917@*******-devast3.******.net](mailto:lsguk917@**********-devast3.***********.net);transport=wss>
Session-Expires: 90;refresher=uas
Supported: timer,ice,replaces,outbound
Content-Type: application/sdp
Content-Length: 804
o=mozilla...THIS_IS_SDPARTA-86.0.1 2411247129753265465 0 IN IP4
t=0 0
a=fingerprint:sha-256 72:27:C8:5A:C5:51:04:1C:71:9A:31:9C:C6:ED:47:1A:D7:14:CC:FB:CF:FA:A5:A4:0D:EC:EF:9A:77:01:EE:FD
a=msid-semantic:WMS *
m=audio 11455 RTP/SAVPF 8 0 101
c=IN IP4 myipTURN
a=candidate:0 1 UDP 92217343 **myipTURN** 11455 typ relay raddr **myipTURN** rport 11455
a=fmtp:101 0-15
a=msid:{1501e37b-38df-1848-b567-199e240f11b1} {8051cfe9-6b18-4843-8d35-6eb94cb4e00e}
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=ssrc:1892072827 cname:{9d6c5379-e349-d445-b40f-ede4816ef7be}

I can find my relay candidate in sip invite with my coturn ip which is myipTURN but there’s no effect on audio stream.

In asterisk side, i heard that i have to set credential and informations in /etc/asterisk/rtp.conf but when i set it up, nothing works.

Thanks for your help,

TURN does not need to be configured in Asterisk if it is configured on a public IP address, or if ports are forwarded and Asterisk knows it is behind NAT.

You’d need to examine the ICE negotiation and see where packets are going and make sure things are flowing as expected.

Thank you for your response, i thing that’s ice negociation is not working for us. If i check this line in pcac :

a=candidate:0 1 UDP 92217343 **myipTURN** 11455 typ relay raddr **myipTURN** rport 11455

Is that normal we have same port and same ip adress in relay here ? 11455 and myipTURN have same values

A packet capture would show exactly what is happening with the ICE negotiation, and is vital when debugging/isolating WebRTC no audio issues.

I have little experience with TURN relays and candidates, so I’d suggest consulting the RFC to understand it.

Finally found there’s a bug on firefox →

Candidates contain relay turn address instead my ip address , between server like asterisk. Candidates are working fine for peer to peer like webrtc video but not in this case in firefox

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.