I have configured my server it works perfectly in the local network, but doesn’t work from the Internet.
My network topology is following
Router is connected to the Internet over PPPoE.
I set up port forwarding and range port forwarding
Here is settings from my router.
And port 5060 for SIP (but it doesn’t make sense, because it fits the range)
Asterisk Server is in the local network.
Consider situation I am calling from Internet via mobile phone network.
The problem is that I can hear well person inside my home local network, but he doesn’t hear me. And usually after few seconds connection is dropped.
But I can call this person or any other member of the network.
So SIP protocol works, but the problem I guess with RTP protocol, as far as all media data is transferred over RTP.
In case of two clients calling from the internet neither of them can hear anything.
As you can see, I opened all required ports.
Here is my sip.conf file
[general] context=main-context ; Default context for incoming calls. Defaults to 'default' allowguest=no ; Allow or reject guest calls (default is yes) allowoverlap=no ; Disable overlap dialing support. (Default is yes) udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all) limitonpeers=yes tcpenable=no ; Enable server for incoming TCP connections (default is no) tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) transport=udp ; Set the default transports. The order determines the primary default transport. srvlookup=yes ; Enable DNS SRV lookups on outbound calls nat=route ; in SRV records externip=184.108.40.206 externaddr=220.127.116.11 ; use this address. limitonpeers=yes; may override the address/port information specified in the SIP/SDP messages, [authentication] [managers-phones](!) type=friend context=main-context secret=123 host=dynamic qualify=yes nat=route canreinvite=no callgroup=1 pickupgroup=1 dtmfmode=auto disallow=all allow=alaw allow=ulaw allow=g729 allow=g723 allow=g722
Here is log SIP log of such call
RTP packets are sent only to my mobile phone and not back.
Sent RTP P2P packet to 18.104.22.168:49232 (type 08, len 000160) Sent RTP P2P packet to 22.214.171.124:49232 (type 08, len 000160) Sent RTP P2P packet to 126.96.36.199:49232 (type 08, len 000160) Sent RTP P2P packet to 188.8.131.52:49232 (type 08, len 000160) Sent RTP P2P packet to 184.108.40.206:49232 (type 08, len 000160) Sent RTP P2P packet to 220.127.116.11:49232 (type 08, len 000160)
Of course over VPN it works perfectly.
Please suggest what should I check or maybe I missed something.
Thanks in advance.