Commit Graph

3579 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 503f445d2c bsc: Do not re-start the grace timer when we are in the grace period 2011-08-25 23:22:02 +02:00
Holger Hans Peter Freyther 7c13f4b975 bsc: Simplify the trap sending by using the location state method 2011-08-25 23:22:01 +02:00
Holger Hans Peter Freyther 158a382212 bsc: Send a TRAP with the locations on a MSC connection
Send the current position when the MSC connection is established.
2011-08-25 23:21:55 +02:00
Holger Hans Peter Freyther 82e5339504 bsc: Introduce an authenticated signal for the MSC connection
Send the signal whenever a MSC appears to be authenticated.
2011-08-25 23:19:56 +02:00
Holger Hans Peter Freyther 63c2c828c0 bsc: Auto RF Off in case of missing MSC connection
For short IP failures we want the RF to stay up and wait for
the re-connect but in case the A-link is gone too long it is
good to switch off the RF and wait for commands to enable it
again.
2011-08-25 23:19:45 +02:00
Holger Hans Peter Freyther 1979e7227f bsc: Use the BSC RF CTRL to change the RF state of the TRXs
Use the delayed scheduling feature of the osmo_bsc_rf class to
avoid crashing the site controller of the nanoBTS.
2011-08-25 23:19:39 +02:00
Holger Hans Peter Freyther ff4ded5903 bsc: Crash fix for the osmo-nitb/MNCC code
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-25 23:19:35 +02:00
Holger Hans Peter Freyther 684908e167 bsc: Fix crash that can occur on RF Failure
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-08-25 23:19:33 +02:00
Holger Hans Peter Freyther bb976dada9 audio: Make AMR multirate configurable for the osmo-bsc
Provide VTY options to allow/forbid the usage of a
specific multirate option.
2011-08-25 23:19:32 +02:00
Holger Hans Peter Freyther 614da5e88a audio: Make the BSC handle the new mr_config request of the BSC API
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.
2011-08-25 23:19:17 +02:00
Holger Hans Peter Freyther fee372e673 audio: Move the setting of MultiRateConfig to one place
Move it to one place so it is more easy to make changes to
that.
2011-08-25 23:19:13 +02:00
Holger Hans Peter Freyther 34ae47f8d3 audio: From RTP point of view we can use one payload for HR/FR AMR
Remove the separation of half-rate and full-rate AMR. The used rate
can be found inside the AMR payload. The signalling of what kind of
traffic channel is used can be done with the GSM 08.08 Chosen
Channel IE in the Assignment Complete message.

This way I can use a fixed payload type in the MGCP GateWay but
have a mixed TCH/F and TCH/H config. E.g. use TCH/F FR3 for some
subscribers when connected to MSC A but use AMR5.9 on a TCH/F for
MSC B when all TCH/Hs are gone.
2011-08-25 23:19:04 +02:00
Holger Hans Peter Freyther 649f5a41e3 audio: Remove the hardcoding of the RTP Payload
The MGCP config must be correct and use 99 for RTP AMR.
2011-08-25 23:18:13 +02:00
Holger Hans Peter Freyther be20696c67 mgcp: Make CRCX deal better with UDP retransmissions
When the CRCX 200 is lost on the way to the CallAgent we will
get another CRCX (retransmission) which was answered with a 400.

Change the code to extract the CallID, Mode and the optional
LocalOptions first. Then check if the endp is allocated with the
same call identifier, in that case return the current session
information.
2011-08-25 23:18:11 +02:00
Holger Hans Peter Freyther 44da0a3949 mgcp: FreeSWITCH requiresn us to provide the o= and t= param
The SDP file for FreeSWITCH should contain o= (Origin) and the
t= (Timing) for the session. The data of the Origin should be
globally unique but this is not the case yet. We will need to
store the (NTP) time of the creation of the endpoint.
2011-08-25 23:18:08 +02:00
Holger Hans Peter Freyther 4d888fc3ca bsc: Put the full stop before the \n in the log message 2011-08-25 23:18:07 +02:00
Holger Hans Peter Freyther f87cc7156a bsc: Fix crash when the new route is not available
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.
2011-08-25 23:18:05 +02:00
Holger Hans Peter Freyther 7b08c794e5 bsc: Add new SCCP connections to the tail 2011-08-25 23:18:03 +02:00
Holger Hans Peter Freyther aa54e28857 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.
2011-08-25 23:18:02 +02:00
Holger Hans Peter Freyther a8a5ffa1dc bsc: Add VTY code for the local area prefix 2011-08-25 23:18:00 +02:00
Holger Hans Peter Freyther eca2b31f62 bsc: Add vty code for allowing emergency 2011-08-25 23:17:58 +02:00
Holger Hans Peter Freyther 45a833b4cd bsc: Add vty function for the MSC type 2011-08-25 23:17:56 +02:00
Holger Hans Peter Freyther 7c3524922b bsc: Inspect a CC Setup message and attempt to reroute the traffic
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.
2011-08-25 23:17:46 +02:00
Holger Hans Peter Freyther 735c714a74 bsc: Look for CM Service Requests with emergency cause
Look for emergency calls and send them to a MSC that can
handle them properly.
2011-08-25 23:17:36 +02:00
Holger Hans Peter Freyther 935eac12aa bsc: Introduce a local MSC type and forbid it from being selected 2011-08-25 23:17:26 +02:00
Holger Hans Peter Freyther 5135fbefd0 bsc: Attempt to respond to paging to the MSC that paged
Inspect the message and see if it is a paging response,
then try to find the MSC that has paged this subscriber
and select this as the target MSC, also move the MSC to
the back of the list for 'load balancing'.
2011-08-25 23:17:24 +02:00
Holger Hans Peter Freyther 934355a268 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.
2011-08-25 23:17:20 +02:00
Holger Hans Peter Freyther 6bceb8a5b0 bsc: Move the finding of a MSC into the filter code
For responding to paging on the right link we will need to
figure out if the msg is a paging response.
2011-08-25 23:17:17 +02:00
Holger Hans Peter Freyther 4084e87af9 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.
2011-08-25 23:17:13 +02:00
Holger Hans Peter Freyther 6545f7c6b7 bsc: Allow to configure more than one MSC in the VTY 2011-08-25 23:16:57 +02:00
Holger Hans Peter Freyther deafac1ad0 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.
2011-08-25 23:16:47 +02:00
Holger Hans Peter Freyther ddb93a6e5e bsc: Use the right connection for outgoing packets
This is needed for simple UDT messages where we do not have
a SCCP connection.
2011-08-25 23:16:45 +02:00
Holger Hans Peter Freyther 6d447a765e bsc: Move more things to use osmo_msc_data* directly 2011-08-25 23:16:34 +02:00
Holger Hans Peter Freyther 1b69ddc65f bsc: Move the bsc_filter to use the osmo_bsc_sccp_con 2011-08-25 23:16:33 +02:00
Holger Hans Peter Freyther 6e7e0fe514 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.
2011-08-25 23:16:29 +02:00
Holger Hans Peter Freyther 6cadfa7328 bsc: Stop using net->bsc->msc and get the right msc from somewhere else 2011-08-25 23:16:27 +02:00
Holger Hans Peter Freyther 6c21ff3d2e 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.
2011-08-25 23:16:21 +02:00
Holger Hans Peter Freyther d7ff30eb62 misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_reg
Move the regexp parsing code from the NAT to libcommon as it will
be used by the NAT and BSC code. This also adds the #include <regex.h>
include to gsm_data. This header should be split up.
2011-08-25 23:02:53 +02:00
Daniel Willmann c4cc3aab64 nat: Change the ctrl command path
The commands net.<netid>.bsc.<bscid>.* are now forwarded to the
appropriate osmo-bsc. <netid> for now is just 0. <bscid> is not the LAC
anymore (since that could be ambiguous), but instead the number as
configured in bsc-nat.cfg
2011-08-25 17:08:07 +02:00
Daniel Willmann b59f450314 libctrl, osmo-bsc: Get rid of net prefix
net is now implicit in the root node
2011-08-25 17:07:10 +02:00
Holger Hans Peter Freyther 68399ea77e bsc: Add a null check and return early 2011-08-25 15:02:05 +02:00
Holger Hans Peter Freyther eabdf75936 ctrl: Fix leak, check null pointer 2011-08-25 15:01:23 +02:00
Daniel Willmann d9e70a3e07 libctrl: Fix a compiler warning 2011-08-25 14:36:40 +02:00
Daniel Willmann fc6fc13826 osmo-bsc: Whitespace change - fix indentation of struct value_string 2011-08-25 14:36:39 +02:00
Daniel Willmann 7c6405b5ce osmo-bsc: Include rf stati in the location-state TRAP as well
The first fields are still the location up to the height.
The next field is "operational" if any of the trx are operational,
otherwise "inoperational"
The second to last field contains "locked" if all of the trx are in the
admin state, otherwise "unlocked".
The last field represents the rf policy currently in effect. It is one
of (on|off|grace|unknown).

<tstamp>,<valid>,<lat>,<lon>,<height>,<oper>,<admin>,<policy>
2011-08-25 14:36:01 +02:00
Daniel Willmann efda919e2d osmo-bsc: Prepare to send more than just the location in the TRAP 2011-08-22 19:27:49 +02:00
Daniel Willmann 1bb18c8e61 osmo-bsc: Use NM_OPSTATE_* to check for operational attributes 2011-08-22 19:27:49 +02:00
Daniel Willmann 67e2f74d01 ctrl: Use strtol instead of atoi to detect conversion errors 2011-08-22 19:27:49 +02:00
Daniel Willmann ccdc490c33 ctrl: Improve error messages in ctrl_cmd_handle 2011-08-22 19:27:49 +02:00
Daniel Willmann 65e4168e8e ctrl: Change the paths to bts.%i. instead of bts%i 2011-08-22 19:27:49 +02:00