I’m thinking about using a single box to host several Asterisk instances, each having a single trunk with an ITSP to access the PSTN.
To properly use my pool of public IPv4 addresses 5I’ll probably start with a single IP address for up to 5 Asterisk instances), I wonder how many ports I should allocate for RTP in each Asterisk instance.
For example, for a 10 or a 100 simultaneous calls system, how many ports would you allocate ?
What could be the issue if a given UDP port is very often reused for RTP traffic in successive calls ?
On Tuesday 05 November 2024 at 18:22:00, oliv2831 via Asterisk Community
wrote:
Hello,
I’m thinking about using a single box to host several Asterisk instances,
each having a single trunk with an ITSP to access the PSTN.
Out of interest, why several Asterisk instances? Why not one Asterisk
instance with mutiple ITSP connections?
To properly use my pool of public IPv4 addresses 5I’ll probably start with
a single IP address for up to 5 Asterisk instances), I wonder how many
ports I should allocate for RTP in each Asterisk instance.
I would not deviate from the standard 10000-20000 range for RTP.
For example, for a 10 or a 100 simultaneous calls system, how many ports
would you allocate ?
Assuming that by “call” you mean one channel in and one channel out, simply
multiply your numbers by two to find out how many RTP ports you need.
That’s a very different question from “allocating” ports, though. Even for a
simply Asterisk instance expecting only one inbound and one outbound channel
at any given time (ie: one “call”) I would still allocate the entire range
10000-20000 for RTP.
What could be the issue if a given UDP port is very often reused for RTP
traffic in successive calls ?
I cannot think of anything inherent to either Asterisk or the Linux kernel
which would have a problem with this; the only possibility I can think of is
some external NAT device, and (a) I wouldn’t use NAT when you’re starting from
multiple public IPs on one machine anyway, and (b) if your NATting router has
this sort of a problem, I wouldn’t use it at all for UDP.
Antony.
–
The next sentence is untrue.
The previous sentence is true.
Supposing a UDP NAT timeout valued to 300s, and an average call duration of 60s call, I’ll experiment with dimensionning 5 times the number of RTP ports needed by simultaneous call number (which is 2 ports per call).