I am using an Asterisk 13.13.1 server behind a NAT firewall with FreePBX 126.96.36.199 and I have two chan_sip extensions.
And these extensions are also registered from behind NAT of different networks. I was able to register my extensions in Asterisk.
In order to successful voice communication over RTP, I noticed that it is essential to configure ICE for achieving my needs.
And I did the following steps
I have enabled ICE support for both extensions with FreePBX GUI.
And in RTP configuration file (rtp_custom.conf) I have added STUN and TURN Server Details as follows.
And in res_stun_monitor.conf file I added following configuration
And when I testing the stun status with asterisk CLI (using command: stun show status) , I got the following
Hostname Port Period Retries Status ExternAddr ExternPort
global.stun.twilio.com 3478 30 3 OK 188.8.131.52 37254
When I tested by making phone calls between the extensions I got the sip INVITE packages with only two ice candidates. There is no server reflexive candidate present. The body of request as follows
o=root 788094571 788094571 IN IP4 184.108.40.206
s=Asterisk PBX 13.13.1
c=IN IP4 220.127.116.11
m=audio 11498 RTP/AVP 0 8 3 101
a=candidate:H22c66e1f 1 UDP 2130706431 10.10.10.10 11498 typ host
a=candidate:H22c66e1f 2 UDP 2130706430 10.10.10.10 11499 typ host
And my question is, How to properly configure ICE in order to get all necessary candidates.?