aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_api.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-22Add extra debug output with channel mode and typeMax1-2/+4
This provides helpful information for debugging internal MNCC handler.
2016-03-1504.08: apply new bitmask functions, fix bitmask useNeels Hofmeyr1-3/+5
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-1/+1
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-10-02amr: Instead of putting ms/bts into the same struct.. use it twiceHolger Hans Peter Freyther1-2/+2
This way a lot of if/else can just be killed by the caller deciding which of the two instances to use. I have copied both branches to new files, replace bts for ms in one of them and ran diff on it. There is no difference.
2015-09-22Add full AMR multirate IE support with VTY config for MS and BTS sideAndreas Eversberg1-7/+21
2015-01-01Fix most compiler warnings with gcc-4.9.2Harald Welte1-2/+3
2014-08-08bsc: Add a ctrl command to send a ussdNotify for a callHolger Hans Peter Freyther1-0/+5
Send a non-call related SS message for an active call indentified by the CIC of that call. As an ugly hack the order of the SS release and the invocation are changed. That was necessary for the E71 on a TCH. The time between notify and release was just too short. The right would be to wait for the returnResultLast but this would involve keeping more local state. Let's see how far we get here. It might be necessary to change the order in the other call sites as well.
2014-08-04dyn PDCH: Cleanup of rsl_chan_activate_lchan() and usersAndreas Eversberg1-1/+2
Timing advance is stored inside lchan structure, so it is removed from arguments. This is useful, if other actions are required prior calling rsl_chan_activate_lchan. (like deactivating PDCH first) The "shifted TA value" that is required by BS11 is now calculated inside rsl_chan_activate_lchan and not by each user. [Rebased by Holger. So some hunks were skipped as the patch depended on Jolly's HO code]
2014-01-27Add function to update TRAU muxer after assignment or handoverAndreas Eversberg1-0/+5
E1 based BTS use TRAU muxer to decode TRAU frames. After changing channel from one timeslot to another (due to handover or assignment), the TRAU muxer must be updated. The call reference of the call is disconnected from the old channel and connected to the new channel.
2013-07-27misc: Fix compilation warningsHolger Hans Peter Freyther1-2/+2
bsc_api.c:417:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] bsc_api.c: In function ‘handle_ass_fail’: bsc_api.c:458:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] db.c: In function ‘db_sync_subscriber’: db.c:785:3: warning: format ‘%i’ expects argument of type ‘int’, but argument 8 has type ‘time_t’ [-Wformat] osmo_msc.c: In function ‘msc_release_connection’: osmo_msc.c:145:20: warning: unused variable ‘trans’ [-Wunused-variable] smpp_smsc.c: In function ‘link_accept_cb’: smpp_smsc.c:891:24: warning: assignment from incompatible pointer type [enabled by default] smpp_smsc.c:271:1: warning: ‘esme_by_system_id’ defined but not used [-Wunused-function] smpp_openbsc.c: In function ‘smpp_openbsc_init’: smpp_openbsc.c:545:2: warning: implicit declaration of function ‘smpp_vty_init’ [-Wimplicit-function-declaration] osmo_bsc_ctrl.c: In function ‘verify_bts_loc’: osmo_bsc_ctrl.c:340:19: warning: variable ‘height’ set but not used [-Wunused-but-set-variable smpp_mirror.c: In function ‘main’: smpp_mirror.c:297:2: warning: implicit declaration of function ‘osmo_init_logging’ [-Wimplicit-function-declaration]
2013-01-07audio: Make the BSC handle the new mr_config request of the BSC APIHolger Hans Peter Freyther1-0/+6
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.
2012-12-23rsl: Call the release function with the enum name and not the numberHolger Hans Peter Freyther1-7/+7
Done with the semantic patch: @rule1@ expression E; expression F; @@ - lchan_release(E, F, 1); + lchan_release(E, F, RSL_REL_LOCAL_END); @rule2@ expression E; expression F; @@ - lchan_release(E, F, 0); + lchan_release(E, F, RSL_REL_NORMAL);
2012-08-29reimplement chan_compat_with_mode() to take care of CSDHarald Welte1-9/+34
2012-08-29bsc_api: Invert logic of chan_compat_with_mode()Harald Welte1-4/+4
A function called this way should return 1 if it is compatible, so something like "if (!chan_compat_with_mode())" will check if it is not compatible.
2012-07-16BSC API: Don't treat a RRLP message as NOTICE eventHarald Welte1-0/+6
While generally we should log troly unknown RR messages, we can simply pass along RRLP messages (which aren't unknown!) In real networks, the RRLP would probably not end up at the MSC, but well, sometimes we don't care what real/classic networks do.
2012-04-26bsc_api: Fix wrong order of log category and level argumentsHarald Welte1-1/+1
2012-04-26bsc_api: log RR STATUS from MS as NOTICE, not DEBUG levelHarald Welte1-1/+1
2012-04-18lchan: Fix the name of the SACCH in the variable namesHolger Hans Peter Freyther1-2/+2
Call the channel by the right name.
2012-04-17bsc_api: Send RR Release and de-activate the SACCH on errorHolger Hans Peter Freyther1-2/+2
In case the connection should not be created/accepted release the channel by sending a RR Release and de-activating the SACCH. Phones should deal better with that behavior.
2012-04-11bsc: Allow to run a mixed TCH/H, TCH/F configurationHolger Hans Peter Freyther1-4/+22
In case the call handling starts on a TCH/H switch to a TCH/F if fullrate is requested. Add a method that is used to determine if the mode and current channel are compatible with each other.
2012-01-23Move the bulk of RR processing from MSC into BSCHarald Welte1-11/+72
RR Messages like STATUS, GPRS SUSPEND, HANDOVER COMPLETE/FAIL, ... should be processed on the BSC side of things, not on the MSC side. This is among other things required in preparation of intra-BSC hand-over support in osmo-bsc.
2012-01-23Move processing of CLASSMARK CHANGE behind bsc_apiHarald Welte1-0/+42
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-12-27bsc: Assume assignment_complete/assignment_fail is setHolger Hans Peter Freyther1-4/+4
The osmo-nitb application sometimes crashes because the BSC API is doing an assignment underneath which is not handled by the code, add dumy handlers to not crash, the right thing to do is to change MNCC to have an assignment that can succeed/fail. The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should wait for an ack/nack but right now the call just continues.
2011-09-13bsc_api: Add some more comments to the codeHarald Welte1-0/+10
2011-09-03bsc_api: Make sure to use correct MS Power on ASSIGNMENT CMDDieter Spaar1-1/+1
When gsm48_send_rr_ass_cmd() is being called to send the ASSIGNMENT COMMAND, we need to use the propwer lchan->ms_power setting, not some fixed magic "0x3" number. Without this patch, every MS would transmit at a very high output power fullowing an assignment command - more than what was set in the config file with "ms max power"
2011-08-30bsc: Fix a crash in case we get a NACK from the BTS for a new channelHolger Hans Peter Freyther1-5/+5
In case of a nack the secondary_lchan will be NULLed but then the T10 timeout will attempt to release the channel and we will try to release a NULL pointer. Daniel witnessed this crash at the camp and added the NULL check at: 28d9ccbca0cb522c90f551cf4bf243acab7a1944, it is also the proper fix given the _NAK handling.
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-19src: use new msg->dst pointer instead of deprecated msg->trxPablo Neira Ayuso1-1/+1
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-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-10libbsc: Don't free secondary lchan if it is NULL.Daniel Willmann1-1/+5
2011-05-06src: use namespace prefix osmo_signal*Pablo Neira Ayuso1-1/+1
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-05-06src: use namespace prefix osmo_timer* for timer functionsPablo Neira Ayuso1-6/+6
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-3/+3
This was done with sed on the files.
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-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+675
... and make sure tests work again after restructuring