Restrict RTP ports


#1

I have asterisk working great on my LAN but cannot open the necessary RTP ports on my ISA firewall server to get to the outside world. (I must open each port manually). Idealy, I would like to reduce the number of RTP ports in use.

I noticed in rtp.conf that I can limit the range of RTP ports. So:

  1. How many ports will I need for a home with 3 phones (and two external phone “lines”).
  2. If I restrict the RTP port range to 10000-10005, does this mean that my asterisk server will only use these RTP ports for outgoing, but an external host may still try to contact my server on any port between 10000-20000 if the call is initiated externally?

#2

Asterisk will use a port in that range, and will ask the other end to send audio to that port too.


#3

I setup my RTP.CONF to use only 10000-10005, and as expect incoming calls use those ports.

However, when I try to connect to FWD my firewall shows blocking of ports to 12775 on the destination. Is this because FWD’s RTP port specifies a different range?

In other words, does RTP.CONF only specify INCOMING port ranges, but the other end determines their own INCOMING port range?

Thanks,
Mike


#4

hmmm, you’ve got me thinking there… i guess it will use those ports for the incoming audio, the outgoing audio will be set by the receiving part.

(Sounds the most logical to me, didnt browse any sources for this answer).