AgeCommit message (Collapse)AuthorFilesLines
2011-08-22nat: Fix error in get_next_free_bsc_idDaniel Willmann1-15/+20
The new function now mimcis the behaviour of assign_src_local_reference from bsc_sccp.c
2011-08-22contrib/bsc_control.py: Patch by Holger to handle connection resetsDaniel Willmann1-0/+4
2011-08-22bsc: Fix crash that can occur on RF FailureHolger Hans Peter Freyther1-3/+12
When we got a clear request we did not clear the internal association between the gsm_subscriber_connection and the SCCP part. When we got a DTAP message before the CLEAR COMMAND we will end up in a crash as the ->bts pointer of the connection has been cleared. #0 bsc_scan_msc_msg (conn=0xde178, msg=<value optimized out>) at osmo_bsc_filter.c:258 #1 0x000112c8 in bsc_handle_dt1 (conn=0xdebd8, msg=0xd1f58, len=<value optimized out>) at osmo_bsc_bssap.c:507 #2 0x00010208 in msc_outgoing_sccp_data (conn=<value optimized out>, msg=0xdfacc, len=858696) at osmo_bsc_sccp.c:73 #3 0x0003c110 in sccp_system_incoming (msgb=0xd1f58) at sccp.c:1064
2011-08-22audio: Move the setting of MultiRateConfig to one placeHolger Hans Peter Freyther1-14/+19
Move it to one place so it is more easy to make changes to that.
2011-08-22audio: From RTP point of view we can use one payload for HR/FR AMRHolger Hans Peter Freyther2-4/+2
Remove the separation of half-rate and full-rate AMR. The used rate can be found inside the AMR payload. The signalling of what kind of traffic channel is used can be done with the GSM 08.08 Chosen Channel IE in the Assignment Complete message. This way I can use a fixed payload type in the MGCP GateWay but have a mixed TCH/F and TCH/H config. E.g. use TCH/F FR3 for some subscribers when connected to MSC A but use AMR5.9 on a TCH/F for MSC B when all TCH/Hs are gone.
2011-08-22audio: Remove the hardcoding of the RTP PayloadHolger Hans Peter Freyther3-6/+0
The MGCP config must be correct and use 99 for RTP AMR.
2011-08-22mgcp: Make CRCX deal better with UDP retransmissionsHolger Hans Peter Freyther1-24/+44
When the CRCX 200 is lost on the way to the CallAgent we will get another CRCX (retransmission) which was answered with a 400. Change the code to extract the CallID, Mode and the optional LocalOptions first. Then check if the endp is allocated with the same call identifier, in that case return the current session information.
2011-08-22mgcp: FreeSWITCH requiresn us to provide the o= and t= paramHolger Hans Peter Freyther1-3/+5
The SDP file for FreeSWITCH should contain o= (Origin) and the t= (Timing) for the session. The data of the Origin should be globally unique but this is not the case yet. We will need to store the (NTP) time of the creation of the endpoint.
2011-08-22misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_regHolger Hans Peter Freyther6-33/+43
Move the regexp parsing code from the NAT to libcommon as it will be used by the NAT and BSC code. This also adds the #include <regex.h> include to gsm_data. This header should be split up.
2011-08-20we don't have openbsc/ipaccess.h anymoreHarald Welte1-1/+1
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso74-5766/+926
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-08-19src: use new msg->dst pointer instead of deprecated msg->trxPablo Neira Ayuso15-132/+181
This patch modifies openBSC code to use msg->dst which stores the pointer to the signalling link structure instead of the pointer to the transceiver structure. This patch prepares the introduction of libosmo-abis.
2011-08-19bssgp: make comments more explicit, include 'Rx' in received messagesHarald Welte1-6/+6
2011-08-19Merge branch 'master' of git.osmocom.org:openbscHarald Welte25-180/+2348
2011-08-13bsc: Crash fix for the osmo-nitb/MNCC codeHolger Hans Peter Freyther1-1/+2
It is possible that MNCC sends a MNCC_LCHAN_MODIFY and wants a channel mode that is not possible on the current lchan, in that case a new channel is assigned. We now crash as the osmo-nitb is not having an assignment complete handler, add a NULL check.
2011-08-11libbsc: Log if a channel is freed with lchan->state != LCHAN_S_NONEDaniel Willmann1-0/+4
I'm not sure if that is an abnormal condition or not, but it seems that lchan state and type have to be none for the lchan to be considered idle.
2011-08-11libbsc: Cosmetic fix for the channel activate NACK log messageDaniel Willmann1-1/+1
2011-08-11libbsc: Release the RF channel if BTS thinks it's still in useDaniel Willmann1-0/+3
The Nokia metrosite BTS seem to keep the channels open indefinitely. If osmo-nitb is restarted while one of the channel was still active and tries to activate that channel again the bts would return a CHANNEL ACTIVATE NACK with "Radio channel already activated". This accumulated over the restarts so soon enough no more channels were available. This patch sends a release request to the bts so the channel becomes available again.
2011-08-11libbsc: Call lchan_free in the timeout callbacksDaniel Willmann1-2/+4
This makes sure that the lchans can be used again. (state and type are set to NONE)
2011-08-11libbsc: Only skip lchans with state AND type set to NONE in show lchanJan Luebbe1-1/+1
The function lchan_alloc only considers lchans to be available if both the type and state are NONE. So change show lchan to list all lchans that are not considered available.
2011-08-11MNCC: Never send zero-length msgb packets to the socketPeter Stuge1-0/+9
This will cause the remote end to read 0 bytes, which is interpreted as if we cleanly closed the socket, making the remote end close their side of the socket, which would lead to us closing our side of the socket, so we should never send such a packet.
2011-08-11RSL: add timer for lchan activation/deactivation without BTS responseHarald Welte2-1/+38
The timer callback will simply reset the lchan state to NONE in order to prevent channels getting stuck in 'activation requested' or 'deactivation requested' states.
2011-08-11DAHDI: Actually increment e1_input related rate countersHarald Welte1-0/+16
2011-08-11E1 Input: better names for rate countersHarald Welte1-4/+4
2011-08-11E1 Input: Add rate counters for events related to E1 linesHarald Welte3-12/+66
2011-08-11E1 Input: Move 'show e1_*' command to e1_input_vty.cHarald Welte2-117/+118
2011-08-11E1 Input: Add VTY command to specify the name of a LineHarald Welte1-1/+28
So far, there was no way to set the line->name field at all.
2011-08-10libbsc: Don't free secondary lchan if it is NULL.Daniel Willmann1-1/+5
2011-08-10trau: fix wrong message size for GSM_TCHF_FRAME passed to MNCCPablo Neira Ayuso1-0/+1
During the GSM deployment in the CCC Camp, Daniel Willmann noticed that the LCR and the MNCC were closing the local connection over unix sockets communication quite so often. After some debugging, Peter Stuge noticed that openBSC was closing the connection since write was returning 0. Then, I suggested that it could be a malformed message with zero length. By skipping empty messages, Peter confirmed that the connection between the LCR and the MNCC was not closing anymore. However, there was no voice in the calls that went over MNCC. After some more debugging I found that we were not building GSM_TCHF_FRAME over MNCC appropriately in the TRAU multiplexer code, since we forgot to msgb_put() the message.
2011-08-10NOKIA: Resend SABM on unknown TEI from LAPDPablo Neira Ayuso1-1/+8
2011-08-10LAPD: Propagate lapd_receive() errors to the E1 driverPablo Neira Ayuso5-8/+44
Scenario: BTS are configured and working, then the BSC stops working for some reason (crash or administrative stop). If the BSC comes back to life, LAPD among other things does not know about the previous existing TEIs. Instead of ignoring these frames, we notify the driver that we are seeing frames with unknown TEIs, so it can try to recover, e.g. by resending the SABM message.
2011-08-10Fix MNCC for the NOKIA BTS typeHarald Welte1-0/+2
(thanks to Gus Bourg)
2011-08-10NOKIA: use 'struct value_string' whenever possibleHarald Welte1-472/+243
2011-08-10NOKIA: use 'value_string' for severity and bts_typeHarald Welte1-48/+31
2011-08-10NOKIA: Move more static variables into 'struct gsm_bts'Harald Welte2-14/+16
2011-08-10NOKIA: move 'conf' and 'bts_type' into 'struct gsm_bts'Harald Welte1-12/+10
This is one step in the direction of supporting multiple Nokia BTS
2011-08-10NOKIA: Some more whitespace changesHarald Welte1-20/+11
2011-08-10Nokia: Coding styleHarald Welte1-1633/+1666
Running the entire bts_nokia_site.c through the 'Lindent' script to match indent/coding style with remainder of project. There are still lots of other cleanups pending, but this one is a purely cosmetic one.
2011-08-10Initial version of Support for Nokia *Site BTSDieter Spaar12-1/+2163
This includes the MetroSite, but also other Nokia BTS models.
2011-08-0904.08 / MNCC: elevate error messages to LOGL_ERRORHarald Welte1-5/+5
this way you can actually see them...
2011-08-09LAPD: Use proper log levels and prefix all messages with LAPDHarald Welte1-24/+27
2011-08-09LAPD: Remove all calls to 'assert' from the codeHarald Welte1-4/+11
For a system-level daemon, no protocol parser error should ever call assert, which would take down the entire process.
2011-08-09DAHDI: Fix case where we have multiple E1 ports/cards (spans)Harald Welte1-1/+7
DAHDI creates one device node for every E1 timeslot, starting from '1', and keeps incrementing that number even for additional ports/cards. Thus, we have to use the e1inp_line number multiplied by 31 as a base.
2011-08-05GPRS: Fix the parsing/interpretation of the PDP CTX status IEHarald Welte1-8/+16
The byte ordering is a bit odd: The least significant byte is ahead of the most significant byte, different from everything else in GSM that seems to be big-endian. Thanks to Seungju Kim <admin@manateeshome.com> for repoerting the bug.
2011-07-29Merge branch 'master' of git.osmocom.org:openbscHarald Welte38-117/+281
2011-07-27TRAU: Properly initialize idle framesDieter Spaar1-3/+29
This is particularly important in case of the Nokia BTS, as they seem to drop the RF/signalling channel if they don't get proper TRAU frames.
2011-07-27BSC VTY: Accept MNC of 0-999, as 0 is a valid MNCDieter Spaar1-1/+1
2011-07-27RSL: Fix erroneous GSM48_IE_CHANDESC_2 in rsl_chan_activate_lchan()Dieter Spaar1-1/+1
This fixes a bug introduced more than one year ago in commit e38bd6caa34005816a9336f021fd17d328d5c901: The RSL_IE_CHAN_IDENT is a TLV, but the GSM48_IE_CHANDESC_2 contained in it, is a mere TV type IE with fixed length. The problem specifically has caused problems on Nokia MetroSite BTS, which apparently read the TSC out of this Layer3 IE.
2011-07-27LLC: Fix format stringDieter Spaar1-1/+1
2011-07-27GPRS: Fix buffer overflow in case of very long MS RA CAP IEHarald Welte2-4/+10
The MS Radio Access Capability IE can be _very_ long in some recent high-end mobile phones, way beyond the old 14-byte limit. We increase our array to 52 bytes, and make sure not to overflow that buffer.