<div dir="ltr">Hi Brian,<br><br>That makes sense since the EC2 has no network interface for the public IP that FS can bind to. <br>So what is RTP auto switching actually doing when it says:<br><br>Auto Changing audio port from 172.31.x.x:31196 to 52.17.x.x:31196<br><br>Is it just amending udp packet headers but not actually rerouting anything?<br><br>Thanks,<br>Sean<pre style="white-space:pre-wrap;color:rgb(0,0,0)">>"Freeswitch always sends RTP traffic from it's private IP", Because thats
>all it CAN do, the public IP isn't directly bound on the system so it
>can't send from the public IP.

>/b


On Mon, Jul 17, 2017 at 4:33 AM, Sean Ingham <<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">sean at missionlabs.co.uk</a>> wrote:

><i> Hi,
</i>><i> I'm running FreeSwitch on an AWS EC2 with config as per the wiki EC2 page.
</i>><i>
</i>><i> external_rtp_ip & bind_server_ip are both set to the box's public AWS
</i>><i> Elastic IP - as is ext_rtp_ip on all profiles.
</i>><i>
</i>><i> I'm running a WebRTC gateway also in AWS. I can see that SDPs from
</i>><i> Freeswitch to the gateway all include Freeswitch's public IP as desired,
</i>><i> however when the call is answered Freeswitch always sends RTP traffic from
</i>><i> it's private IP. Then a second or 2 later Freeswitch sees incoming RTP from
</i>><i> the gateway to it's public IP address and RTP auto swtiching behaviour
</i>><i> kicks in, resulting in a line like this in FS logs:
</i>><i>
</i>><i> switch_rtp.c:6954 Auto Changing audio port from 172.31.x.x:31196 to
</i>><i> 52.17.x.x:31196
</i>><i>
</i>><i> As it happens, the gateway is able to receive media from either private or
</i>><i> public IP as the box is in the same subnet, but in around 30% of cases at
</i>><i> the point this switching occurs the call audio drops. (I'm guessing the
</i>><i> gateway has issues stitching together the rtp streams from 2 different
</i>><i> sources.)
</i>><i>
</i>><i> I've tried experimenting with the disable_rtp_auto_switch parameter, but
</i>><i> seems to me a cleaner solution would be to have Freeswitch send RTP from
</i>><i> it's public IP in the first place, and I can't understand why it's not
</i>><i> doing that given it's negotiated to use the public IP in it's SDP.
</i>><i>
</i>><i> Can anyone provide any explanation for the behaviour I'm currently seeing,
</i>><i> or suggest how I can get FS to set the initial outgoing RTP port correctly?
</i>><i>
</i>><i>
</i>><i> Thanks,
</i>><i> Sean.
</i>><i>
</i>><i> _________________________________________________________________________
</i>><i> Professional FreeSWITCH Consulting Services:
</i>><i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">consulting at freeswitch.org</a>
</i>><i> <a href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</a>
</i>><i>
</i>><i> Official FreeSWITCH Sites
</i>><i> <a href="http://www.freeswitch.org/">http://www.freeswitch.org</a>
</i>><i> <a href="http://confluence.freeswitch.org/">http://confluence.freeswitch.org</a>
</i>><i> <a href="http://www.cluecon.com/">http://www.cluecon.com</a>
</i>><i>
</i>><i> FreeSWITCH-users mailing list
</i>><i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">FreeSWITCH-users at lists.freeswitch.org</a>
</i>><i> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
</i>><i> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
</i>><i> <a href="http://www.freeswitch.org/">http://www.freeswitch.org</a>
</i>><i>
</i>


-- 

*Brian West*
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">brian at freeswitch.org</a>

*Twitter: @FreeSWITCH , @briankwest*

<a href="http://www.freeswitchbook.com/">http://www.freeswitchbook.com</a>
<a href="http://www.freeswitchcookbook.com/">http://www.freeswitchcookbook.com</a>

Book a phone call (CST) <<a href="https://freeswitch.com/appointment">https://freeswitch.com/appointment</a>>

Allison prompts for FreeSWITCH:

*<a href="https://www.gofundme.com/allison-prompts-for-freeswitch*">https://www.gofundme.com/allison-prompts-for-freeswitch*</a>
<<a href="https://www.gofundme.com/allison-prompts-for-freeswitch">https://www.gofundme.com/allison-prompts-for-freeswitch</a>>

Got Bugs? Report them here <<a href="https://freeswitch.org/jira">https://freeswitch.org/jira</a>>! | Reddit:
/r/freeswitch <<a href="https://www.reddit.com/r/freeswitch">https://www.reddit.com/r/freeswitch</a>>

*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
*Skype:*briankwest</pre>
</div>