aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
AgeCommit message (Collapse)AuthorFilesLines
2015-07-22sub: Add the ability to set prefix for randomly generated extensionsIvan Kluchnikov2-2/+3
Prefix is added before randomly generated extension. Prefix is useful in case of "accept-all" authentication mode is used and routing based on number prefix is used. Added optional configuration parameter "extension-prefix".
2015-05-30libbsc: Abstract out SIs update/generation for a BTS into a separate function.Alexander Chemeris1-0/+1
The code to do that doesn't belong to the control interface, so abstract it out to a separate function gsm_bts_set_system_infos().
2015-05-26osmo-nitb support for codec negotiationAndreas Eversberg2-6/+4
The caller's most preferred codec is selected out of the union of codecs, which both parties support. Since codec negotiation is done automatically, there is no need to define codec for TCH/F and TCH/H via VTY anymore. Conflicts: openbsc/src/libmsc/gsm_04_08.c openbsc/src/libmsc/vty_interface_layer3.c
2015-05-26Add full AMR multirate IE support with VTY config for MS and BTS sideAndreas Eversberg3-4/+15
Conflicts: openbsc/include/openbsc/gsm_data_shared.h openbsc/src/libbsc/bsc_vty.c openbsc/src/libbsc/chan_alloc.c
2015-05-26Add option to set RADIO LINK TIMEOUT value via VTYAndreas Eversberg1-0/+14
2015-05-26Allow dynamic RTP payload types between application and MNCC interfaceAndreas Eversberg2-0/+4
Since EFR/AMR/HR codecs use dynamic RTP payload, the payload type can be set. If it is set, the frame type must be set also, so OpenBSC knows what frame types are received via RTP. This modification only affects traffic beween application and MNCC interface, not the RTP traffic between OpenBSC and BTS. Conflicts: openbsc/src/libtrau/rtp_proxy.c
2015-05-26Add traffic forwarding via RTP to remote applicationAndreas Eversberg4-3/+19
Instead of forwarding traffic through MNCC interface, traffic can be forwarded to a given RTP peer directly. A special MNCC message is used to control the peer's destination. The traffic can still be forwarded through MNCC interface when this special MNCC message is not used. It also works with E1 based BTSs. In conjunction with LCR's "rtp-bridge" feature, the RTP traffic can be directly exchanged with a remote SIP endpoint, so that the traffic is not forwarded by LCR itself. This way the performance of handling traffic only depends on OpenBSC and the remote SIP endpoint. Also the traffic is exchanged with the SIP endpoint without transcoding, to have maximum performance. Increment MNCC version to 5. Conflicts: openbsc/tests/gbproxy/gbproxy_test.c
2015-05-05sgsn: Store subscribed QoS and attempt to use itHolger Hans Peter Freyther2-0/+3
sgsn_create_pdp_ctx should use the subscribed QoS. When selecting the PDP context we inject the QoS to be used into the TLV structure and use it during the request. Assume a "qos-Subscribed" structure only with three bytes and prepend the Allocation/Retention policy to the request.
2015-05-05sgsn: Copy the msisdn to the sgsn_data and use it in PDP activationHolger Hans Peter Freyther1-0/+3
The MSISDN should be present for "security" reasons in the first activation of a PDP context. Take the encoded MSISDN, store it for future use and then put it into the PDP activation request. The MM Context contains a field for a decoded MSISDN already. As we need to forward the data to the GGSN I want to avoid having to store TON and NPI in another place. Simply store the data in the encoded form.
2015-05-05gsup: Extract the QoS fieldHolger Hans Peter Freyther1-0/+3
Add roundtrip test for the new QoS IE. It will be consumed in later commits.
2015-05-05gsup: Extract the new MSISDN stringHolger Hans Peter Freyther1-0/+4
Extract the new MSISDN IE from the GSUP message and verify that it is read/written to the message.
2015-05-03bsc: Add access list filtering to the BSCHolger Hans Peter Freyther1-0/+2
2015-05-03bsc: Add access lists to the MSC and the BSCHolger Hans Peter Freyther2-0/+7
It is a bit arbitary to decide which one is the global and which one is the local one. We might change it around. I don't think we want to introduce it based on BTS.
2015-05-03filter: Move the con_type into the filter_stateHolger Hans Peter Freyther3-11/+12
2015-05-03filter: Move from DNAT to DFILTER categoryHolger Hans Peter Freyther1-0/+1
2015-05-03filter: Remove bsc_connection from the filter APIHolger Hans Peter Freyther1-5/+11
Remove the last occurence of NAT datastructures in the filtering module and add the ctx to the filter request structure.
2015-05-03filter: Remove nat_sccp_connection from public APIHolger Hans Peter Freyther2-5/+10
2015-05-03filter: Separate SCCP/BSSAP extraction and gsm48 codeHolger Hans Peter Freyther2-4/+15
For the BSC we will have the gsm48_hdr and don't need to find data within SCCP. For legacy reasons we need to initialize con_type, imsi, reject causes early on and need to do the same in the filter method.
2015-05-03filter: More renaming and remove of "NAT" from itHolger Hans Peter Freyther1-7/+7
2015-05-03filter: Rename BSC to LOCAL and NAT to GLOBALHolger Hans Peter Freyther1-2/+2
2015-05-03filter: Remove nat from bsc_nat_acc_lst and replace with msgHolger Hans Peter Freyther1-9/+9
2015-05-03filter: Cease out "struct bsc_nat" from the APIHolger Hans Peter Freyther1-4/+3
This means we need to require a talloc context and simply operate on the list. I had considered creating a structure to hold the list head but I didn't find any other members so omitted it for now.
2015-05-03filter: Move VTY code into the filter moduleHolger Hans Peter Freyther1-0/+4
2015-05-03filter: Move the access list management aroundHolger Hans Peter Freyther2-8/+9
2015-05-03filter: Move the method definition to the filter moduleHolger Hans Peter Freyther3-57/+72
Move the filter methods to the filter module. This is still only usable for the NAT and the _dt/_cr filter routines need to move back to the bsc_nat in the long run.
2015-05-02mgcp: Fix compiler warning on 64bit buildsHolger Hans Peter Freyther1-1/+1
ENDPOINT_NUMBER takes the difference of two pointers. On 64bit builds the difference is a long and the compiler then complains about the usage of abs. We will never have thousands of endpoints so silence the warning by casting the ENDPOINT_NUMBER to int. mgcp_vty.c:1381:34: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] rtp_port = rtp_calculate_port(ENDPOINT_NUMBER(endp), ^ ../../include/openbsc/mgcp_internal.h:206:31: note: expanded from macro 'ENDPOINT_NUMBER' #define ENDPOINT_NUMBER(endp) abs(endp - endp->tcfg->endpoints) ^ mgcp_vty.c:1381:34: note: use function 'labs' instead
2015-04-29sub: Remove the queue from the subscriber codeHolger Hans Peter Freyther3-6/+11
The idea of "subscriber_get_channel" was that different requests would be coordinated. At the same time we have seen that the "queue" can get stuck at both 31C3 and the rhizomatica installations. Voice calls and SMS do not need coordination. We should be able to send SMS on a voice channel and switch the MS from a SDCCH to a TCH in case we establish a voice call. The SMS code itself needs to coordinate to obey the limit of one SMS per direction but this should be enforced in the sms layer and not on the subscriber. Modify the code to have a simple paging coordination. The subscriber code will schedule the paging and register who would like to know about success/failure. This allowed to greatly simplify the paging response handling for the transaction code (and in fact we could move the transaction list into the subscriber structure now). The code gained to support to cancel the notification of a request (but not the paging itself yet). TODO: Cancel paging request in case no one cares about it anymore.
2015-04-29sub: Remove introspection of the "channel queue"Holger Hans Peter Freyther1-5/+0
Over the next commits the queuing of commits will be completely modified to remove the queue and move the scheduling/limits to the outer callers.
2015-04-24mgcp: Allow to disable transcoding for trunksHolger Hans Peter Freyther1-0/+2
We might have compiled transcoding into the MGW but we don't want to enable it for a given user. Add a new switch that should allow that. I had manually tested the allow-transcoding/no allow VTY interface for the primary interface and a new trunk using show running-config.
2015-04-23nat: Make mode-set patching optionalHolger Hans Peter Freyther1-1/+2
2015-04-05nat: Inform others if an IMSI is rejectedHolger Hans Peter Freyther1-0/+4
In case one wants to monitor the access lists one there is now a trap for the IMSI.
2015-04-04bts: "Repair" broken channels if we receive the release ackHolger Hans Peter Freyther1-0/+11
We had issues with odd behavior on the nanoBTS which lead to the introduction of the "broken" state. On busy multi BTS cells (e.g. rhizomatica) with wifi backhaul the timeout we set to wait for a RF Channe Release ACK is sometimes too little and channels are marked broken that look to be okay (besides the still to be determined delay). In case of a sysmoBTS we now know that we can change the state of a broken channel back to normal in case we do receive the right response. Manually verified using the Smalltalk BTS code PackageLoader fileInPackage: 'FakeBTS' bts := FakeBTS.BTS new. bts btsId: '1903/0/0'. bts connect: 'localhost'. bts waitForBTSReady. test := FakeBTS.OpenBSCTest new. test bts: bts. test requireAnyChannel ... wait for NITB output <0004> abis_rsl.c:223 (bts=0,trx=0,ts=0,ss=0) Timeout during deactivation! Marked as broken. ... process pending messages stdin next <0004> abis_rsl.c:735 (bts=0,trx=0,ts=0,ss=0) CHAN REL ACK for broken channel. Releasing it. So the channel went from broken to unallocated.
2015-04-01bsc: Allow to use different LAC/CI for the core-networkHolger Hans Peter Freyther1-2/+4
We need to use different LAC/CI towards the core network. It is a bit problematic as LAC/CI is a per BTS attribute so this feature only works if a BSC manages everything in the same LAC. Related: SYS#1398
2015-03-22rtp: Use osmocom/netif/rtp.h for the rtp structure definitionHolger Hans Peter Freyther2-40/+1
We depend on libosmo-netif unconditionally. Let's use this definition of rtp and have one portability issue less.
2015-02-07nokia: Allow to set the reset time for the nokia btsSipos Csaba1-0/+1
2015-02-06Revert "gprs: Block other GSUP procedures during PURGE_MS"Jacob Erlbeck1-12/+0
This reverts commit f81cacc6814dde73f203d125b0065d1451a98317. Since the PURGE MS retry mechanism had been removed, this feature is not used anymore. It just makes the code more complex. Conflicts: openbsc/include/openbsc/gprs_sgsn.h openbsc/src/gprs/gprs_subscriber.c openbsc/tests/sgsn/sgsn_test.c
2015-02-06sgsn: Select GGSN based on APNJacob Erlbeck1-0/+5
Currently the APN IE in the Activate PDP Contex Request and the PDP data that is stored with the subscriber is ignored completely. This commit adds the sgsn_mm_ctx_find_ggsn_ctx that checks the APN IE against the subscriber's PDP data entries if both are present. If there is no match, the request is rejected. If an APN IE has not been included but PDP data entries are present, the function checks all of these entries against the static 'apn' configuration to find a suitable entry. If an APN has not been determined so far and any APN is allowed, the configuration is checked with an empty APN string, to allow for default configurations based on the IMSI prefix only. If nothing of this succeeded but the request wasn't rejected either, and there is no 'apn' configuration at all or if any APN is allowed but a default configuration ist not present, the GGSN with id 0 is used (if present). Otherwise the request is rejected ('missing APN'). Ticket: OW#1334 Sponsored-by: On-Waves ehf
2015-02-06sgsn: Add sgsn_ggsn_ctx_free functionJacob Erlbeck1-0/+1
This function will be needed for testing, since the leak check would fail if the GGSN context are not cleaned up after use. Sponsored-by: On-Waves ehf
2015-02-06sgsn: Add functions to handle APN contextsJacob Erlbeck1-0/+6
This commit adds the exported functions apn_ctx_find_alloc, apn_ctx_free, apn_ctx_by_name, and apn_ctx_match to manage and retrieve APN to GGSN mappings. The following VTY commands are added to 'config-sgsn': - apn APN ggsn <0-255> - apn APN imsi-prefix PREFIX ggsn <0-255> which maps an APN gateway string to an SGSN id. The SGSN must be configured in advance. When matching an APN string, entries with a leading '*' are used for suffix matching, otherwise an exact match is done. When a prefix is given, it is matched against the IMSI. If several entries match, a longer matching IMSI prefix has precedence. If there are several matching entries with the same PREFIX, the entry with longest matching APN is returned. Ticket: OW#1334 Sponsored-by: On-Waves ehf
2015-02-06sgsn: Add PDP info to subscriber dataJacob Erlbeck1-0/+12
Currently the PDP info that is transmitted via GSUP is just parsed and then discarded. This commit adds a new data structure sgsn_subscriber_pdp_data and maintains a list of those in sgsn_subscriber_data. The PDP data is copied from an incoming GSUP UpdateLocationResult message. If that message contains the PDPInfoComplete flag, the list is cleared before new entries are added. The 'show subscriber cache' output now also shows the PDP data entries. Note that the InsertSubscriberData message is still not supported. [hfreyther: Added talloc_free in gprs_subscr_pdp_data_clear] Sponsored-by: On-Waves ehf
2015-02-05osmo-bts: Introduce new struct for a power loop in the BTS codeHolger Hans Peter Freyther1-0/+7
Keep track if the power level has been "fixed" by the BSC, otherwise keep track of the currently ordered one. The ms_power is the initial value set by the BSC and continues to be used.
2015-01-31bsc/nitb: Allow to set the GPRS mode through the ctrl commandHolger Hans Peter Freyther1-1/+2
Create a control command to read and modify the gprs mode. Use the get_string_value to indicate if the value was found or not. This is useful for the ctrl interface where I didn't want to replicate "none", "gprs" and "egprs". Share code to verify that a BTS supports the mode. Related: SYS#591
2015-01-28sgsn: Add sgsn_mm_ctx_cleanup_free for safe shutdownJacob Erlbeck1-0/+1
Currently the MM context cleanup code is distributed over several functions. sgsn_mm_ctx_free not only frees data structure but also eventually stops the timer and does the subscriber clean-up. mm_ctx_cleanup_free (gprs_gmm.c) cleans up the PDP contexts and unassign the TLLI. This commit moves the cleanup code from both functions into a new unifying function sgsn_mm_ctx_cleanup_free that cares about the clean-up of all related sub-systems. Sponsored-by: On-Waves ehf
2015-01-28sgsn: Don't allow mmctx == NULL in sgsn_update_subscriber_dataJacob Erlbeck1-2/+1
Currently, sgsn_update_subscriber_data can be called with mmctx == NULL and will find and associate the right context (if present) based on the subscriber's IMSI. This will not happen in regular use any more, since sgsn_update_subscriber_data will only be called when subscribers are used (auth mode 'remote') and in this case gprs_subscr_get_or_create_by_mmctx will already be called by sgsn_auth_request. Therefore, MM context and subscriber are always associated except for some test cases and experimental VTY usage. The current implementation of sgsn_update_subscriber_data also causes additional complexity for the deletion on MM contexts to avoid a ipossible double-free MM contexts. This commit removes the MM context <-> subscriber association code from sgsn_update_subscriber_data. That function must always be called with mmctx != NULL, now. To avoid problems with VTY and test usage, the calling subscriber function now only call sgsn_update_subscriber_data when mmctx != NULL, since the purpose of that function is to update that state of an existing MM context after subscriber data has been changed. Sponsored-by: On-Waves ehf
2015-01-27nitb: Make the last change configurableHolger Hans Peter Freyther1-0/+1
Introduce a NITB node and add the subscriber creation as config name in there.
2015-01-27nitb: Allow the network to decide if a subscriber should be createdHolger Hans Peter Freyther1-0/+1
2015-01-27gprs: Rename gprs_subscr_delete to gprs_subscr_cleanupJacob Erlbeck1-1/+1
The old name is somewhat misleading. The function is rather preparing the subscriber for a subsequent subscr_free, that is possibly invoked by a subscr_put. It detaches the subscriber from the MM context and optionally invokes a PURGE_MS procedure. Therefore the _cleanup suffix is chosen (see mm_ctx_cleanup_free). Sponsored-by: On-Waves ehf
2015-01-26gprs: Do not put the subscr in gprs_subscr_deleteJacob Erlbeck1-1/+1
Currently gprs_subscr_delete implicitely calls subscr_put, which makes the code more complex than necessary (additional subscr_get) in a few places. It also makes it more difficult to see, whether get/put are balanced within a function. In addition, the functions are not named consistently (gprs_subscr_delete vs. gprs_subscr_put_and_cancel). This commit changes the semantics of gprs_subscr_delete and indirectly of gprs_subscr_put_and_cancel to not call subscr_put on their argument, but to leave that for the caller to do it explicitely. It renames gprs_subscr_put_and_cancel to gprs_subscr_cancel to reflect that change in the name, too. Sponsored-by: On-Waves ehf
2015-01-26sgsn: Remove the "permanent" subscriber cacheHolger Hans Peter Freyther2-6/+0
The subscriber cache would help in case: * GPRS DETACH, GPRS ATTACH. In that case we might still have some cached authentication tuples we avoid another sendAuthenticationInfo request. * After a detach the cache expiry would make sure to eventually send a purgeMS to the HLR (which might be ignored). At the same time to make the cache work we will need to make sure to start and stop timers. In case we don't start we might accumulate subscribers. I am afraid that the above two benefits do not outweight the complexity of this implementation.
2015-01-26sgsn: Remove inactive LLME/MM after inactivity timeoutJacob Erlbeck4-0/+10
Currently old LLMEs and MM contexts that haven't been explicitly detached or cancelled are not removed until another request with the same IMSI is made. These stale entries may accumulate over time and severely compromise the operation of the SGSN. This patch implements age based LLME expiry, when the maximum age has been reached, the corresponding MM context is cancelled. If such an MM context doesn't exist, the LLME is unassigned directly. The implementation works as follows. - llme->age_timestamp is reset on each received PTP LLC message - sgsn_llme_check_cb is invoked periodically (each 30s) - sgsn_llme_check_cb sets the age_timestamp to the current time if it has been reset - sgsn_llme_check_cb computes the age and expires the LLME if it exceeds gprs_max_time_to_idle() Ticket: OW#1364 Sponsored-by: On-Waves ehf [hfreyther: Fix typo in comment LMME -> LLME]