aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
AgeCommit message (Collapse)AuthorFilesLines
2013-12-19Add EFR support to TRAU muxer + test caseAndreas Eversberg5-1/+116
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-4/+15
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: Parse SDP to get rate and packet durationJacob Erlbeck1-5/+5
This patch parses the 'ptime' and 'maxptime' SDP attributes, and the SDP rate information and sets up packet_duration_ms accordingly. If the packet duration is unknown or allows for different values (e.g. because 'ptime' uses a range or 'maxptime' allows for more than one frame) the duration is set to 0. Sponsored-by: On-Waves ehf
2013-12-13mgcp: Put local connection options into a structJacob Erlbeck2-5/+12
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-13mgcp/test: Output the packet duration after MGCP parsingJacob Erlbeck2-5/+85
This also adds additional MDCX tests (based on MDCX4) to test the analysis of different combinations of 'p' and 'ptime' fields. Sponsored-by: On-Waves ehf
2013-12-13build: db_test does not use dlopen/dlsym.. remove LIBRARY_DL from depsHolger Hans Peter Freyther1-1/+1
2013-12-13build: channel_test does not use dlopen/dlsym remove LIBRARY_DL depHolger Hans Peter Freyther1-1/+1
2013-12-13freebsd: dlopen/dlsym/dlerror is part of libc, use LIBRARY_DL for linkingNikola2-2/+2
In FreeBSD there is no spearate library for dlopen, dlsym and dlerror. Use LIBRARY_DL to check for this condition.
2013-12-12si: Make sure to not overwrite orig_arfcn_hi in the range encodingHolger Hans Peter Freyther2-2/+2
Andreas highlighted that the doubel assignment is not needed and wrong. Change the code to assign chan_list[0] before writing the base frequency to the header. Update the testcase to make the highest bit set and update the test result.
2013-12-12mgcp: Address compiler error for sprintf misusage...Holger Hans Peter Freyther1-1/+1
The hardening flags of debian have highlighted this sprintf mis-usage in the testcase. Address it.
2013-12-10mgcp/rtp: Fix RTP timestamps if enabledJacob Erlbeck1-36/+36
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: Use SSRC in proper byte orderingJacob Erlbeck1-1/+1
The ssrc has been used without respect to proper byte ordering in mgcp_patch_and_count(). This only affected log messages. This patch introduces a new variable 'ssrc' that takes the value of the SSRC in proper byte order. Sponsored-by: On-Waves ehf
2013-12-10mgcp/rtp: Add RTP header patch mode configurationJacob Erlbeck1-1/+5
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/rtp: Fix output timing error counterJacob Erlbeck1-18/+18
The tsdelta computation and error detection didn't handle the intialisation phase properly. This patches fixes this by skipping the output timing validation when the SSRCs don't match. Sponsored-by: On-Waves ehf
2013-12-05mgcp/rtp: Add more test cases for RTP header patchingJacob Erlbeck2-4/+114
This patch extends the existing RTP error check test by adding a check for timestamp errors after SSRC changes and a check for a segno delta of 2 (with a timestamp delta of 320). To test SSRC patching too, a corresponding line will be written on each SSRC change that has been detected in the output stream. In addition there is now support for selectively enabling/disabling SSRC and timestamp patching. The RTP test sequence is repeated for all combinations thereof. Sponsored-by: On-Waves ehf
2013-12-05mgcp: Handle SDP in CRCX received by the MGWJacob Erlbeck1-2/+2
So far the SDP part of the CRCX message has been ignored by the MGW. This patch adds SDP parsing for this case, eventually updating the net end's payload type and connection parameters. Sponsored-by: On-Waves ehf
2013-12-05mgcp/nat: Take payload type from SDP dataJacob Erlbeck1-1/+1
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-12-05mgcp: Add tests for payload types in MGCP messagesJacob Erlbeck4-6/+98
These tests mainly check whether the SDP parsing works properly by looking at the payload type detected. Sponsored-by: On-Waves ehf
2013-12-05mgcp: Add new for_each_line macro that also returns empty linesJacob Erlbeck2-0/+48
This patch add the for_each_line macro based on a strline_r() function (similar to strtok_r()), that is also part of this patch. This strline_r() function is tolerant with respect to line endings, it supports CR-only, CRLF, and LF-only and any combinations thereof (note that a CRLF is always detected as a single line break). Similar to for_each_non_empty_line (the former for_each_line) where the 'save' pointer needed to be initialised by a call to strtok_r(), the new for_each_line macro expects, that the 'save' pointer has been initialised by a call to strline_r(). Also note, that for_each_line/strline_r and for_each_non_empty_line/strtok_r may use the 'save' pointer differently, so calls to them can not be mixed. Sponsored-by: On-Waves ehf
2013-11-25mgcp/rtp: Fix timestamp offset when patching RTP packetsJacob Erlbeck2-8/+14
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 test case for RTP timestamp patching and statsJacob Erlbeck2-0/+122
This patch adds a test case to check, whether RTP timestamps are generated properly after SSRC changes and whether the error counters work properly. Sponsored-by: On-Waves ehf
2013-11-25mgcp/rtp: Add counter for invalid RTP timestamp deltasJacob Erlbeck1-2/+3
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-22bsc: Add a VTY command to show the paging group for a BSC/IMSIHolger Hans Peter Freyther1-0/+6
2013-10-30vty: Enable the end/exit test for libosmocore nodesJacob Erlbeck1-13/+6
This patch replaces the calls to ignoredCheckForEndAndExit by calls to checkForEndAndExit to test the libosmocore nodes, too. The former method is removed. Sponsored-by: On-Waves ehf
2013-10-24gbproxy: Fix handling of NSEI changesJacob Erlbeck1-31/+34
The gbproxy looses NSEI changes on BVC_RESET and then tries to send later messages to the wrong (not longer existing) destination. This patch fixes this by updating the peer's nsei field on BVC_RESET. Ticket: OW#874 Sponsored-by: On-Waves ehf
2013-10-24gbproxy: Add test for NSEI and NSVCI changesJacob Erlbeck2-4/+854
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-0/+16
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 basic VTY testsJacob Erlbeck1-0/+40
This checks for the ns and gbproxy config nodes and show commands. Sponsored-by: On-Waves ehf
2013-10-24vty: Fix whitespace in test scriptJacob Erlbeck1-7/+7
Expands leading tabs and removes trailing whitespace. Sponsored-by: On-Waves ehf
2013-10-19gbproxy: Reject SGSN UNITDATA messages with an invalid BVCIJacob Erlbeck1-5/+6
Currently such messages lead to a creation of a new peer with the SGSN's NSEI, which results in echoing the message back to the SGSN. This patch modifies this by sending a STATUS response (invalid BVCI) instead back to the SGSN. Sponsored-by: On-Waves ehf
2013-10-19gbproxy: Test invalid BVCI from SGSNJacob Erlbeck2-0/+26
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 Erlbeck2-12/+14
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-19gbproxy: Extended test program to simulate SGSN, tooJacob Erlbeck2-43/+627
This adds a simulation of the SGSN side of the Gbproxy. The VC is set up correctly and several combinations of BSSGP messages are sent. 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 Erlbeck5-1/+793
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 Freyther1-6/+6
The database code should not know about the network. Move the setting of the network pointer into the subscriber layer.
2013-10-05nitb: Add "subscriber create" VTY command.Alexander Chemeris1-0/+16
It may be useful in production, but it's really required for VTY testing of subscriber related commands.
2013-10-04Fix copy-paste error in console output in db_test.Alexander Chemeris1-1/+1
2013-10-01bsc: Add control command to set timezoneJacob Erlbeck1-0/+38
This adds a per BTS control command 'timezone' which expects a value of the format '<hours>,<mins>,<dst>' or 'off' to set the value of bts->tz. It has the same functionality like the existing VTY command 'timezone' in network/bts. Sponsored-by: On-Waves ehf Ticket: OW#978
2013-09-19smpp: Fix the make distcheck for smppHolger Hans Peter Freyther1-2/+2
DISTCHECK_CONFIGURE_FLAGS="--enable-smpp" make distcheck
2013-09-19nat: Fix make distcheck for the natHolger Hans Peter Freyther2-8/+8
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 Erlbeck7-0/+273
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-18bsc: Add vty command for setting Access control classes.Ivan Kluchnikov1-0/+35
2013-09-16ctrl: Set a generic reply when it hasn'n been setJacob Erlbeck1-0/+4
When verification failed and the reply string was not updated, the message "Someone forgot to fill in the reply." was shown instead of the default "Value failed verification." message. This patch changes the default reply handling in ctrl_cmd_handle() by setting the reply to NULL initially and then checking it at the end. If it hasn't been set, a generic message is assigned and an error is logged.
2013-09-16ctrl: Add test script for the BSC control interfaceJacob Erlbeck2-1/+241
This script is similar to vty_test_runner.py but tests the control interface instead. It currently tests some error cases, BTS status queries, and setting/clearing rf_locked.
2013-09-11vty: Hide unconfigured BTS on 'write'Jacob Erlbeck1-0/+11
This prevents the application from crashing when there is a half configured BTS (e.g. by using the command 'bts 1' when there isn't a BTS 1) and the 'write' command is used.
2013-09-11ussd: Send USSD on call setup on MSC errorsJacob Erlbeck1-2/+33
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
2013-09-02vty: Attempt to fix the build when SMPP is not enabledHolger Hans Peter Freyther1-8/+19
2013-09-02vty: Rename 'mgcp-through-msc-ipa' command to 'use-msc-ipa-for-mgcp'Jacob Erlbeck1-4/+4
Currently the 'mgcp' command fails in the 'config-nat' node, because it get confused with 'mgcp-through-msc-ipa' which is executed instead because of the prefix based command selection. Thus the latter command is renamed by this patch to avoid the common prefix. The workaround in the test suite is removed.
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-19/+5
Add bsc_install_default() and replace all install_default() This patch adds bsc_install_default() which calls install_default() and add 'exit' and 'end'. All other calls to install_default() are replaced by calls to bsc_install_default(). Since 'exit' and 'end' are now added automatically to each node, the explicit registrations of these commands are removed by this patch, too. The related tests succeed now without work-arounds (except for the 'config' node itself which is part of libosmocore).