9
0
Fork 0
Commit Graph

154 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther e833478898 isup: Hook the reset scanner before we forward the ISUP message
Scan for two kind of reset messages in the ISUP messages. Forward
them to the mgcp_ss7.
2012-12-16 12:45:58 +01:00
Holger Hans Peter Freyther b35c5c3227 stp: Allow to specify a trunk_name in the application
This trunk name will be used to send RSIP for the trunk on ISUP
resets. Right now each app can be associated only one trunk.
2012-12-16 12:10:32 +01:00
Holger Hans Peter Freyther d04011abc1 stp: Extract the MGCP forwarding code out of the msc_connection
For the ISUP/MGCP handling we will need the same code, extract it
from the msc_connection. For the reading code callback is introduced
that will pass the MGCP message to the higher layer.
2012-12-16 12:10:26 +01:00
Holger Hans Peter Freyther 2df07d549d mgw: Implement the specific RSIP handling
The RSIP has morphed from a global reset, to a per trunk reset and now
it is possible to reset specific ranges on a trunk. This will be used by
the ISUP filter code in the STP.

For legacy range == -1 will be used. This will reset all endpoints
on the trunk. Use OSMO_MAX on endpoint and number of endpoints in case
number_endpoints is 0.

This code will now free everything from the endpoint to endpoint + range
including endpoint+range.
2012-12-16 12:10:26 +01:00
Holger Hans Peter Freyther 2d115d4bbb mgcp: Merge the current MGCP code from OpenBSC
There were several changes in the upstream code. These include
statistics, DTMF/RQNT, changes in the parsing code and re-transmission
handling. The last item is the main reason to do the merge now.
2012-12-16 11:33:27 +01:00
Holger Hans Peter Freyther d74ac33574 dtmf: Schedule DTMF tones for the MTN hardware
Create a simple queue for pending DTMF tones, play them using the
MTN API, and then send the next tones once the playback is complete.
The callback and scheduling is done from the same context so no locking
needs to be done.
2012-12-16 11:33:27 +01:00
Holger Hans Peter Freyther 9b2474490a mgcp: Begin handling of the RQNT message as needed for DTMF
Introduce a callback for the request and forward the signalrequest
to the callback. This is not a full implementation of MGCP RQNT.

Manual merge and backport from OpenBSC.
2012-12-16 11:33:27 +01:00
Holger Hans Peter Freyther c96c57b8d5 mgcp: Implement to loop timeslots when not used for audio
Deal with broken ISUP switches and allow to loop endpoints
when they are not connected. Introduce an option to do it.
2012-01-22 11:44:33 +01:00
Holger Hans Peter Freyther 77ffc93742 mgcp: Rename from snmp to hw in variables and function name. 2012-01-22 11:41:54 +01:00
Holger Hans Peter Freyther 60bc8e7dab mtp: Allow to send SCCP/ISUP to a specific endpoint
For a linkset define where SCCP/ISUP should be send. This config
should probably move up to the application part when real work on
the routing is done. Right now the sccp_opc/sccp_dpc need to stay
inside the mtp_layer3.c to be able to send a TFA for the reachable
OPC and it is easier to keep both (dpc/opc) in the same file.
2012-01-16 11:51:18 +01:00
Holger Hans Peter Freyther 6853567564 bss: Patch CC messages with bearer capabilities to contain AMR 3
* This changes bss_patch_filter_msg to return -1 or BSS_FILTER_DTAP
  for DTAP messages. This way app_forward_sccp should continue to behave
  the same besides now looking into DTAP messages.
* Introduce a direction in case we want to advertize FR into the BSS
  side and HR into the other direction.
* Patch AMR HR3 and Fullrate/Halfrate capabilities in the Bearer
  Capabilities. Add a test case that is patching the bearer capabilities
2011-11-24 11:07:37 +01:00
Holger Hans Peter Freyther e616863190 misc: Address various compiler warnings in the code 2011-11-20 11:11:01 +01:00
Holger Hans Peter Freyther 67c4c451c5 distcheck: Add the header file to make the distcheck pass 2011-11-20 10:49:26 +01:00
Holger Hans Peter Freyther b1dfc462df cellmgr: Patch the MGCP messages and replace the domain name
Replace the domain name with a new name domain that can be configured
via the VTY interface.
2011-09-15 19:30:20 +02:00
Holger Hans Peter Freyther 040c6bcb25 mgcp: Reset endpoints via the trunk config instead of all of them
This change is coming from OpenBSC and was adjusted to mgcp_ss7
2011-09-14 22:32:59 +02:00
Holger Hans Peter Freyther f574cec745 mgcp: Introduce multiple virtual trunks
A virtual trunk is identified by a virtual domain name.
2011-09-14 22:29:14 +02:00
Holger Hans Peter Freyther 96cc57af80 mgcp: Generate the ConnId per trunk base
MGCP RFC 3435 does not specify that the Connection Id must be
generated with any kind of random. It must uniquely identify
the connection of an endpoint. So we can make it per trunk group
or could even have it per endpoint.

The code does not support multiple connections on the same endpoint
right now but the spec allows it.
2011-09-14 22:28:13 +02:00
Holger Hans Peter Freyther c2bb077a48 mgcp: Split creation of endpoints and static port allocation
Create the endpoints as soon as possible, configure static ports
after we are through with the parsing of the VTY config.
2011-09-14 00:23:22 +02:00
Holger Hans Peter Freyther e72139a6f3 mgcp: Remove the endp_offset that was introduced due coding stupidity
The endpoint offset is needed for two reasons, first the API is 0
based here while we are normally 1 based, second because of the trunks
the first usable endpoint would be '2' (0 is CRC, 1 is signalling), but
this endpoint offset falls apart when we would block timeslots inside
this range.

Remove the endpoint offset, in each endpoint we will store the HW DSP
Port (1 based API) and then subtract one to get to the 0 based API for
the Simple API. Print a warning when someone is using the endpoint offset.
2011-09-13 22:53:13 +02:00
Holger Hans Peter Freyther fc98ce252e vty: Add a config to enable MGCP command rewriting 2011-09-13 20:08:57 +02:00
Holger Hans Peter Freyther ab79b9b593 m2ua: Print information about number of SCTP connections
It appears that it is possible to have a stale SCTP connection
and this added LOGL_NOTICE and the VTY interface might help to
identify this situation in the future (the mean time of failure
is about five month).
2011-08-10 06:37:35 +02:00
Harald Welte ff397edf38 Adopt to recent libosmocore namespace changes and libosmogsm 2011-05-08 10:29:23 +02:00
Holger Hans Peter Freyther 56cba9ab45 ss7: Drop the input of packages as well
We don't want the input change any state on the linkset and will
drop them if we think our application is not reachable.
2011-03-03 01:20:03 +01:00
Holger Hans Peter Freyther d38b87a4c9 ss7: Do not send anything until both linksets in an app are up
We need some way to forward the failure of one link to another but
they are not normally routed so we can not send a TFP. Right now we
will simply stop responding until both links are up. This should make
the SLTM fail and trigger a re-alignment on both sides. The key here
is that the 2 * SLTM timeout needs to be higher than it takes to re-align
the link. I'm not sure this code will work.
2011-03-03 01:19:02 +01:00
Holger Hans Peter Freyther 0d20e0d12f mgcp: Mark certain endpoints as blocked.
Right now for the virtual trunk 0x0 and 0x1F is blocked, for the
E1 like interface we have 0x0 and 0x1 blocked. This should start
to be configurable in the future.
2011-03-02 21:44:01 +01:00
Holger Hans Peter Freyther 672f321eea mgcp: Calculate the right Audio Processor resource for high endpoints
With this commit we can have more than 30 endpoints that will work. We
ignore the blocked endpoints 0x1 and 0x1f for each trunk and calculate
everything from the right start point.
2011-03-01 13:52:57 +01:00
Holger Hans Peter Freyther dcc3312792 mgcp: Merge OpenBSC MGCP code and update the structure to match it
* Upstream has a separation of BTS and NET side for RTP ports and
  can allocate them dynamically.
* Upstream has gained the concept of trunks. We will now have various
  trunks to connect audio things.

* We will now be able to utilize multiple trunks and have the endpoints
  used properly.
2011-03-01 13:02:29 +01:00
Holger Hans Peter Freyther d062f8318e mtp: Call the mtp_link_set always set otherwise things get confusing
In a backtrace it is confusing to see variables called link and link
and one is a mtp_link and the other is a mtp_link_set.
2011-02-23 16:58:15 +01:00
Holger Hans Peter Freyther 4c9dd160c3 sccp: The link attribute was never used leading to a crash
Right now we assume that the source of an application with
SCCP state tracking is a linkset. Send the message to that
linkset.
2011-02-23 16:11:21 +01:00
Holger Hans Peter Freyther 47c9faac3b mtp: Attempt to implement the MTP Restart properly
For the SSP functionatilty we will need to have the timers T18
and T20. In the period of T18 we will collect TFP/TFR/TFA for the
reachable nodes of the system. Each of this node will send us a TRA
when it is finished. Right now we assume to only have one node and
stop the T18 after the TRA of this node. Then we would need to send
the TFP/TFR we have collected. On the expiry of the T20 timer we
will need to send our TRA and notify local users.

For more complex routing we will need to have a shared routing
cache and remember which SSNs and OPCs are reachable and have inter
linkset notifications.
2011-02-23 15:27:09 +01:00
Holger Hans Peter Freyther 7176030e02 vty: Add all mighty new vty interface for osmo-stp
This new interface allows to have multiple linksets, msc
connections and ways to connect those in one instance of
the osmo-stp. Forbid to reset linksets without an app.
2011-02-23 15:25:35 +01:00
Holger Hans Peter Freyther cfe9d718e2 vty: Remove more globals from the bsc data.
This is a interim solution until we have the new and all mighty
new config file format. This should work for now, makes the init
abit harder to understand though.
2011-02-22 21:05:59 +01:00
Holger Hans Peter Freyther 4cee7c0901 m2ua: Start link only after we had the emergency alignment
This should avoid us getting an error as we are sending the
SLTM too fast. In one way this makes sense, on the other hand
we already have too many states and should remove some variables
2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther 8fd28dbbe6 m2ua: Keep the M2UA ASP state in the mtp_m2ua_link
This change allows to run multiple links over the same SCTP
connection or multiple SCTP connections. It does not yet
support fail over handling or load balancing but that seems
possible now.
2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther 5a34c7f6f8 mtp: Rename link_no to nr, add a name like for the other commands 2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther 6c0b2e570c mtp: Make the mtp_link point to a specific type of link
We might want to be able to change the type of a link at
runtime. Decouple the link and the actual type of the link.
2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther 1b5d846b46 mtp: Stop hardcoding the supported SSN inside the mtp_layer3.c
Stop hardcoding the supported ssn's inside the mtp_layer3.c and
make it possible to allow to configure this in the future.
2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther b27c9626e8 mtp: Remove the bsc pointer from the MTP LinkSet 2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther a33b23f293 mtp: Rename no to nr to align with the rest of the structs 2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther 289436f8b6 bsc: Cleanup some fields and names 2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther 64b7d56dc0 ss7: Move all mtp linksets callbacks into the app layer 2011-02-17 19:34:28 +01:00
Holger Hans Peter Freyther c5200fcb35 ss7: Move the linkset up/down into the ss7_app, move some code around 2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther ab7c601118 ss7: Provide a way to start the application 2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther a7bc3aafdc ss7: Create a SS7 application that is responsible for the routing 2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther 2cdb73cf4a msc: Move more state into the sccp_state.c 2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther 3d4d8c7b50 msc: Move the nat handling into the sccp_state for now 2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther 84ec8714b2 msc: Move the MSC Connection into a new header file
This is in preparation of splitting the MSC part and the
nat logic for the upcoming config rewriting.
2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther f7ce2c6417 m2ua: Start to separate the SCTP code and M2UA to allow multiple links
We want to be able to support multiple links over different SCTP
connection and in the future also over the same connection. This
is the first step to separate the SCTP connection handling from the
link handling inside these messages.
2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther 694337f893 mtp: Allow to find a linkset by number 2011-02-17 19:34:27 +01:00
Holger Hans Peter Freyther 599c9a4b9a mtp: Allocate the MTPLinkSet as a child of the BSC
In preparation of the VTY code change, make the mtp linkset
a child of the bsc.
2011-02-17 19:34:27 +01:00