[Freeswitch-users] RTP Auto Switch behaviour on EC2

Sean Ingham sean at missionlabs.co.uk
Mon Jul 17 09:33:53 UTC 2017


Hi,
I'm running FreeSwitch on an AWS EC2 with config as per the wiki EC2 page.

external_rtp_ip & bind_server_ip are both set to the box's public AWS
Elastic IP - as is ext_rtp_ip on all profiles.

I'm running a WebRTC gateway also in AWS. I can see that SDPs from
Freeswitch to the gateway all include Freeswitch's public IP as desired,
however when the call is answered Freeswitch always sends RTP traffic from
it's private IP. Then a second or 2 later Freeswitch sees incoming RTP from
the gateway to it's public IP address and RTP auto swtiching behaviour
kicks in, resulting in a line like this in FS logs:

switch_rtp.c:6954 Auto Changing audio port from 172.31.x.x:31196 to
52.17.x.x:31196

As it happens, the gateway is able to receive media from either private or
public IP as the box is in the same subnet, but in around 30% of cases at
the point this switching occurs the call audio drops. (I'm guessing the
gateway has issues stitching together the rtp streams from 2 different
sources.)

I've tried experimenting with the disable_rtp_auto_switch parameter, but
seems to me a cleaner solution would be to have Freeswitch send RTP from
it's public IP in the first place, and I can't understand why it's not
doing that given it's negotiated to use the public IP in it's SDP.

Can anyone provide any explanation for the behaviour I'm currently seeing,
or suggest how I can get FS to set the initial outgoing RTP port correctly?


Thanks,
Sean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170717/c609fd4c/attachment.html>


More information about the FreeSWITCH-users mailing list