Hello all,
I am having trouble getting calls to work on an Amazon EC2 hosted server using chan_sip.
This is my sip.conf configuration:
[general]
webrtc=yes
websocket_enabled=yes
tlsenable=yes
dtlsenable=yes
directrtpsetup=no
directmedia=no
externip=
externaddr=
media_address=
externhost=
localnet=
nat=force_rport,comedia
canreinvite=no
maxcallbitrate=5120
accept_outofcall_message=yes
auth_message_requests=no
transport=udp,wss,tcp,tls
realm=
alwaysauthreject=yes
allowguest=no
context=default
tcpenable=yes
tcpbindaddr=0.0.0.0
port=5060
bindaddr=0.0.0.0
srvlookup=yes
This is how my extensions are defined:
[]
type=peer
secret=
context=voice-sip
host=dynamic
trustrpid=yes
sendrpid=no
qualify=yes
qualifyfreq=600
transport=ws,wss
encryption=yes
avpf=yes
icesupport=yes
rtcp_mux=yes
directmedia=no
disallow=all
allow=ulaw,opus,vp8,h264
dtmfmode=info
nat=force_rport,comedia
videosupport=yes
dtlsenable=yes
dtlscertfile=/etc/asterisk/certs/fullchain.pem
dtlsprivatekey=/etc/asterisk/certs/privkey.pem
I can make a call and playback an audio file from the EC2 to devices on our office network and that works just fine. The issue happens when using a device on our office network to call into the EC2 and connect to a different device also on our office network. The devices register and the call connects on both devices but no audio or video come through. I did a tcpdump on the device initiating the call and it appears to be sending the rtp to the localnet of the EC2 instead of the public IP. This is further confirmed by running tcpdump on the EC2 server instance and seeing that no rtp is coming through from our office IP. I have checked to make sure that all of the possible rtp ports are open and can see traffic coming across some of those ports just not the rtp from the call. I have tried multiple different variations of this configuration but nothing has changed this behavior. Is their something wrong with this configuration or something that I need to add to resolve this issue? If you would like more information like the sip debugging please let me know and I will add whatever is needed to the post.