I’m running with Asterisk 17.3 but I think this could be a generic question:
How can I set up multiple media addresses for one endpoint (with pjsip)?
The case is A -> Asterisk -> B.
Four ports will be consumed by one call (RTP and RTCP, for both leg with A and leg with B)
Those ports won’t be released until the call is over. Therefore, if the mean holding time (MHT) is pretty long (e.g. on ravage one call will last for 1/2 hour let’s say), it will limit the Asterisk capacity due to the lack of RTP ports.
Let’s say if I set up RTP port range from 10000 to 65535, the max number of simultaneous call will be about 13880 (4 ports for one A->Asterisk->B call). I assume 20 calls come in per second (20 CAPS) and the calls are supposed to last longer than 30 minutes, then the media ports will be used out after about 12 minutes. Unless any existing call is ended, the new originated calls will be rejected with error “Oh dear… we couldn’t allocate a port for RTP instance”
To increase the Asterisk capacity, I’m using “bind=0.0.0.0:5060” in pjsip.conf, and there’re 2 IP assigned to one NIC. Theoretically if Asterisk can use both of them as media IP, it will double the capacity (putting other limitations aside) . However, test result shows me that all media packets only go with the default IP.
I’m wondering whether it is possible to bind 2 IPs for media stream?
Thanks in advance.