aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
AgeCommit message (Collapse)AuthorFilesLines
2014-03-04libbsc: Add ctrl command for MNC, MCC, short-name and long-nameHolger Hans Peter Freyther1-0/+3
Add the framework for adding more setting commands.
2014-02-22bsc: Add vty command to send location trap through VTYHolger Hans Peter Freyther1-0/+2
I have manually tested this by entering the VTY command and observing the CTRL interface using wireshark. Ticket: OW#1129
2014-02-20sms: Increment the RP Message Reference for each transactionHolger Hans Peter Freyther2-0/+4
Each RP-DATA should have a unique msg reference. Currently 42 is used for all of these. Remember the last reference we used and increment it on the next SMS. Do not track if the reference is still in use a clash is a lot less likely now. First unless SMPP is used only one SMS is delivered at a time, second the transaction space is a lot smaller than the one for the reference.
2014-02-20trau: Fix compiler warning about decoded_trau_frameHolger Hans Peter Freyther1-0/+2
In file included from bsc_api.c:34:0: ../../include/openbsc/trau_mux.h:62:15: warning: ‘struct decoded_trau_frame’ declared inside parameter list [enabled by default] const struct decoded_trau_frame *tf); ^ ../../include/openbsc/trau_mux.h:62:15: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] ../../include/openbsc/trau_mux.h:64:15: warning: ‘struct decoded_trau_frame’ declared inside parameter list [enabled by default] const struct decoded_trau_frame *tf); ^ ../../include/openbsc/trau_mux.h:66:2: warning: ‘struct decoded_trau_frame’ declared inside parameter list [enabled by default] const unsigned char *data); ^ ../../include/openbsc/trau_mux.h:68:2: warning: ‘struct decoded_trau_frame’ declared inside parameter list [enabled by default] const unsigned char *data);
2014-02-04ctrl: Make it possible to re-use the string get and set routineHolger Hans Peter Freyther1-3/+7
This can be used for the description field that requires some special handling for newlines.
2014-02-04ctrl: Make the int range set, get and verify methods availableHolger Hans Peter Freyther1-4/+12
For the max power reduction we will need to have a different range method. It will need to check if the value is even. Make the set, get and verify methods available through a macro.
2014-01-31mgcp/rtp: Compute delta timestamp based on wallclockJacob Erlbeck1-0/+1
Currently, when the SSRC changes within a stream and SSRC fixing is enabled, the RTP timestamp between the last packet that has been received with the old SSRC and the first packet of the new SSRC is always incremented by one packet duration. This can lead to audio muting (at least with the nanoBTS) when the wallclock interval between these packets is too large (> 1s). This patch changes the implementation to base the RTP timestamp offset on the wallclock interval that has passed between these two packets. Ticket: OW#466 Sponsored-by: On-Waves ehf
2014-01-27Add function to update TRAU muxer after assignment or handoverAndreas Eversberg2-0/+17
E1 based BTS use TRAU muxer to decode TRAU frames. After changing channel from one timeslot to another (due to handover or assignment), the TRAU muxer must be updated. The call reference of the call is disconnected from the old channel and connected to the new channel.
2014-01-26Use 'defines' for length and duration of RTP payloadAndreas Eversberg1-0/+4
2014-01-20nat: Introduce reject cause to bsc_nat_acc_lst_entryHolger Hans Peter Freyther1-0/+4
The filtering architecture already allowed to specify a reject reason but this has not been used for the access-lists. Extend the access-list to include a reject reason and extend the test case to honor it.
2014-01-20mgcp: Synchronize conn mode bits and output enabled flagsJacob Erlbeck1-1/+1
This patch changes implementation and the mgcp_connection_mode enum in a way that net_end.output_enabled (bts_end.output_enabled) flag always matches the MGCP_CONN_SEND_ONLY (MGCP_CONN_RECV_ONLY) bit of conn_mode. Based on this, the conn_mode bits are then used instead of the output_enabled fields within mgcp_protocol.c. Sponsored-by: On-Waves ehf
2014-01-19TSC: Add new gsm_ts_tsc() function to resolve TSC of TSHarald Welte1-0/+7
We don't want every caller to check for ts->tsc == -1 and then using ts->trx->bts->tsc instead. Rather, introduce a new inline function to retrieve the correct value.
2014-01-19Do not expect all BTSs support TSC != BCCHarald Welte1-0/+1
We introduce a new feature indicating if the given BTS model supports a TSC that is different from the BCC (lower 3 bits of BSIC).
2014-01-16mgcp: Send RTP keepalive dummy packets to netJacob Erlbeck1-0/+9
So far, a single dummy packet has been sent immediately after the reception of a MDCX message. There is no dedicated keep alive mechanism (it just worked because the audio from the MS has always been forwarded to the NAT until the 'mgcp: Set output_enabled flags based on the MGCP mode' patch). This patch adds explicit, timer based keep alive handling that can be enable per trunk. A VTY command 'rtp keep-alive' command is added for configuration which can be used to set the interval in seconds, to send a single packet after the reception of a CRCX/MDCX when RTP data from the net is expected ('once'), or to disable the feature completely ('no rtp keep-alive'). In 'send-recv' connections, only the initial packet is sent if enabled (even when an interval has been configured). The default is 'once'. Note that this removes the mgcp_change_cb() from mgcp_main.c. Sponsored-by: On-Waves ehf
2014-01-16mgcp/rtp: Add flag to disable RTP outputJacob Erlbeck1-0/+2
This patch make it possible to have a valid endpoint that drops all outgoing RTP packets. The number of dropped packets is shown by the VTY 'show mgcp' command. By default, this feature is disabled. To enable packet dropping, the corresponding output_enabled field must be set to 0. Ticket: OW#1044 Sponsored-by: On-Waves ehf
2014-01-16si: Fix range1024 encodingJacob Erlbeck1-1/+1
f0 is currently set to arfcns[0] in range_enc_determine_range(), while GSM 04.08 requires f0 to be ARFCN 0 in range1024 encoding. This patch modifies range_enc_determine_range() to force f0 to be 0 if this encoding is used. This way the case distinction in range_enc_filter_arfcns() is not longer necessary. Sponsored-by: On-Waves ehf
2014-01-16si: Add a config option to disable SI2ter/SI2bis/SI5ter/SI5bis messagesJacob Erlbeck1-0/+3
The iPhone5 (US) appears to have some issues with the SIs generated, or the nanoBTS is not sending them correctly. Add a configurable hack to put all bands into the SI2/SI5 message. It is enabled by the bts VTY command 'force-combined-si'. This is a quick change without much reflection and watching for side effects. I have verfied that a network with ARFCN 134 and neighbors ARFCN 130 and 512 do not get generate the SI2ter and announce everything inside the SI2. This patch is conceptually based on 'si: Add a hack to disable SI2ter/SI2bis/SI5ter/SI5bis messages' (692daaf2d2). Ticket: OW#1062 Sponsored-by: On-Waves ehf
2014-01-14Each BTS can be configured for speech support (other than GSM full rate)Andreas Eversberg1-0/+9
Speech codings which are not supported by BTS will be removed from the bearer capability information element after parsing. This way it is not required for the MNCC application to consider support of each BTS. Only GSM full rate is supported by default.
2014-01-09Add VTY option for Nokia BTS that does not send RELease CONFirm messageAndreas Eversberg2-0/+15
This option is a workarround for a bug found in Nokia InSite BTS firmware version 3.0.0. There is no RELease CONFirm message for local end release. Nokia MetroSite with firmware version 4.178.16 is not affected. TS 04.06 Chapter 5.4.4.4 "Local end release procedure" states that a confirm must be sent by layer 2 when receiving a local end release request. In order to correctly switch a channel (handover or assignment), local end release is required.
2013-12-19mgcp/rtp: Only patch timestamp alignment errorsJacob Erlbeck2-2/+2
Currently, all timestamps are force to SeqNo*d + C which is more than required by the nanoBTS which seems to be sensitive to alignment errors only (dTS != k*d, d = ptime * rate = 160). This patch replaces the force_constant_timing feature by a force_aligned_timing feature. The timestamp offset will only be changed (and timestamp errors counted) when the alignment does not match to the raster based on ptime (default 20ms). The VTY interface does not change. Sponsored-by: On-Waves ehf
2013-12-19Add EFR support to TRAU muxer + test caseAndreas Eversberg2-0/+11
Decoding and encoding of FR and EFR TRAU frames are put into seperate functions. CRC check is done to detect bad EFR TRAU frames. The test case includes FR and EFR transcoding. EFR support was tested with Nokia InSite BTS and Siemens BS11.
2013-12-13mgcp: Optionally send ptime in SDPJacob Erlbeck1-0/+1
Currently the SDP 'ptime' media attribute is never set in generated MGCP responses. This patch optionally includes the 'ptime' attribute if packet_duration_ms is != 0. This behaviour can be enabled/disabled by using the VTY command "sdp audio-payload send-ptime" (enabled by default). Sponsored-by: On-Waves ehf
2013-12-13mgcp: Put local connection options into a structJacob Erlbeck1-1/+7
Currently the local connection options have been stored as a string. This patch replaces this string by a struct (that still contains a string) along with the parsed fields (only the packetization period at the moment). It also re-adds the calls to set_local_cx_options() to the handle_create_con() and handle_modify_con() functions. Except for the test program this has no side effects, since the LCO values aren't used yet.
2013-12-10mgcp/rtp: Refactored packet_duration computationJacob Erlbeck1-0/+3
Since the packet duration is given in ms with the 'ptime' RTP media attribute and also with the 'p' MGCP local connection option, the computation is changed to use this value (if present). The computation assumes, that there are N complete frames in a packet and takes into account, that the ptime value possibly had been rounded towards the next ms value (which is never the case with a frame length of exact 20ms). Sponsored-by: On-Waves ehf
2013-12-10mgcp/rtp: Fix RTP timestamps if enabledJacob Erlbeck1-1/+1
This forces the output timing to fulfill dTS = dSegNo * fixedPacketDuration where dSegNo = seqNo - lastSeqNo. If timestamp patching is enabled, the output timestamp will be set to lastTimestamp + dTS. This kind of relative updating is used to handle seqNo- and timestamp-wraparounds properly. The updating of timestamp and SSRC has been separated and the patch field of mgcp_rtp_state has been renamed to patch_ssrc to reflect it's semantics more closely. The offset fields are now used always and will change the corresponding header field if they are != 0. Ticket: OW#1065 Sponsored-by: On-Waves ehf
2013-12-10mgcp/rtp: Only patch SSRC once after MDCX if enabledJacob Erlbeck1-1/+1
Currently the output SSRC is always forced to be the same if SSRC patching is enabled. This patch modifies this to optionally restrict the number of SSRC changes that will be corrected. Note that the configuration only allows for the 'once' mode and 'off'. Sponsored-by: On-Waves ehf
2013-12-10mgcp/rtp: Compute default packet duration at state initialisiationJacob Erlbeck1-0/+1
This patch adds a packet_duration field to mgcp_rtp_state which contains the RTP packet's duration in RTP timestamp units or 0, when the duration is unknown or not fixed. Sponsored-by: On-Waves ehf
2013-12-10mgcp/rtp: Add RTP header patch mode configurationJacob Erlbeck2-3/+11
This adds datastructures and a VTY frontend to configure the different type of RTP header patching: SSRC and timestamp. Note that timestamp patching is not yet implemented. Sponsored-by: On-Waves ehf
2013-12-05mgcp/nat: Take payload type from SDP dataJacob Erlbeck1-1/+2
So far the payload type used in RTP streams has been taken from the trunk configuration in NAT mode. This patch changes the implementation to use the payload type announced in the SDP part of MGCP messages and responses. SDP descriptions more than one m=audio line are not yet supported properly (always the last one is taken). Ticket: OW#466 Sponsored-by: On-Waves ehf
2013-11-25mgcp/rtp: Fix timestamp offset when patching RTP packetsJacob Erlbeck1-0/+4
The current implementation increments the seqno but does not increment the RTP timestamp, leading to two identical timestamps following one after the other. This patch fixes this by adding the computed tsdelta when the offset is calulated. In the unlikely case, that a tsdelta hasn't been computed yet when the SSRC changes, a tsdelta is computed based on the RTP rate and a RTP packet duration of 20ms (one speech frame per channel and packet). If the RTP rate is not known, a rate of 8000 is assumed. Note that this approach presumes, that the per RTP packet duration (in samples) is the same for the last two packets of the stream being replaced (the first one). Sponsored-by: On-Waves ehf
2013-11-25mgcp/rtp: Add counter for invalid RTP timestamp deltasJacob Erlbeck1-3/+11
This patch modifies the patch_and_count() function to check for RTP timestamp inconsistencies. It basically checks, whether dTS/dSeqNo remains constant. If this fails, the corresponding counter is incremented. There are four counter for this: Incoming and outgoing, each for streams from the BTS and the net. Note that this approach presumes, that the per RTP packet duration (in samples) remains the same throughout the entire stream. Changing the number of speech frames per channel and packet will be detected as error. In addition, the VTY command 'show mgcp' is extended by an optional 'stats' to show the counter values, too. Ticket: OW#964 Sponsored-by: On-Waves ehf
2013-11-05shared: Introduce/Add procedure pending to the MOHolger Hans Peter Freyther1-0/+1
GSM 12.21 specifies that "No elementary procedure shall be initiated to an object instance which has not yet replied to a previously initiated elementary procedure with a response, an ACK or a NACK within a layer 3 time-out. The layer 3 timeout for ACK, NACK and responses shall have a default value of 10 seconds." We are using this flag in the BTS to enforce/safe-guard this situation.
2013-11-01bsc: Move gsm48_tx_mm_serv_ack/rej to gsm_04_08_utils.cJacob Erlbeck1-0/+3
These functions are currently located in libmsc/gsm_04_08.c together with other symbols that (transitively) depend on many external symbols (and thus libraries) that aren't otherwise needed by e.g. osmo-bsc. Since gsm48_tx_mm_serv_ack() will be needed by osmo-bsc, these functions are moved to avoid the dependency on gsm_04_08.o. Sponsored-by: On-Waves ehf
2013-10-31Revert "bsc/ussd: Send faked CM Service Accept before sending USSD"Holger Hans Peter Freyther1-3/+0
This reverts commit 61bd965b04e4f00eaf4196eebb4ec6269926d551. No, we should not link to dbi.. and these libraries..
2013-10-31bsc/ussd: Send faked CM Service Accept before sending USSDJacob Erlbeck1-0/+3
The MS do not show the USSD messages yet. This patch modifies the implementation to insert a CM Service Accept before the ussdNotify to finish the establishment of the MM connection according to 3GPP TS 04.10/3.2.1. This fix has been tested with a Blackberry phone that has shown an ussd_grace_txt after rf_locked has been set to '1'. Without this patch, that message wasn't shown. The phone has sent a CC Setup and other messages before processing the channel release message sent by the BSC, but these messages have not been forwarded to the MSC (as expected). Ticket: OW#957 Sponsored-by: On-Waves ehf
2013-10-30vty: Use vty_install_default() instead of bsc_install_default()Jacob Erlbeck1-4/+0
Remove ournode_exit_cmd, ournode_end_cmd, and bsc_install_default() since this functionality is provided by the current libosmocore. Replace calls to bsc_install_default() by call to vty_install_default() with the following semantic patch: @rule1@ expression N; @@ - bsc_install_default(N); + vty_install_default(N); Ticket: OW#952 Sponsored-by: On-Waves ehf
2013-10-25bts: Add a flag to remember the kind of activation/releaseHolger Hans Peter Freyther1-0/+2
When the PCU is activating a channel we don't want to tell the BSC using RSL. Add a flag so we can keep track of who asked for the activation/release of the channel.
2013-10-24gbproxy: Add test for NSEI and NSVCI changesJacob Erlbeck1-0/+1
This checks the behavior of the gbproxy when the BSS peer changes the NSEI and the NSVCI. It also tests BVC_RESET and other UNITDATA messages after these changes between BSS and SGSN and vice versa (via the gbproxy). Ticket: OW#874 Sponsored-by: On-Waves ehf
2013-10-24gbproxy/vty: Enhance delete-gbproxy-peer commandJacob Erlbeck1-1/+2
This adds the option to delete all BVC peers and/or NS_VC with a given NSEI with a single command. Static (configured) NS-VC are not affected. In addition, all connections for this NSEI that can be deleted by this command can be listed without deleting them by appending 'dry-run' to the command. Sponsored-by: On-Waves ehf
2013-10-24gbproxy: Add a command to delete peers from the GBProxyHolger Hans Peter Freyther1-0/+1
This just deletes the peer entry based on NSEI and BVCI. The NS-VC are not touched.
2013-10-19gbproxy: Test invalid BVCI from SGSNJacob Erlbeck1-0/+1
This adds a test with a UNITDATA SGSN message that is addressed to an invalid (unknown) BVCI. The test shows, that the message is echoed to the SGSN. Sponsored-by: On-Waves ehf
2013-10-19gbproxy: Add global and per peer countersJacob Erlbeck1-1/+1
This adds counters that are incremented when errors are detected. It also modifies the VTY command 'show gbproxy' so that 'show gbproxy stats' shows the counters. Sponsored-by: On-Waves ehf
2013-10-15gbproxy: Replace NS-VC references by NSEIJacob Erlbeck1-1/+1
Currently in most places in gb_proxy.c a reference to a NS-VC object is used where the peer is meant instead. The patch changes this by using the NSEI instead in these cases. Sponsored-by: On-Waves ehf
2013-10-15gbproxy: Add test program to test gbproxy message handlingJacob Erlbeck1-0/+1
This program tests the gbproxy implementation by passing NS messages to a modified gbproxy that dumps the resulting messages, signals, and state. It focusses on testing abnormal situations like port changes. Ticket: OW#874 Sponsored-by: On-Waves ehf
2013-10-13db: Remove the struct gsm_network from the database layerHolger Hans Peter Freyther2-4/+4
The database code should not know about the network. Move the setting of the network pointer into the subscriber layer.
2013-10-06osmo-bts: Kill the different ROLE_BSC as e1inp_sign_link is used nowHolger Hans Peter Freyther1-4/+1
2013-09-19nat: Fix make distcheck for the natHolger Hans Peter Freyther1-1/+1
The jenkins runs make distcheck in the default configuration and not with the nat enabled. DISTCHECK_CONFIGURE_FLAGS="--enable-nat" make distcheck
2013-09-19bsc/mminfo: Patch timezone and DST in MM Info messagesJacob Erlbeck1-0/+1
This adds in-place patching of the time information in the MM INFORMATION message. The timezone in the 'Local time zone' and the 'Universal time and local time zone' information elements and the offset in the 'Network Daylight Saving Time' information element are optionally set. The new values are determined by the 'timezone' vty command in the config_net_bts node. That command is extended by an optional DST offset parameter. Tests are provided for the vty part and for the plain bsc_scan_msc_msg() function. Sponsored-by: On-Waves ehf Ticket: OW#978
2013-09-11ctrl: Remember last 'rf_locked' control commandJacob Erlbeck1-0/+2
This stores the last SET rf_locked control command along with a timestamp. The 'show network' vty command is extended to show this information. Ticket: OW#659
2013-09-11ussd: Send USSD on call setup on MSC errorsJacob Erlbeck2-2/+15
Send an USSD message to the mobile station requesting a connection for a call or a SMS when the link to the MSC is down or in the grace period. The messages can be set (and this feature activated) by setting bsc/missing-msc-text resp. msc/bsc-grace-text via the vty. The generation of both messages has been tested manually. Ticket: OW#957