aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-12-21stats/mgcp: Initialize the statistics for MGCP as wellzecke/stable/0.14Holger Hans Peter Freyther1-0/+7
There are currently no reate counters but this will hopefully change in the near future.
2015-12-21stats: Set class_id in rate_ctr group descriptionsJacob Erlbeck5-0/+11
This commit adds the class_id initialiser to all rate_ctr_group_desc definitions. Sponsored-by: On-Waves ehf
2015-12-21stats: Enable stats for sgsn, gbproxy, nitb, bsc, natJacob Erlbeck6-1/+19
This commit initialises and enables the stats subsystem for the given binaries. Sponsored-by: On-Waves ehf
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]
2015-08-17mgcp: Test we don't crash on the NAT dummy MGCP messageHolger Hans Peter Freyther1-0/+22
We want the port and IPv4 address to be extracted but don't expect any change in audio codecs.
2015-08-17mgcp: Avoid crashing when rtpmap is not completeHolger Hans Peter Freyther2-3/+6
The NAT sends an incomplete SDP file for the purpose of informing the BSC about the remote IP/PORT early. The case of an incomplete SDP file was not considered. Check if there is a codec and if not skip it. TODO: We need to have a better end-point life cycle test.
2015-08-14Merge branch 'zecke/features/sdp-codec-handling'Holger Hans Peter Freyther5-221/+421
Move forward while preserving the legacy handling. Beging to extract SDP rtpmap information and select codecs atfer this. It is a foundation we can now build further and better check ons.
2015-08-14mgcp: Allow to enforce that the codecs need to matchHolger Hans Peter Freyther4-4/+86
We have a lot of legacy that I am afraid to break. We have everything in place to make a good codec selection (e.g. if we can avoid transcoding, pick the one with best quality or the lowest speed). Right now I have a specific case where from all options I want to pick GSM. Guard the codec compat check behind the disallow transcoding option to make sure to not break legacy application.
2015-08-14mgcp: Turn SDP file parsing in a two stage processHolger Hans Peter Freyther1-28/+108
First collect everything we know and the mapping. E.g. a genuis could remap "3" to "AMR" so we only know the codecs once we are at the end of the SDP file. Once we have collected everything we can select the audio codecs. The current code is compatible in that two codecs will be selected regardless of if they make any sense or not. mgcp_set_audio_info could re-use some of our codec information but then the caller in the MGCP protocol needs to be updated as well as we use the "I: GSM" information to derive the codec from there.
2015-08-14mgcp: Move the SDP handling into a separate file/moduleHolger Hans Peter Freyther4-218/+259
The SDP file handling will get more complicated in terms of codec selection so let's remove it from the protocol handling before we start blowing it up in size.
2015-08-14mgcp: Remove unused parsing data structHolger Hans Peter Freyther1-3/+0
This struct was removed when we switched to strtok_r for parsing the data. Remove the left-over.
2015-08-13nat: Forward SDP files with multiple payload types in itHolger Hans Peter Freyther3-9/+10
The parsing code assumed that there will be a single payload type and this assumption is clearly wrong. Forward all of the payload types. The code is still only extracting the first type from the list. The variable name has been renamed to reflect this.
2015-08-12sms: Attempt to plug memory leaks seen at RhizomaticaHolger Hans Peter Freyther1-0/+2
Using the talloc leak report we see that there are some msgb's that are allocated for SMS but we don't have transactions or SMS around. We need to improve the name of the messages to uniquely dscribe where they are from but the obvious leak does occur in this routine. The no available transaction id is most likely the case where we leak memory. This should not occur and shows another issue with the smsqueue/smpp handling. It doesn't explain the subscr reference count issue either. Extract of the leak report: GSM 04.11 contains 1160 bytes in 1 blocks (ref 0) 0x2517dc0 GSM 04.11 contains 1160 bytes in 1 blocks (ref 0) 0x24b56e0 GSM 04.11 contains 1160 bytes in 1 blocks (ref 0) 0x23e7930
2015-08-08paging: Provide information about pending requestsHolger Hans Peter Freyther1-2/+8
For debugging it is nice to know how many requests are pending. Simply count it and print it besides the paging part.
2015-08-08Merge branch 'zecke/fixes/subscr-leak'Holger Hans Peter Freyther2-0/+3
At the rhizomatica sites some unauthorized subscribers have a last used from long time ago but a bigger reference count. This means that we have an unbalanced subscr_get/subscr_put that we need to investigate. These two fixes are genuine fixes but are unlikely to fix the issue I am not understanding yet.
2015-08-08subscr: Fix subscr refcount issue in case of message errorHolger Hans Peter Freyther1-0/+2
In case the SMPP payload didn't include the right fields we would leak the subscr reference count.
2015-08-08subscr: Fix potential subscr ref count issueHolger Hans Peter Freyther1-0/+1
In case the subscriber is currently busy we would omit the subscr_put. This seems to be very hard to hit as the subscr need to be active and at the same time be selected for the purge operation.
2015-08-08Merge branch 'zecke/changes/paging-order'Holger Hans Peter Freyther3-30/+24
Various paging clean-ups. I couldn't re-produce the assert that was hit by Rhizomatica in the subscriber code. Let's clean things up a bit to avoid some of the potential issues this code had. Always stop paging regardless of where the subscriber is at the time of the cancellation.
2015-08-03paging: Forget we were paging after the dispatchHolger Hans Peter Freyther1-1/+1
So in case somebody is starting paging from within a paging expired callback we would dispatch the paging request right away with the same failure.
2015-08-03paging: Stop paging everywhere before dispatching any signalHolger Hans Peter Freyther1-9/+9
2015-08-03paging: Go through all BTS to stop pagingHolger Hans Peter Freyther1-16/+9
As the comment says we should not rely that the paging occurs on the current LAC. We might page at more BTS. Walk all the BTS to stop paging. No callbacks will be issued by this stop operation.
2015-08-03paging: In case paging failed stop it everywhereHolger Hans Peter Freyther1-1/+3
In case we can't page on a BTS then stop it everywhere. The callers of paging_request assume that this is kind of an atomic operation and we should help with that.
2015-08-03paging: Move the silent_call code to use the subscriber requestHolger Hans Peter Freyther1-4/+3
Coordinate with the normal subscriber channel requests instead of going to page ourselves. This might lead to getting a channel that is of a different type though.
2015-08-0364bit: Fix compiler warnings in regard to 64bitHolger Hans Peter Freyther6-8/+8
vty_interface_layer3.c:584:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] sizeof(subscr->extension)-1, VTY_NEWLINE);
2015-08-01use non-vararg functions if possibleMax1-3/+3
Signed-off-by: Max <max.suraev@fairwaves.co>
2015-08-01Merge branch 'zecke/features/no-tmsi'Holger Hans Peter Freyther3-32/+89
When two phones use the same TMSI and no A3A8 is possible we could end in a hard to detect issue. Assume that the IMSI will not clash and we have issues for foreign simcards.
2015-08-01nitb: Add a mode to not use TMSI for normal operationHolger Hans Peter Freyther3-31/+88
In case foreign simcards are used we can not do authentication and ciphering. In case a TMSI is re-used too early and we do page using TMSI we can't know which of the two MS is responding to us. We could change the "secure channel" routine to ask for the IMSI and only then stop the paging. As we don't have ciphering there is not much use in using the TMSI. Add a mode "no assign-tmsi" that will not assign the TMSI during LU. Now CM Service Request and Paging Response will work using the IMSI. There can't be a clash with that. [ciaby fixed the vty write to use the right name]
2015-08-01nitb: Be less strict about the reject causeHolger Hans Peter Freyther1-1/+1
When we can't find the TMSI then the subscriber is not in our VLR. We have not consulted with the HLR and it is better to not use such a severe error code.
2015-08-01build: Include sys/socket.h for AF_UNSPECHolger Hans Peter Freyther1-0/+2
2015-08-01mgcp: Include enough socket data structures to build on freebsdHolger Hans Peter Freyther1-0/+3
in_address is not 'accidently' included by FreeBSD when we include the osmocom/core/select.h header file. We need to include a bit more. In file included from mgcp_protocol.c:38: ../../include/openbsc/mgcp_internal.h:134:21: error: field has incomplete type 'struct sockaddr_in' struct sockaddr_in forward;
2015-07-13sms: Fix the non-SMPP mode of the testHolger Hans Peter Freyther1-3/+4
List needs to be executed from within the right configuration node to see if it is available or not. list on the toplevel will uncoditionally show "smpp" as part of the logging config.
2015-07-13bsc: Rename core_ncc to core_mncHolger Hans Peter Freyther5-9/+9
Struct osmo_msc_data contains int core_ncc, which is actually the MNC part of the PLMN, not to be confused with the Network Colour Code. The following patch renames this field for clarity and consistency with the standards.
2015-07-13Merge branch 'zecke/features/smpp-route'Holger Hans Peter Freyther5-41/+136
2015-07-13sms: Do not go through the routing a second timeHolger Hans Peter Freyther1-1/+7
If we have tried SMPP first and it was not routable, and then tried the local delivery there is no point in trying SMPP with the same parameters again. Leave early and return unknown sub to the caller.
2015-07-06sms: Add a way to always route SMS through SMPP systemsHolger Hans Peter Freyther5-0/+73
default-route would only be looked at after there has been no subscriber in the local database. Depending on the setup this is not what one wants. This has been discussed at the OsmoDevCon and there have been hacks in some branches. Let's introduce a VTY command to select if SMPP should be consulted first and then fallback to the current behavior.
2015-07-06sms: Simplify the return handling for SMPP routes/unroutableHolger Hans Peter Freyther1-2/+1
2015-07-06sms: Put the try_deliver into the header fileHolger Hans Peter Freyther2-2/+8
Even if it is using BSC/NITB types let's put it in the header file than just declaring it at a place that could bitrot in a way that doesn't lead a warning.