aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-04-05nat: Logging improvement for the nat.Holger Hans Peter Freyther4-3/+7
Print some more information, e.g. when a BSC is connected and authenticated, print the SCCP ref number.
2010-04-05[mgcp] Reduce this to a debug message...Holger Hans Peter Freyther1-1/+1
This message can get in the way during a re-establishment of the MSC connection while the MSCs gateway is still sending data to us.
2010-04-05bsc_msc_ip: Verify that the sccp connection is present.Holger Hans Peter Freyther1-1/+2
The SCCP might have been freed by the error case already so we need to check this one for zero.
2010-04-05nat: Print the MSC multiplex as wellHolger Hans Peter Freyther1-2/+4
2010-04-05nat: Remember where the BTS is listening for things.Holger Hans Peter Freyther3-1/+31
Extract the port from the BSS's MGCP Gateway so we know where to forward the data to.
2010-04-05nat: No need to match \r\n when parsing the C: NHolger Hans Peter Freyther1-1/+1
2010-04-05[mgcp] Use a different port to more easily differentiateHolger Hans Peter Freyther1-1/+1
2010-04-05[mgcp] Print the BTS IP addr of the endpoint.Holger Hans Peter Freyther1-2/+3
2010-04-04nat: Remove the broken empty line check, follow \n vs \r\n of inputHolger Hans Peter Freyther2-9/+23
Instead of checking the token for NULL we need to check if running was set to null. Look at the data of the token and check if the line was ending with a \r\n or \n and then when rewriting a line use that line ending as well. Add a new test for that.
2010-04-04[mgcp] Start to look into the MGCP messages and extract the CIHolger Hans Peter Freyther1-11/+17
we will need the call identifier for the MDCX and DLCX message for now we were just assuming it would increment, use som python to extract the CI from a possible response, also switch back to a blocking read to test the BSC nat.
2010-04-04[ipa] When including MGCP our messages might be bigger than 300 byteHolger Hans Peter Freyther1-1/+1
The length field of the IPA header allows to have 16bit numbers and I just ran into the 300 byte limit with MGCP messages. Make it three times the size and see how long this is going to be enough.
2010-04-04nat: Use a ptr that was allocated by tallocHolger Hans Peter Freyther1-1/+1
The endp is part of an array allocated by talloc and simple array members do not qualify as a context start address.
2010-04-04nat: Make rewrite work on string, read to a string first, copy to msgbHolger Hans Peter Freyther3-24/+25
The MGCP protocol parsing is adding '\0' to make sure we do not parse beyond where we should parse. This does not mix with strtok or similiar routines. For now we will read the msg into a global array first, then copy it to the msgb for mgcp protocol handling and if we are required to forward it to the MGCP we have a untouched copy we will modify into our own msgb.
2010-04-04[mgcp] Set the right variable to NULL otherwise we get a double freeHolger Hans Peter Freyther1-1/+1
2010-04-04[mgcp] Fix the transaction id of the AUEP requestHolger Hans Peter Freyther1-1/+1
2010-04-04bsc_msc_ip.c: Fix crash for the hexdump during writing..Holger Hans Peter Freyther1-1/+1
we need to set the msgb l2h to the right position otherwise when trying to dump it we will have a nice crash.
2010-04-04bsc_msc_ip.c: Fix the reading of data...Holger Hans Peter Freyther1-1/+1
len contains the actual length of the message and data_len contains the size of the message. We want to read up to data_len and not up to 0 bytes.
2010-04-04bsc_msc_ip.c: Use another kernel feature to bind to a random portHolger Hans Peter Freyther1-8/+2
2010-04-04bsc_msc_ip.c: Use strerror to print the errno variable.Holger Hans Peter Freyther1-2/+2
2010-04-04Revert "bsc_msc_ip: Use the autobind functionality of the kernel"Holger Hans Peter Freyther1-1/+18
The autobind is not working as I wanted it to work. So we will revert this for now and then try something else. This reverts commit fd876b7488a8ae924f1a09144265d4474495408f.
2010-04-02nat: Check the authentication bit later...Holger Hans Peter Freyther1-6/+12
When moving it up here the code started to reject the identity responses of the bsc and we would never authenticate. Move it back down.
2010-04-02bsc_msc_ip.c: Return after having freed the msgbHolger Hans Peter Freyther1-2/+7
When reading MGCP is failing (e.g. because the udp socket is not connected yet) we would have freed the msgb but we didn't return and then executed msgb_put on a dead buffer.
2010-04-01nat: Return MGCP messages to the call agentHolger Hans Peter Freyther4-0/+116
Attempt to find the message by transaction id, then patch the response and use the IP/PORT of the local network, update the ci with the one from the BSC. This is currently not tracking any state of the MGCP and will not handle two bsc's... this will need to happen later. With this in we should be feature complete and now enter the mode of making all of this work reliable and fixing thinko's and other bugs.
2010-04-01nat: Allow to send MGCP messages from the BSC to the networkHolger Hans Peter Freyther2-0/+15
2010-04-01nat: Handle CRCX/MDCX/DLCX at the natHolger Hans Peter Freyther4-32/+146
* Forward a rewritten msg to the BSS. We change the IP and port to point to the NAT instead of the core network. We also keep track of the BSC and the transacition id. * Handle the case where we have not found a SCCP connection and need to send a response ourselves.
2010-04-01[mgcp] Look at the bts addr set at the endpointHolger Hans Peter Freyther1-1/+3
This will allow to discover the ports of a bts when we only know the addr and have multiple bts's to handle.
2010-04-01nat: Test rewriting of MGCP messages to patch ip and portHolger Hans Peter Freyther4-0/+152
Add code to change the ip and port for audio data inside MGCP messages. This is needed because the BSS might be behind the NAT and can not reach the network directly and might be behind a nat so the announced sourceport is not the one as we see it.
2010-04-01nat: Add code to find a BSC connection by the given msc multiplexHolger Hans Peter Freyther3-2/+62
2010-04-01[mgcp] Export header parsing via mgcp internalHolger Hans Peter Freyther2-14/+21
This will be used by the NAT code to implement custom protocol handling on top of that.
2010-03-31[mgcp] Do not operate on the ->data pointer, use ->l2h insteadHolger Hans Peter Freyther1-4/+4
This would have been broken once we attempt to parse encapsulated MGCP messages.
2010-03-31bsc-msc: Flush the write queue when we have lost the connectionHolger Hans Peter Freyther1-0/+1
2010-03-31nat: First go at handling MGCP inside the natHolger Hans Peter Freyther3-0/+117
Listen on the MGCP gateway port and let our protocol stack handle everything for now. We will need to have some more control over things though.
2010-03-31[mgcp] Degrade verbosity to debugHolger Hans Peter Freyther1-1/+1
2010-03-31nat: Add an example configuration for the BSC NAT with MGCPHolger Hans Peter Freyther1-0/+9
2010-03-31[mgcp] Add a new config option to set the call agent ip addrHolger Hans Peter Freyther2-0/+15
In the case of the nat we only want to communicate with one upstream call agent and this can now be configured.
2010-03-31[mgcp] Regroup struct mgcp_cfg members and provide some hintsHolger Hans Peter Freyther1-4/+10
2010-03-31[mgcp] Add a helper function to convert from GSM0808 ts/mux to MGCP endpointHolger Hans Peter Freyther2-3/+9
Move the conversion of GSM0808 timeslot and multiplex from the bssap.c into the mgcp.h so it can be reused by multiple users. The weird math comes from the mapping of the MSC...
2010-03-31nat: In the case of losing the MSC, reset all endpointsHolger Hans Peter Freyther4-0/+14
When losing the SCCP connection make sure that we free all endpoints. The disconnection of the BSC should already make sure they are closed but this makes sure everything is properly reset.
2010-03-31nat: bsc_mgcp_clear is called from within the remove functionHolger Hans Peter Freyther1-4/+1
No need to call it twice... All endpoints should be properly freed as part of the SCCP disconnection.
2010-03-31bsc_msc_ip: Use the autobind functionality of the kernelHolger Hans Peter Freyther1-18/+1
We do not care about the source port for the callagent relay and can use the autobind functionality of the kernel to pick a port for us...
2010-03-31bsc_msc_ip: Create a local UDP socket and relay MGCP messagesHolger Hans Peter Freyther1-5/+144
Attempt to bind to the local callagent port and send messages from the MSC TCP connection to the MGCP and do it the otherway around as well.
2010-03-31[nat] Send a RSIP down to the BSC after it connectsHolger Hans Peter Freyther2-1/+43
Make sure the MGCP attached to the BSC is resetting all endpoints whenever the BSC is connecting to us as we assume that all endpoints are available.
2010-03-31[mgcp] Handle the RSIP with resetting all endpointsHolger Hans Peter Freyther1-0/+24
We could change that the message came from a special ip address/port to secure this service in general but we don't do that right now.
2010-03-31[mgcp] Add some parsing for RSIP messages coming inHolger Hans Peter Freyther2-0/+13
This will just call a callback and leave all the handling to the application.
2010-03-31[mgcp] Remove unused method from the mgcpHolger Hans Peter Freyther1-6/+0
This was removed when sending the RSIP was removed from the code.
2010-03-31[mgcp] Switch from DEBUG to LOGP in the mgcp_main.cHolger Hans Peter Freyther1-2/+2
2010-03-30[mgcp] Remove the sending of RSIPHolger Hans Peter Freyther3-31/+0
This message is ignored by the call agent and we were sending this on the first request which we maybe should not ignore...
2010-03-30nat: Add MGCP code and parsing to the nat code..Holger Hans Peter Freyther4-1/+14
For the nat we will have NAT and MGCP in the same process and this commit starts with that. We are linking in the MGCP code and one can embed MGCP config snippets...
2010-03-30[mgcp] The networking code needs a source addrs..Holger Hans Peter Freyther1-0/+5
Make the source address mandantory and complain about complain when it is missing. The address is mandantory as it needs to be put into the MGCP messages...
2010-03-30[mgcp] Move mgcp init into the main method...Holger Hans Peter Freyther2-12/+15