AgeCommit message (Collapse)AuthorFilesLines
2013-06-19UNTESTED: support for BSSMAP RESET from MSC to BSClaforge/msc_resetHarald Welte3-2/+53
The MSC can at any time issue a RESET forcing the BSC/BSS to release all resources. We didn't handle/implement this so far. This is my first untested attempt at implementing it.
2013-06-12smpp: Only write the systemd-id if it is not emptyHolger Hans Peter Freyther1-1/+1
system_id is a char array, which makes the NULL check a tautology, so we should check with strlen if the string is empty or not. This is fixing the "write" command of VTY that would otherwise create a config file that can not be parsed.
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer24-24/+24
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-05-29vty: Print the state of all GPRS OML objects in show btsHolger Hans Peter Freyther1-0/+8
For debugging GB-proxy/IPA issues it is nice to see the state of the OML objects.
2013-05-28SMPP: Add new 'dcs_transparent' ESME settingHarald Welte3-9/+58
If an ESME has the dcs_transparent config flag, then the TP-DCS of MO-SMS is transparently passed to SMPP and not converted to SMPP specific data_coding values. This is needed in cases where ESMEs actually care about the exact TP-DCS, as the conversion from TP-DCS to SMPP data_coding is not bijective.
2013-05-28SMPP: Pass on 0xFx style DCS from SMPP to GSMHarald Welte1-17/+33
There are multiple ways how the TS 03.38 TP-DCS can indicate 8bit or 7bit messages. SMPP has it's own data coding specification, which is different from TS 03.38. However, some SMPP ESMEs want to be able to have fine-grained control over the TP-DCS indicated in the TPDU header. If such values like 0xF6 are used in SMPP, we now transparently pass them on to the GSM side.
2013-05-26SMPP: Respond with BIND_TRX_RESP to BIND_TRX, not BIND_TX_RESPHarald Welte1-1/+1
2013-05-21mgcp: Initialize the tone to CHAR_MAX as this might not be a requestHolger Hans Peter Freyther1-1/+1
The RQNT message might not contain a 'S:' line with the actual tone to play. Instead of calling the callback with the 0 as tone just leave early. Example: X: 6B9519B88F0 R: D/[0-9#*](N), G/ft, fxr/t38
2013-05-13nat: fix use after free in forward_sccp_to_btsPablo Neira Ayuso1-2/+5
valgrind detected an use after free in the path of forward_sccp_to_bts. The 'parsed' object is referenced from update_con_authorize.
2013-05-02channels: Mark channels as broken that time out on activation/releaseHolger Hans Peter Freyther1-4/+27
A channel that fails to send an ACK/NACK/REL within the four second timeout is now marked as broken. In case the release comes in late it will be ignored. The lchan should already been freed and for now we don't want to trust the channel. In the future we might want to send a "release" for a channel that got activated ack late and just set the state to none on a channel that is released acked late. The late ACK and REL has been tested with two manual tests using the fakebts. The channels remained blocked even after having received the ACK message here. The NACK case has not been manually tested.
2013-04-29Merge branch 'zecke/features/sysmobts'Holger Hans Peter Freyther3-35/+22
* This branch make the type sysmobts work. * Asssume a bsc_gsmnet variable to be defined. * This allows to use channel configurations not supported by the nanoBTS. * Manually tested with the FakeBTS and tested by users.
2013-04-29ipaccess: Remove the ipaccess_gsmnet and assume there is a bsc_gsmnetHolger Hans Peter Freyther2-8/+7
Assume that there is a bsc_gsmnet and modify the ipaccess-config to provide this symbol. If a bsc_gsmmnet is not available when linked the linker will complain and fail. E.g. give an error like this: ../../src/libbsc/libbsc.a(bts_ipaccess_nanobts.o): In function `ipaccess_sign_link_up': src/libbsc/bts_ipaccess_nanobts.c:550: undefined reference to `bsc_gsmnet'
2013-04-29sysmobts: Make the nanoBTS NM code work for the sysmobtsHolger Hans Peter Freyther1-2/+2
Use the is_ipaccess_bts method to check if this is either is nanoBTS or sysmoBTS. The sysmobts type can now be used to bootstrap a bts.
2013-04-29sysmobts: Initialize the NM signal handler only once in a mixed networkHolger Hans Peter Freyther1-1/+2
Make sure that the bts_ipa_nm_sig_cb is only installed once. In a nanoBTS + sysmoBTS network the _start method will be called for each mode leading to the handler being registered twice. Make sure that there is only one handler registered by unregistering a previously installed handler. The osmo_signal_unregister_handler will remove 0 or 1 handlers per invocation and we only add one handler in this file so it is always balanced.
2013-04-29sysmobts: Avoid a crash when trying to look-up a BTSHolger Hans Peter Freyther2-26/+13
The nanoBTS code is trying to find a struct gsm_bts based on the ipaccess_gsmnet and the ipaccess_unit data. The pointer is not initialized in the case of a sysmoBTS leading to a classic NULL pointer dereference. Move the feature init into the _init method. This way we can re-use the start code of the nanoBTS. This ensures that the ipaccess_gsmnet pointer is properly initialized and that the signal handlers are installed.
2013-04-29nat: Include LAC/CI as TV values at the end of the 'status' messageHolger Hans Peter Freyther2-1/+12
Extend the status message and send LAC/CI as part of the status message. It is using TV to allow sending more fields in the feature. We only need to encode the data and this is why there is no tlv description yet.
2013-04-29smpp: Attempt to fix a memory leak of the msgbHolger Hans Peter Freyther2-1/+6
The smpp_pdu_rx method does not free the msgb. Introduce an annotation (currently defined to nothing) to indicate what will happen to a msgb.
2013-04-22nat: Use memcmp for the token on the USSD interface as wellHolger Hans Peter Freyther1-6/+13
This is similar to the token on the A-interface. There are no more token based authentication in the NAT.
2013-04-22nat: Move the callstats to a new header file due sccp usageHolger Hans Peter Freyther3-28/+56
The bsc_nat.h is included by common_vty.c so we may not used sccp_types.h in the bsc_nat.h header file. Move the callstats to a new file and include it where it is needed.
2013-04-18nat: Add an example for a black listHolger Hans Peter Freyther1-0/+1
2013-04-17ctrl: Provide a reply in case the range check failedHolger Hans Peter Freyther1-0/+1
2013-04-17ctrl: Make the commands static to not pollute the namespaceHolger Hans Peter Freyther1-3/+3
We do not need to access these commands from another compilation unit and can just make it static.
2013-04-16nat: Extract the LAC/CI from the Complete Layer3 InformationHolger Hans Peter Freyther6-2/+107
Find the Cell Identifier from the Complete Layer3 Information and store it for future reference. We could begin to verify that the LAC/CI used really belongs to the BSC.
2013-04-16nat: Rename "struct sccp_connections" to "struct nat_sccp_connection"Holger Hans Peter Freyther10-70/+70
The name sccp_connection is used in the osmo-sccp code, sccp_connections was used in the NAT for tracking a sccp_connection. Rename it so it is obvious that the struct belongs to the nat. The rename was done with sed: $ sed -i s,"struct sccp_connections","struct nat_sccp_connection",g \ include/openbsc/*.h src/osmo-bsc_nat/* tests/*/*
2013-04-16debian: Begin the 0.13.0 series with a new changelog entryHolger Hans Peter Freyther1-0/+6
2013-04-16nat: Allow to re-write international numbers in the CC Setup messagesHolger Hans Peter Freyther3-9/+94
Prepend the international number with a '+' and then do the normal re-writing on it. There are a couple of ways to handle this: \+([0-9]), \+[0-9][0-9]([0-9]), \+49([0-9]) Add a test case for the international re-write based on an already internationalized number.
2013-04-16nat: Allow to daemonize the NAT processHolger Hans Peter Freyther1-1/+5
Add handling for the 'D' option
2013-04-16Merge commit 'zecke/mgcp-statistics'Holger Hans Peter Freyther11-35/+392
2013-04-16nat: Name the variable more properly and begin with net.1.bsc.%dHolger Hans Peter Freyther1-3/+4
We can identify the NAT and BSC given the types of the variable, no need to put them into the value itself.
2013-04-16nat: Include the sccp_src_ref and sccp_dst_ref for this callHolger Hans Peter Freyther1-2/+6
This can help with some post analysis for failed calls and helps finding the connection in the pcap trace.
2013-04-16nat: Do not allow the amount of pending responses to grow infinitelyHolger Hans Peter Freyther1-0/+15
Limit the amount of pending DLCX responses to three times the amount of available endpoints. Currently all MGCP messages are sent and handled in sequence.
2013-04-16nat: Reword the log messages as this is normal operationHolger Hans Peter Freyther1-1/+1
The bsc_mgcp_dlcx method is called from the mgcp policy callback but also from inside the nat core when the SCCP connection is going away.
2013-04-16nat: We want the remote to respond to our DLCX requestHolger Hans Peter Freyther10-10/+256
We want to send a TRAP with the MGCP statistics from the NAT and the connected BSC. The BSC endpoint can be either released because of a DLCX from the MGCP CallAgent or the SCCP Connection release on the A-link. This is why we need to queue the statistics when the deleting the endpoint on the BSC. The processing is continued once the response arrives. This code assumes that the response of the DLCX will be sent by the remote side. The current amount of outstanding responses can be seen on the VTY. This assumption is based on the fact that the BSC has already responded to the CRCX and maybe to the MDCX. The MGCP RFC is bended to prefix the transaction identifier with "nat-" to easily detect the response and hand it to the handler. This will then parse the response and generate the TRAP. The current version is v1. We assume that the transaction space is big enough and we will not re-assign the transaction identifier too early.
2013-04-16nat: Make it possible to send MGCP messages through the IPA multiplexHolger Hans Peter Freyther5-15/+105
Instead of handling MGCP through the UDP socket, read and write messages through the ipa connection to the MSC.
2013-04-16nat: Move all methods sending a response to the callagent to a single placeHolger Hans Peter Freyther1-10/+11
For testing it can be nice to handle MGCP messages through the IPA protocol. Prepare the code to send the messages through other means.
2013-04-16nat: Address the FIXME and send the MDCX down to the BSCHolger Hans Peter Freyther1-1/+1
2013-04-05debian: Fix the installation of the sgsn example dataHolger Hans Peter Freyther1-1/+1
Creating the sgsn package failed because the debian directory has been moved and the .examples file was not updated. This was reported by plotr.
2013-04-05sysmobts: Add the necessary data structure and init for the SAPI queueHolger Hans Peter Freyther2-0/+5
The sysmobts is now having a SAPI queue with all pending SAPI operations on the BTS. Add the llist_head to the lchan and make sure it is initialized by the shared code.
2013-04-02nat: Fix authentication by-pass using shorter tokensHolger Hans Peter Freyther1-2/+20
The token was compared with the configured one but only up to a user supplied length. Compare the token sizes and then use memcmp for the actual comparison to make sure to compare the right ammount of characters. There is no unit-test but there should be one.
2013-03-28bsc-ctrl: Fix a potential memory leak on failed verificationHolger Hans Peter Freyther1-2/+5
It was possible that the tmp was strduped but not freed, e.g. when the number of commas was not right. It would evenutally be freed at the time the cmd is freed thanks to the talloc hierachy.
2013-03-21db: Link to the VTY library for the vty_config_unlock symbolHolger Hans Peter Freyther1-1/+1
Linking started to fail for me due the symbol coming from the vty library and the db code not linking to it.
2013-03-17Add VTY option to set GPRS network-control-order to enable MS measurementsAndreas Eversberg3-0/+25
In order to enable GPRS downlink measurements at mobile, the network-control-order must be set to nc1.
2013-03-13Fix osmo-nitb build without libsmppHarald Welte1-0/+2
2013-03-13SMPP: Implement SMPP Osmocom Estensions on MO-SMS0.13.0Harald Welte5-7/+112
An ESME can now be configured in the VTY to enable osmocom-extensions, which will add vendor-specific SMPP TLVs for RxLev/RxQual/ARFCN/IMEI and transmit power to the SMPP DELIVER-SM message type.
2013-03-13SMPP: Fix crash on delivery of incoming SUBMIT-SMHarald Welte2-6/+10
As bsc_gsmnet is NULL at the time we call smpp_openbsc_init(), we later run into segfaults with subscribers that don't have a subscr->net set. However, we cannot delay smpp_openbsc_init() until after bsc_bootstrap_network(), as we then fail to parse the SMPP specific VTY/config file options...
2013-03-12IPA: Allow RSL connection to different IP address as OMLHarald Welte3-1/+32
This patch adds a new VTY command "ip.access rsl-ip A.B.C.D" at the BTS level. If you set this IP address, the BTS will be instructed to establish the RSL link to the indiciated IP address, rather than using the same as for the OML link (default). Use "ip.access rsl-ip 0" to disable the feature.
2013-03-11BTS: Add S counter for link loss criterion to lchan structureAndreas Eversberg1-0/+2
2013-03-10si: Another round of PCS related fixesHolger Hans Peter Freyther3-5/+22
Inside the SI1 rest_octets we will need to indicate if the ARFCN is band 1800 or 1900. If the BTS is either 850 or 1900 we assume we are running a PCS network, otherwise it is a DCS network. The band indicator is not documented in GSM 04.08 but it is in the GSM 05.14 version 6.1.0 Release 1997.
2013-03-09rsl: Properly initialize the cm structure with memsetHolger Hans Peter Freyther1-1/+1
abis_rsl.c:332:23: warning: 'memset' call operates on objects of type 'struct rsl_ie_chan_mode' while the size is based on a different type 'struct rsl_ie_chan_mode *' [-Wsizeof-pointer-memaccess] memset(cm, 0, sizeof(cm)); ~~ ^~ abis_rsl.c:332:23: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)? memset(cm, 0, sizeof(cm)); ^~ 1 warning generated.
2013-03-08bsc_vty: Prevent printing -1 as unsigned integer for timeslot TSCHarald Welte1-1/+2