Commit Graph

29 Commits

Author SHA1 Message Date
Pablo Neira Ayuso 5121576b0c src: use osmo_timer_setup()
Use new function available in libosmocore to set up timers. Compile
tested only.

Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
2017-05-10 11:21:24 +02:00
Neels Hofmeyr a369e24cb9 cosmetic: rename struct osmo_msc_data to bsc_msc_data
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-24 21:01:55 +01:00
Neels Hofmeyr a42855f09f cosmetic: rename osmo_msc_data.h to bsc_msc_data.h
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
2017-02-24 21:01:55 +01:00
Neels Hofmeyr 42eb0141d7 split subscr_con_allocate()/_free() in bsc_ and msc_
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-02 12:09:17 +00:00
Neels Hofmeyr 43273c63de factor out gen of USSD notify and release complete to libosmocore
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-12-02 12:09:15 +00:00
Harald Welte 7e5bb6283d COSMETIC: 'if' is not a function, so there is space before '('
Change-Id: Ic22623dffce998d70a3c67aa6e445de98f558ed7
2016-09-28 00:47:28 +00:00
Holger Hans Peter Freyther 56cb729907 bsc: Add a "IPA PING" to the SCCP CR messages
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.
2014-09-05 12:25:32 +02:00
Holger Hans Peter Freyther 33b9641025 bsc: Use the right string for the notification 2013-11-15 16:47:59 +01:00
Jacob Erlbeck 56595f8647 ussd: Send USSD on call setup on MSC errors
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-09-11 20:18:42 +02:00
Holger Hans Peter Freyther c85ed4e8db bsc: Fix compiler warning about undeclare functions
Addresses:
osmo_bsc_sccp.c:280:2: warning: implicit declaration of function ‘gsm0480_send_ussdNotify’ [-Wimplicit-function-declaration]
osmo_bsc_sccp.c:281:2: warning: implicit declaration of function ‘gsm0480_send_releaseComplete’ [-Wimplicit-function-declaration]
2013-09-02 10:58:35 +02:00
Jacob Erlbeck 1b894022fd bsc/ussd: Optionally send USSD message on MSC disconnection
Send an USSD message on each MS connection if the connection to
the MSC has been lost.
Add a vty config command 'bsc-msc-loss-txt' in 'config-msc' to set
the notification string and to enable the feature.

Ticket: OW#957
2013-08-28 11:10:44 +02:00
Holger Hans Peter Freyther 3d119f1de4 bsc: A BTS excluded from the RF lock should be allowed to make a connection
When introducing the exclude for the BTS lock the RF stayed up but
all connections were immediately released. Optionally pass the BTS
as second parameter and check the exclude bit.

Tested-with: rf-lock-exclude/RFLockExcludeTest.st
2013-01-28 15:41:27 +01:00
Holger Hans Peter Freyther 644b0bf3da bsc: Hand the msc_connection to the UDT handling, pass it to paging
Pass the osmo_msc_data to the paging sub system, change the code
to pass the osmo_msc_data instead of network + bsc_msc_conn.
2012-09-11 17:47:42 +02:00
Holger Hans Peter Freyther 354c87cdfc bsc: Select a MSC in a round-robin fashion
Select a MSC, add it to the back of the list after we have
selected it.
2012-09-11 17:47:08 +02:00
Holger Hans Peter Freyther 8c176cc6ab msc: Only kill connections belonging to the given MSC
When a MSC connection drops, only kill the connections that
belong to the given MSC and not all other connections.
2012-09-11 17:46:54 +02:00
Holger Hans Peter Freyther 20fea24515 bsc: Prepare to have multiple MSC connections
We now have a list of MSCs but in the code we will
try to access the MSC with the nr 0.
2012-03-16 11:56:21 +01:00
Holger Hans Peter Freyther 44e5dad3e2 bsc: Use the right connection for outgoing packets
This is needed for simple UDT messages where we do not have
a SCCP connection.
2012-03-16 11:56:10 +01:00
Holger Hans Peter Freyther 4cdb050d13 bsc: Move away from ->bsc.msc to use the selected MSC
For multiple MSCs we should only have one place where the MSC
is selected and the rest will extract it from somewhere.
2012-03-16 11:56:10 +01:00
Holger Hans Peter Freyther f31a4a4810 bsc: Stop using net->bsc->msc and get the right msc from somewhere else 2012-03-16 11:56:10 +01:00
Holger Hans Peter Freyther 8ec4952557 bsc: Create a osmo_bsc_data and embed osmo_msc_data
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-16 11:56:10 +01:00
Holger Hans Peter Freyther 74c7dc36b6 bsc: Put the full stop before the \n in the log message 2011-10-12 08:30:36 +02:00
Holger Hans Peter Freyther cc98d188eb bsc: Add new SCCP connections to the tail 2011-10-12 08:30:29 +02:00
Holger Hans Peter Freyther 0e412c7a55 bsc: Correct the cast for the signal data
There is a dedicated msc_signal_data cast the signal_data to
this type and enjoy working connection closing on a per MSC base.
2011-07-19 19:56:53 +02:00
Holger Hans Peter Freyther 784ca9c179 bsc: Require osmo-sccp 0.0.6 and update the API 2011-06-30 20:30:39 +02:00
Pablo Neira Ayuso bbc5b99a6b src: use namespace prefix osmo_signal*
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-06 12:12:31 +02:00
Pablo Neira Ayuso bf540cb7c3 src: use namespace prefix osmo_timer* for timer functions
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-05-06 12:11:06 +02:00
Harald Welte d36ff76f9d Fix build of bsc-nat and GPRS code after include path change
The last patch changed the osmocore include paths, this fixes some build
problems caused by it
2011-03-23 18:33:26 +01:00
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
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-23 18:17:56 +01:00
Harald Welte 31c00f7d6f re-structure the OpenBSC directory layout
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.
2011-03-03 23:29:05 +01:00