From 4e8e6d3922303711335bee677676c4cddc18dd5d Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Wed, 27 Jan 2016 11:44:10 -0500 Subject: res_rtp_asterisk: Allow ICE host candidates to be overriden During ICE negotiation the IPs of the local interfaces are sent to the remote peer as host candidates. In many cases Asterisk is behind a static one-to-one NAT, so these host addresses will be internal IP addresses. To help in hiding the topology of the internal network, this patch adds the ability to override the host candidates by matching them against a user-defined list of replacements. Change-Id: I1c9541af97b83a4c690c8150d19bf7202c8bff1f --- configs/samples/rtp.conf.sample | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'configs/samples') diff --git a/configs/samples/rtp.conf.sample b/configs/samples/rtp.conf.sample index c22acaa9f..2ef5dd28a 100644 --- a/configs/samples/rtp.conf.sample +++ b/configs/samples/rtp.conf.sample @@ -58,3 +58,30 @@ rtpend=20000 ; ; Password used to authenticate with TURN relay server. ; turnpassword= +; +[ice_host_candidates] +; +; When Asterisk is behind a static one-to-one NAT and ICE is in use, ICE will +; expose the server's internal IP address as one of the host candidates. +; Although using STUN (see the 'stunaddr' configuration option) will provide a +; publicly accessible IP, the internal IP will still be sent to the remote +; peer. To help hide the topology of your internal network, you can override +; the host candidates that Asterisk will send to the remote peer. +; +; IMPORTANT: Only use this functionality when your Asterisk server is behind a +; one-to-one NAT and you know what you're doing. If you do define anything +; here, you almost certainly will NOT want to specify 'stunaddr' or 'turnaddr' +; above. +; +; The format for these overrides is: +; +; => +; +; The following will replace 192.168.1.10 with 1.2.3.4 during ICE +; negotiation: +; +;192.168.1.10 => 1.2.3.4 +; +; You can define an override for more than 1 interface if you have a multihomed +; server. Any local interface that is not matched will be passed through +; unaltered. Both IPv4 and IPv6 addresses are supported. -- cgit v1.2.3