* Change the assigning dsp_resource to start with one and increase
after usage and not before usage (so it becomes the next free
port).
* Subtract one from dsp_port after we have selected the path. In the
longer run I should make dsp_resources zero based all the way.
Instead of assuming which endpoints are blocked there is now a VTY
command to block those. Clean up the init of the trunks, the only difference
between Virtual and E1 is in the way to calculate the start port.
Reduce the number of endpoints to 32, 31 is the last one that can be
used on the E1 trunk, otherwise we move into TS 0 of the following trunk.
The endpoint offset is needed for two reasons, first the API is 0
based here while we are normally 1 based, second because of the trunks
the first usable endpoint would be '2' (0 is CRC, 1 is signalling), but
this endpoint offset falls apart when we would block timeslots inside
this range.
Remove the endpoint offset, in each endpoint we will store the HW DSP
Port (1 based API) and then subtract one to get to the 0 based API for
the Simple API. Print a warning when someone is using the endpoint offset.
Instead of hardcoding which timeslot is blocked we will just
use the blocked flag in an endpoint. This should fix call
handling for CIC on the trunk config.
Right now for the virtual trunk 0x0 and 0x1F is blocked, for the
E1 like interface we have 0x0 and 0x1 blocked. This should start
to be configurable in the future.
Configure the routing of audio ports if mgcp_mgw is configured
to do this. This allows to have multiple trunks, make virtual
ports go to a specific trunk as well.
With this commit we can have more than 30 endpoints that will work. We
ignore the blocked endpoints 0x1 and 0x1f for each trunk and calculate
everything from the right start point.
* Upstream has a separation of BTS and NET side for RTP ports and
can allocate them dynamically.
* Upstream has gained the concept of trunks. We will now have various
trunks to connect audio things.
* We will now be able to utilize multiple trunks and have the endpoints
used properly.
Send a dummy packet on each MDCX message. This assumes
that the remote address is available by then and this
should fix not hearing the ringtone as the NAT didn't
know to which port to forward the data.
Work more like the other mgcp gateway and first allocate the config
and then apply the setting on it.. The next step will be to move to
the real vty code minus some bits.