0
votes

I was implementing a sip client for android and i installed Asterisk SIP server(installed in windows 2003 server).Testing with JITSI client.But problem is "able to communicate when both clients are in LAN" Where as if i try to call a client from out side the LAN or through wifi, I'm able get the call but not able to hear the voice on both sides.

-I have enabled ports 5060 in fire walls too

1

1 Answers

0
votes

port 5060 is for SIP Messages communication only. The media (audio) is going through RTP packets, which go through their own ports.

Check out in your asterisk rtp.conf file the RTP port-range (if I am not mistaken the port-range is 10000-20000 by default). You have to also open that port range in your firewall settings.

Update:

it will always work in the LAN, because that port range is enabled by default in Asterisk. It won't work if any of the devices is outside of the LAN (and the port range is not opened in the firewall), because the ports defined in the SDP bodies won't be accessible.