aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_mgcp_utils.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-03Rename bsc_nat -> osmo-bsc_nat and bsc_mgcp -> osmo-bsc_mgcpHarald Welte1-764/+0
This now enforces a unique structure: All of our main daemon programs start with an "osmo-" prefix.
2011-02-28mgcp: Introduce a mgcp_trunk_config enum for endpoint configsHolger Hans Peter Freyther1-12/+12
We want to support real trunks in the MGCP code and we need to have some better book keeping for those. Move the code around.
2011-02-27nat: Change number of multiplexes to the max-endpointsHolger Hans Peter Freyther1-4/+25
2011-02-26nat: Allocate endpoints from multiple multiplexes.Holger Hans Peter Freyther1-6/+26
This code allocates endpoints from multiple multiplexes but will always leave 0x0 and 0x1f unassigned in the multiplex.
2011-02-26nat: Start making the number of multiplexes configurableHolger Hans Peter Freyther1-1/+2
Introduce a VTY setting that right now needs to be set to one. To make updating this setting possible we will now store the number of endpoints in the bsc connection as well.
2011-02-26nat: Allocate the endpoint status dynamicallyHolger Hans Peter Freyther1-7/+24
Allocate the status for an endpoint dynamically. We will support BSCs with different amount of multiplexes and need to have this flexibility in the future. Add the proper null checks to the current users of this code.
2011-01-07ipa: Only use one IPA number for Osmo extensionsHolger Hans Peter Freyther1-2/+2
Instead of using more numbers from the proto range we will use the 0xee and then have a mini header with our new proto id in there. For a start rename the use types to _OLD.
2011-01-01License change: We are now AGPLv3+ instead of GPLv2+Harald Welte1-6/+5
The reason for this is quite simple: We want to make sure anyone running a customized version of OpenBSC to operate a network will have to release all custom modifiations to the source code.
2010-11-04nat: Verify that the endpoint from the assignment command existsHolger Hans Peter Freyther1-1/+8
Make sure that the MSC endpoint exists on the NAT, otherwise we end up trying to free this endpoint when the SCCP connection is taken down and will corrupt our memory. This issue started to pop up as we have reduced the number of endpoints to 60 to allow transcoding on them.
2010-10-13ipaccess: Put our extensions to the protocol into the same enumHolger Hans Peter Freyther1-2/+3
Rename NAT_IPAC_PROTO_MGCP to IPAC_PROTO_MGCP and place it in the enum. We need to be prepared to change this number if IPA is ever going to use it for something else.
2010-09-20nat: Send a transcoder reset on start up.Holger Hans Peter Freyther1-0/+9
The transcoder RESET is using the same extensions to reset all endpoints on a remote site. This makes sure that all allocations can be made in a properly configured network.
2010-09-20nat: Keep the audio name and default payload aroundHolger Hans Peter Freyther1-5/+0
For all forwarded messages this will not be used, but it is of use for the transcoding.
2010-09-20nat: Use the write_queue inside the CFG.Holger Hans Peter Freyther1-38/+39
2010-09-20nat: NULL check the allocation and print a nice warning.Holger Hans Peter Freyther1-0/+6
2010-08-30nat: Replace the MGCP Endpoint if that is requiredHolger Hans Peter Freyther1-4/+33
Add code to replace the Endpoint number for the mgcp.
2010-08-30nat: Use different static transaction numbers for the DLCX/MDCX messageHolger Hans Peter Freyther1-1/+1
2010-08-30nat: Document that the MDCX message is not implementedHolger Hans Peter Freyther1-0/+2
2010-08-29nat: Send the right MDCX down the streamHolger Hans Peter Freyther1-3/+3
2010-08-29nat: Remove the code that is wrongly placed..Holger Hans Peter Freyther1-9/+0
i refers to the MSC side of endpoints and not the BSC..
2010-08-29nat: Close the right endpoint down the stream.Holger Hans Peter Freyther1-1/+1
2010-08-29nat: Attempt to assign the BSC Timeslot based on a free listHolger Hans Peter Freyther1-2/+50
Do attempt to not reassign an endpoint immediately but go to the next free one.
2010-08-29nat: Remove the CRCX value from the natHolger Hans Peter Freyther1-4/+1
Assume that if the MSC has assigned a timeslot/multiplex it will also be used for the MGCP. So we just assume that it was allocated on the BSC as well... in the worse case we will send a DLCX downstream but it should be fine.
2010-08-29nat: Reindent the code, no functional changeHolger Hans Peter Freyther1-20/+20
2010-08-29nat: Make the code work in terms of endpoints instead of timeslot/multiplexHolger Hans Peter Freyther1-16/+14
We are going to have more than one trunk, so all code hardcoding the multiplex to zero must go. Avoid this kind of problem by saving the MGCP endpoint number and comparing that.
2010-08-29nat: Use the bsc_timeslot when talking to the BSC downstreamHolger Hans Peter Freyther1-3/+4
2010-08-06nat: In case the downstream fails on a CRCX, ask it to do a DLCXHolger Hans Peter Freyther1-4/+33
If the CRCX is failing, we will send a DLCX downstream and the next time the callagent tries to do a CRCX we will be more lucky. This is for the case where we have an endp allocated.
2010-08-06nat: Use the state information for the callback.Holger Hans Peter Freyther1-2/+2
2010-08-06nat: Keep the state (CRCX,MDCX,DLCX) of the operation..Holger Hans Peter Freyther1-0/+4
This will allow to have additional debug information and to use the state inside the forwarding code.
2010-08-06nat: Free the endpoint when we get an empty CI.Holger Hans Peter Freyther1-0/+7
In case the BSC is sending us an empty/unused CI we have a bug, but for now let us free the endpoint and figure out which response we are getting.
2010-08-06mgcp: Make the CI uint32_t all the way to avoid mismatchHolger Hans Peter Freyther1-3/+3
2010-08-06nat: Provide information of when a msg does not contain a CIHolger Hans Peter Freyther1-2/+7
When we fail to find a CI in a message that should contain it then print the message so we can analyze the issue and improve the code later on.
2010-08-05nat: Use the mgcp_config_alloc to have defaults initializedHolger Hans Peter Freyther1-0/+8
Initialize the net_base properly and benefit from future config changes but also reset certain defauls that we do not want at the nat.
2010-08-05mgcp: Attempt to separate the RTP/RTCP port for the Network and for the BTSHolger Hans Peter Freyther1-3/+3
We plan to have two different ports for the network and for the BTS to avoid detecting the BTS and to dynamically allocate the port to have old data not go to a new socket.
2010-08-05mgcp: Group the state for bts/net into a struct and have two instancesHolger Hans Peter Freyther1-1/+1
Group the data that each end (network/bts) have into a struct and use this struct throughout the sourcecode.
2010-08-05nat: Fix the spelling of that comment.Holger Hans Peter Freyther1-1/+1
2010-08-03Use new include paths of libosmo-sccp 0.0.2Harald Welte1-1/+1
2010-07-31nat: Fix compilation with nat not being enabled.Holger Hans Peter Freyther1-0/+1
common_vty.c was including bsc_nat.h which tried to get the sccp/sccp_types.h which is not required to be installed. Move all structs using/embedding SCCP structures into the bsc_nat_sccp.h and include. This should fix the compilation.
2010-07-23nat: u_int16_t -> uint16_tHolger Hans Peter Freyther1-2/+2
2010-07-23nat: u_int8_t -> uint8_tHolger Hans Peter Freyther1-3/+3
2010-06-17nat: Count the number of dropped SCCP and MGCP calls as well.Holger Hans Peter Freyther1-0/+8
Count the number of dropped calls and lost SCCP connections due the loss of a connection to the BSC...
2010-06-15nat: Do not use the bssap.h include as it does not exist in this branch.Holger Hans Peter Freyther1-1/+1
2010-06-15nat: Fix memory leak... in MGCP forwardingHolger Hans Peter Freyther1-0/+1
The code needs to be refactored but this is fixing the leak for now. We used to forward everything to the BSC but now we handle the DLCX locally and this means we need to clear the patched message. We should refactor it to not generate the patched msg until a lot later.
2010-06-15nat: Release the transaction id earlier, always reset the BSCHolger Hans Peter Freyther1-6/+8
In case we can not find the SCCP connection we still want to free any pending transaction ids and reset the BSC inside the endpoint. In most cases this should be already done when the SCCP connection or the whole BSC is gone.
2010-06-15nat: Attempt to clarify the text inside the log message.Holger Hans Peter Freyther1-1/+1
2010-06-15nat: Only send DLCX when we have send a CRCX to the BSC on this endpointHolger Hans Peter Freyther1-1/+3
2010-06-15nat: Use hex for the endpoint namesHolger Hans Peter Freyther1-2/+2
2010-06-15nat: Change MGCP DLCX handling and send dummy MDCX to the BTS.Holger Hans Peter Freyther1-31/+94
When setting a new MSC timeslot to a SCCP connection check if any of the existing connections have this timeslot, if so we will send a DLCX down the stream to make sure it is closed there, when we will CRCX this new timeslot we will happily reallocate it. When the SCCP connection goes away, or we get a DLCX from the network, or the BSC is gone we will send a DLCX message down the stream as well. When we receive a CRCX from the network we will forward the CRCX as usual and send a dummy MDCX after it. For the DLCX and the dummy MDCX we send a custom MGCP message that will not provoke an answer. Even if the downstream MGCP GW will answer we will ignore it due the dummy transaction id that is not used anywhere else. This change should make sure that we close the dowstream endpoint all the time, even when the DLCX arrives after the SCCP connection is torndown.
2010-06-15[nat] Reword warning when we had a pending transaction and forget about it.Holger Hans Peter Freyther1-2/+2
2010-06-15nat: Clear the connection on a DLCXHolger Hans Peter Freyther1-0/+1
We can forget about the timeslot/multiplex when getting the DLCX. This way we make room for the next connection that might need to reuse this address.
2010-06-15nat: Return the SCCP Connection again...Holger Hans Peter Freyther1-11/+11
We will reset the multiplex in a DLCX message and then we can reset the multiplex as well...even if the MGCP connection is staying open. or at least this is a theory. The MSC likes to leave a connection open during CallControl when hanging up early enough in the process.