aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_api.c
AgeCommit message (Collapse)AuthorFilesLines
2018-03-22backport support for 3-digit MNC with leading zerosneels/mnc3Neels Hofmeyr1-34/+13
Backport the patches with the following change-ids: osmo-bsc.git: I5b097dbb6329f284e3b4914a744d5c3ad628f715 I8e722103344186fde118b26d8353db95a4581daa I78f30aef7aa224b2e9db54c3a844d8f520b3aee0 I38ac98a4d25159cfd4f686efbfbaf8f00625a6d8 osmo-iuh.git: I29ebcddd45fe3079f8883589a83cc7216a535475 Also apply change of ipac_bcch_info.cgi to struct osmo_cell_global_id in src/ipaccess/network_listen.c, a change that appears to not have been necessary in the new split repositories. Related: OS#3010 Change-Id: Ibf50fd7e1ca5472d0a38fcb87c68227d6de44f42
2017-02-24cosmetic: rename struct osmo_msc_data to bsc_msc_dataNeels Hofmeyr1-11/+11
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I0dfbcb7d1a579211180f71319982820d8700afab
2017-02-24cosmetic: rename osmo_msc_data.h to bsc_msc_data.hNeels Hofmeyr1-1/+1
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I13554563ce9289de126ba0d4cf329bafcda35607
2016-12-02split subscr_con_allocate()/_free() in bsc_ and msc_Neels Hofmeyr1-1/+1
Rename current subscr_con_allocate() and subscr_con_free to bsc_*, and add two separate msc_subscr_con_allocate() and _free(). The msc_subscr_con_free() ignores all lchan members. In libbsc use bsc_*, in libmsc use msc_*. Change-Id: I3cf7c7cafdf4672ec7b26058bba8a77159855257 Future: there will be distinct subscr conns for libbsc and libmsc.
2016-12-02factor out gen of USSD notify and release complete to libosmocoreNeels Hofmeyr1-2/+2
Both libmsc and libbsc will need distinct gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() functions, since there will be distinct subscriber connection structs. Rename to msc_send_ussd_notify() and msc_send_ussd_release_complete(), and add the same in libbsc with bsc_ prefix in new file gsm_04_80_utils.c. In preparation of this patch, the message generation part of these functions has been added to libosmocore as gsm0480_create_ussd_notify() and gsm0480_create_ussd_release_complete(). Use these. Adjust all libmsc and libbsc callers according to use the msc_* or bsc_* implementation, respectively. Change-Id: I33a84e3c28576ced91d2ea24103123431f551173
2016-03-1504.08: apply new bitmask functions, fix bitmask useNeels Hofmeyr1-4/+4
Replace hardcoded protocol discriminator and message type bitmasks with function calls recently introduced in libosmocore. Note that the release 98 bitmasks slightly differ from the release 99 bitmasks. This patch uses the "default" gsm48_hdr_msg_type invocation, thus it depends on libosmocore whether 98 or 99 bitmasks are used. In some places, use of the bitmask was erratic. Fix these implicitly by employing the bitmask functions: * silent_call.c: silent_call_reroute(): add missing bitmask for MM. * bsc_msg_filter.c: bsc_msg_filter_initial(): RR vs. MM messages. * osmo_bsc_filter.c: bsc_find_msc() and bsc_scan_bts_msg(): RR vs. MM messages. * bsc_nat_rewrite.c: bsc_nat_rewrite_msg(): SMS vs. CC messages. * bsc_ussd.c: no bitmask is applicable for the message types used here. * gb_proxy.c: gbproxy_imsi_acquisition(): missing bit mask for pdisc. In gprs_gb_parse.c: gprs_gb_parse_dtap(), add a log notice for unexpected message types.
2015-10-02amr: Attempt to unbreak the AMR support in the BSCHolger Hans Peter Freyther1-11/+25
The signature of mr_config and the BSC implementation didn't match and the compiler was warning about it: osmo_bsc_api.c:530:2: warning: initialization from incompatible pointer type .mr_config = bsc_mr_config, ^ osmo_bsc_api.c:530:2: warning: (near initialization for ‘bsc_handler.mr_config’) Change the mr_config again and provide an implementation that will set the ms and bts data structure. It would be better to put the size outside of the IE but I am not going to change it right now. It would also be nice to either move the AMR setting into the "nitb" structure or have the msc data be used _after_ the bts settings. This needs to be cleaned up in the next step. Manually verified by placing a MO call and checking that both the channel mode modify and the mode modify request contain the multi rate config with the rate mr config (length two bytes, version 1, icmi==1, no start mode being set).
2015-07-13bsc: Rename core_ncc to core_mncHolger Hans Peter Freyther1-2/+2
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-05-03bsc: Send a LU Reject in case it has been filteredHolger Hans Peter Freyther1-8/+42
In case we filter the request and it was a Location Updating Procedure we should reject it.
2015-05-03bsc: Add access list filtering to the BSCHolger Hans Peter Freyther1-2/+54
2015-05-03filter: Move the con_type into the filter_stateHolger Hans Peter Freyther1-0/+1
2015-04-01bsc: Allow to use different LAC/CI for the core-networkHolger Hans Peter Freyther1-3/+20
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
2014-10-29bsc: Allow to disable sending ping/pong to the MSCHolger Hans Peter Freyther1-1/+1
Some switches do not like to receive the IPA PING/PONG messages. Allow to disable the handling with "no timeout-ping" and create test cases that verify the switching between the modes. Change the code to trat <= 0 as an invalid timeout. Fixes: SYS#713
2014-09-05bsc: Add a "IPA PING" to the SCCP CR messagesHolger Hans Peter Freyther1-1/+11
We want to reduce the background traffic and might set the ping interval to be in the range of minutes. But this means that if the TCP connection is frozen several "SCCP CR CM Service Requests" will be stuck in the send queue without ever being answered. I could have used the logic of not receiving the "SCCP CC" to close the connection but instead I am introducing an overload to schedule the ping as part of the normal SCCP connection establishment. The VTY write case has been manually verified, I have also looked at a single trace to see that the SCCP CR and the IPA PING is transfered in the same ethernet frame.
2013-11-01bsc/ussd: Rename bsc_send_ussd_notification()Jacob Erlbeck1-5/+6
Rename this function to bsc_send_ussd_no_srv() since it's a rather specialised function and not a generic USSD notification function. Sponsored-by: On-Waves ehf
2013-11-01bsc/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 to finish the establishment of the MM connection according to 3GPP TS 04.10/3.2.1 before the USSD notification is sent. 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-31Revert "bsc/ussd: Send faked CM Service Accept before sending USSD"Holger Hans Peter Freyther1-11/+6
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-6/+11
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-09-11ussd: Send USSD on call setup on MSC errorsJacob Erlbeck1-1/+57
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-01-07audio: Make the BSC handle the new mr_config request of the BSC APIHolger Hans Peter Freyther1-0/+29
Handle the mr_config request and set the AMR multirate config for the given MSC. Initialize the mr_config with the AMR5.9 default we have been using until now.
2013-01-07bsc: Blind fix to deal with phones sending a dialplan of 0Holger Hans Peter Freyther1-2/+2
2013-01-07bsc: Fix crash when the new route is not availableHolger Hans Peter Freyther1-1/+1
When we are asked to route calls on a local link and the link is not available we would crash when trying to send a packet over a deadline. When we have decided to move a connection it is guranteed that the current SCCP connection will vanish, we either migrate to another MSC or the RSL/subscriber connection will be closed.
2013-01-07bsc: Inspect a CC Setup message and attempt to reroute the trafficHolger Hans Peter Freyther1-3/+113
Inspect the CC Setup messages and if the dialed number is matching the regexp of the local MSC the connection will be rerouted. The original MSC will get a GSM0808 CLEAR REQUEST, a new connection with a CC Setup message will be opened.
2012-09-11bsc: Move the finding of a MSC into the filter codeHolger Hans Peter Freyther1-20/+1
For responding to paging on the right link we will need to figure out if the msg is a paging response.
2012-09-11bsc: Select a MSC in a round-robin fashionHolger Hans Peter Freyther1-1/+28
Select a MSC, add it to the back of the list after we have selected it.
2012-03-16bsc: Move away from ->bsc.msc to use the selected MSCHolger Hans Peter Freyther1-10/+13
For multiple MSCs we should only have one place where the MSC is selected and the rest will extract it from somewhere.
2012-03-16bsc: Create a osmo_bsc_data and embed osmo_msc_dataHolger Hans Peter Freyther1-6/+6
We want to have multiple MSCs but we also have some data that is only present on a per BSC basis. Right now the MSC data is not allocated with talloc, so we have some change in the talloc contexts.
2012-03-16bsc: Fix compiler warning about wrong return and unused variableHolger Hans Peter Freyther1-2/+1
osmo_bsc_api.c: In function ‘bsc_cm_update’: osmo_bsc_api.c:195:2: warning: ‘return’ with a value, in function returning void [enabled by default] osmo_bsc_api.c:193:28: warning: unused variable ‘sccp’ [-Wunused-variable]
2012-01-23Move processing of CLASSMARK CHANGE behind bsc_apiHarald Welte1-0/+14
This prevents osmo-bsc from sending RR messages to the MSC and rather process them inside the BSC and turn them into BSSAP CM UPDATE.
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-07-19bsc: Fix a memory leak when the BSC is not allowed to open a connectionHolger Hans Peter Freyther1-0/+4
When the BSC is refusing to open an outgoing connection the SCCP connection was leaked. Use the normal free as the socket should be either closed or disconnected.
2011-07-12osmo-bsc: Some more logging (LOGL_INFO).Harald Welte1-0/+12
2011-03-23Fix build of bsc-nat and GPRS code after include path changeHarald Welte1-2/+2
The last patch changed the osmocore include paths, this fixes some build problems caused by it
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-2/+2
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-03re-structure the OpenBSC directory layoutHarald Welte1-0/+174
The new structure divides the code into a number of libraries for the BSC core functionality, MSC core functionality, Abis transport, TRAU and other bits. This doesn't introduce any functional code change but simply moves around files and alters Makefile.am accordingly. Next step would be to disentangle a lot of the inter-library dependencies and make the individual bits of code more independent.