aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2015-10-12osmux: Remember the allocated CID and make sure it is releasedHolger Hans Peter Freyther5-9/+30
There appears to be a leak of CIDs: <000b> mgcp_osmux.c:544 All Osmux circuits are in use! There are paths that a CID had been requested and never released of the NAT. Remember the allocated CID inside the endpoint so it can always be released. It is using a new variable as the behavior for the NAT and MGCP MGW is different. The allocated_cid must be signed so that we can assign outside of the 0-255 range of it. Fixes: OW#1493
2015-10-12osmux: Enforce Osmux only global and per BSC configurationHolger Hans Peter Freyther2-10/+44
Extend the osmux only setting from the MGCP MGW to the NAT. This is applied when an endpoint is allocated and/or when the allocation is confirmed by the remote system. Not tested. The impact should only be when the new option is being used. Fixes: OW#1492
2015-10-12osmux: Allow to enforce using Osmux for the clientHolger Hans Peter Freyther3-14/+41
Some systems only want to use Osmux. In case only Osmux should be used fail if it has not be offered/acked. Client: Verified On, Off and Only with X-Osmux: 3 and without this field. <000b> mgcp_protocol.c:823 Osmux only and no osmux offered on 0x14 <000b> mgcp_protocol.c:884 Resource error on 0x14 NAT: Not tested and implemented Fixes: OW#1492
2015-10-12osmux: Add introspection for osmux.Holger Hans Peter Freyther1-0/+3
* Print number of used CIDs for the system * Hopefully this is just the beginning
2015-10-12osmux: Do not divide the number of bytes by eight.Holger Hans Peter Freyther2-3/+3
sizeof(uint8_t) == 1 and there is no need to create an array with 16 bytes and then only use the first two of them. This means the CID range is from 0 to 127 and we should be able to extend this to 256 by changing the array size to 32. Update the testcase now that we can have more than 16 calls with Osmux.
2015-10-12osmux: Test cid allocation and de-allocationHolger Hans Peter Freyther3-0/+41
* Test that one can get an id * That they are assigned predicatble right now * That returning them will make the number of used ones go down * That allocating more will fail
2015-10-12libmsc: Use RAND_bytes to generate a tokenDaniel Willmann1-1/+4
[hfreyther: Add cast to uint8_t to fix compiler warning]
2015-10-12libmsc: Use RAND_bytes to choose auth tupleDaniel Willmann1-3/+8
[hfreyther: Fix compiler warning about unused variable]
2015-10-12gprs: Use RAND_bytes for p-tmsiDaniel Willmann3-2/+8
[hfreyther: Link to libcrypto, include header, add uint8_t* cast]
2015-10-12libmsc: Use RAND_bytes when choosing a tmsiDaniel Willmann6-6/+11
Require openssl version to be >= 0.9.5 because we rely on the RAND_bytes return value. [hfreyther: Add cast to uint8_t*]
2015-10-08mgcp: Indicate where the sending failedHolger Hans Peter Freyther1-2/+6
The log message does not help and says where the data is being sent to. This is because we have both a RTP and RTCP port. Remember if we failed with RTCP or RTP and improve the log message. I was searching a case where the port was bound to a local address (e.g. 127.0.0.1) and tried to send the data to a public one (e.g. 8.8.8.8).
2015-10-07Add OAP design document.Neels Hofmeyr1-0/+250
Sponsored-by: On-Waves ehf
2015-10-07gsup: factor out header composition & sending.Neels Hofmeyr1-3/+9
Move IPA header composition and sending to new static gsup_client_send() (so I can use it in the upcoming OAP code). Sponsored-by: On-Waves ehf
2015-10-02amr: Attempt to unbreak the AMR support in the BSCHolger Hans Peter Freyther3-13/+27
The signature of mr_config and the BSC implementation didn't match and the compiler was warning about it: osmo_bsc_api.c:530:2: warning: initialization from incompatible pointer type .mr_config = bsc_mr_config, ^ osmo_bsc_api.c:530:2: warning: (near initialization for ‘bsc_handler.mr_config’) Change the mr_config again and provide an implementation that will set the ms and bts data structure. It would be better to put the size outside of the IE but I am not going to change it right now. It would also be nice to either move the AMR setting into the "nitb" structure or have the msc data be used _after_ the bts settings. This needs to be cleaned up in the next step. Manually verified by placing a MO call and checking that both the channel mode modify and the mode modify request contain the multi rate config with the rate mr config (length two bytes, version 1, icmi==1, no start mode being set).
2015-10-02amr: Kill more duplication and let the code work one of the modesHolger Hans Peter Freyther1-34/+25
2015-10-02amr: Instead of putting ms/bts into the same struct.. use it twiceHolger Hans Peter Freyther5-44/+31
This way a lot of if/else can just be killed by the caller deciding which of the two instances to use. I have copied both branches to new files, replace bts for ms in one of them and ran diff on it. There is no difference.
2015-10-02amr: Remove some code duplication in preparationHolger Hans Peter Freyther2-15/+18
Merge two copies into a local static helper function. The format of the message will change and then it is easier to modify it in one place than in two. Sadly the original patch was merged before this clean-up so do the clean-up as second step. Conflicts: openbsc/src/libbsc/abis_rsl.c openbsc/src/libbsc/gsm_04_08_utils.c
2015-09-24sgsn_main: in -h, print default config fileNeels Hofmeyr1-1/+1
2015-09-24vty: Change the return type from enum to intHolger Hans Peter Freyther7-7/+7
clang complained that different enums are mixed with the return type and we actually want this to be an int now.
2015-09-24gbproxy: Add quirk commands to allow upgrade from pre-releaseHolger Hans Peter Freyther3-1/+99
The pre-release didn't add a newline after the apn and the patching pattern command. Create a quirk command that combines both. The pre-release didn't include a differentation between routing and patching. The TLLI handling has a different and more generic name now. Make it handle the old one that is actively used. Add a file with the broken format and the standard config file test should pick it up.
2015-09-23bsc_nat: Fix 1 log error output of wrong variable.Neels Hofmeyr1-1/+1
2015-09-22Add full AMR multirate IE support with VTY config for MS and BTS sideAndreas Eversberg9-42/+474
2015-09-15osmo-nitb: obsess about --help formatting.Neels Hofmeyr1-13/+13
Make every line use same punctuation style ('.' at the end and start in caps). Insert spaces to have all help texts in a column.
2015-09-15openbsc/configure.ac: check for pcap/pcap.h.Neels Hofmeyr1-0/+1
The build process requires pcap/pcap.h in openbsc/src/utils/meas_pcap2db.c, but the configure script did not check for that file.
2015-09-14mncc: Use the default codec from the built-in mncc modezecke/features/rtp-bridgeHolger Hans Peter Freyther3-6/+14
In case of the RTP bridge mode we need to select the codec ourselves. Rely on the same (incomplete) codec selection that can be done using the mncc-int configuration node. This might gain bearer capabilities support. In case of a SDCCH a TCH/F will be attempted to be assigned. This is an open issue for both modes and there should be a preference for full or half-rate channels somewhere.
2015-09-14mncc: Implement CRCX->MDCX for handover for direct rtp modeHolger Hans Peter Freyther2-6/+29
Implement sending MDCX on the newly allocated channel and send the data to the same destination as the currently connected one. This way the receiver can implement RTP RFC Appendix A.1 and deal with the new source.
2015-09-14mncc: Implement the direct RTP mode for ip based systemsHolger Hans Peter Freyther2-0/+217
For the LCR rtp-bridge audio should directly flow to the remote system. In contrast to the original patch audio will now flow directly from the BTS to the remote system. This assumes that BTS and the remote system are in the same network segment and can directly communicate. There are various limitations in the first iteration of the implementation: We could (and in the future) should delay the assignment but currently we are forced to pick the channel and move it to the audio state. In case we are located on a SDCCH we always need to change but if we are on a TCH we could send the ipa.CRCX and change the audio state a lot later. The net effect is that the audio codec selection needs to be done in the NITB code and not in the system connected to it. This only works with ip based systems. For E1 systems one could still use the RTP socket or even try to move this out of the process. There is no code for handover handling and it relies on the remote system dealing with the SSRC change of the system.
2015-09-14mncc: Update the protocol to match LCRHolger Hans Peter Freyther2-1/+16
This adds the protocol definition for the RTP bridge extension of Andreas Eversberg and bumps the protocol version. I added the missing mncc mappings from value to string. [ 5cf8fb10ea3addcae74d37f4dbf1c1be664df53e protocol extension 5dac90de38990b188f499c602bf18a4f232070e8 payload extension]
2015-09-14msc: Add channel information to the meas_feed, bump version to v1.Alexander Chemeris2-1/+22
2015-09-07osmux: fix show online-helpPablo Neira Ayuso1-1/+1
Before: <command id='osmux dummy (on|off)'> <params> <param name='osmux' doc='RTP multiplexing' /> <param name='dummy' doc='Enable dummy padding' /> <param name='on' doc='Disable dummy padding' /> <param name='off' doc='(null)' /> </params> After: <command id='osmux dummy (on|off)'> <params> <param name='osmux' doc='RTP multiplexing' /> <param name='dummy' doc='Dummy padding' /> <param name='on' doc='Enable dummy padding' /> <param name='off' doc='Disable dummy padding' /> </params> </command> Note the 'null' string in 'off'. Reported by Holger.
2015-09-04mgcp: Fix grammar, clean-up return codesHolger Hans Peter Freyther1-7/+6
Mike's patch included clean-ups I want to apply separately and change them a bit. If we return from an else we don't need to put the else. * Try the E1 trunk first * Then try a local virtual trunk * Fail if none of the above returned
2015-09-04mgcp: Remove use of hardwired @mgw from endpoint IDs.Michael McTernan1-1/+1
Remove the host portion of the endpoint Id. This requires less configuration and we are probably fine to trust that MGCP only received messages designated for it.
2015-09-04system_information.c: Distinguish two previously identical log msgsHarald Welte1-2/+2
2015-09-04Fix neighbor channel list generation for 1900 MHz PCS bandHarald Welte1-3/+3
In the 1900 MHz PCS band, we always generated neighbor cell lists consisting of only a single neighbor cell, rather than al the configured BTSs.
2015-08-20mgcp: Allow to bind to different ports for net/bts portsHolger Hans Peter Freyther4-0/+75
When using multiple interfaces on a system one can now configure which will be served for the BTS ports and which will be served for the network. The direct usage of source_addr is now only to initialize the MGCP receiving port itself.
2015-08-20mgcp: Begin to separate network and bts endpointsHolger Hans Peter Freyther4-18/+36
Make it possible to bind the call-agent to a specific IP address and the network and bts end to different ip addresses. Begin by clarifying which source ip address we want to have.
2015-08-19mgcp: Add transcoding from PCMU as wellHolger Hans Peter Freyther3-1/+36
Use the existing ulaw encode/decode to support PCMU as well. The MERA VoIP switch has some severe issues with the GSM codec and it appears easier to enable transcoding for it. The mera switch doesn't appear to cope with codec change between a SIP 180 trying and the 200 ok connection result. Inserting the codec is touching too many places. Ideally we should have the transcoding function as pointer in the struct as well but the arguments differ.. so it is not a direct way forward.
2015-08-19osmux: add option to pad the circuit with dummy messagesPablo Neira Ayuso3-0/+27
Iridium is a satellite network which operates a GPRS-like that allows you to get speeds up to 128kbit/s. However, it takes from 5 to 6 secs to get the bandwidth allocated, so the conversation is garbled during the time. This patch uses the new dummy padding support in libosmo-netif that is controlled through the osmux osmux_xfrm_input_open_circuit(). This includes a new VTY option for osmux.
2015-08-18Use 'ROUTING AREA' consistently, not 'ROUTEING AREA'Harald Welte1-1/+1
The spec unfortuantely uses both terms and has no consistent spelling, but in our logging output we can at least try to be consistent.
2015-08-18GSM/GPRS 04.08: Don't print numeric mobile identity typesHarald Welte3-33/+29
I guess none of our users knows what a mi_type=0x02 is, but most would know what an IMSI or a TMSI is. So let's use the newly introduced gsm48_mi_type_name() function to fix this.
2015-08-18GMM: fix format string compiler warningHarald Welte1-1/+1
2015-08-18GMM: Don't use DGPRS logging category from GMMHarald Welte1-2/+2
2015-08-18GMM: use MMCTXP whenever possible to include MS identity in log outputHarald Welte1-14/+17
2015-08-18LLC: Don't dispatch XID frames into GMMHarald Welte1-1/+1
For some odd reasons the XID is not a separate SAPI but has been kludged into the GMM SAPI. This means we ahve to be careful not to dispatch XID frames into GMM. We do this by introducing an explicit check for UI frames before the dispatch to GMM. The previous code already was doing "the right thing" but printed occasional messages like "gprs_gmm.c:2082 Unknown GSM 04.08 discriminator 0x01: 01 00 0e 00 32 11 03 16 01 90 63 28 0b". Those should be gone after this patch.
2015-08-18LLC: Don't feed length=0 frames to SNDCP / GMMHarald Welte1-1/+1
2015-08-18GMM: add hexdump in case of unknown pdisc/msgtypeHarald Welte1-6/+6
2015-08-18sgsn: make all SGSN timers configurable via the VTYHarald Welte3-36/+123
2015-08-17Send RADIO LINK TIMEOUT value via OML attribute to BTSAndreas Eversberg1-0/+4
The same radio link timeout value is used for BTS and MS side.
2015-08-17Add option to set RADIO LINK TIMEOUT value via VTYAndreas Eversberg4-3/+33
2015-08-17Add check for non existing lchan at tch_frame_down()Andreas Eversberg1-0/+4
Traffic cannot sent to BTS, if there is (currently) no logical channel associated with the transaction. This happens, if TCH traffic is received from upper layer, but there is no lchan available before completing immediate assignment, handover or assignment process. [hfreyther: The code has not been moved to tch_frame_down but the issue looks similiar]