9
0
Fork 0
Commit Graph

175 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther e948224d44 m3ua: Start timer to wait for ASPAC_ACK
For M3UA we should have one time-out for operation we want and
then re-transmit it. As this is too much work right now create
a single timer that waits that after a connect the ASPAC_ACK
state will be reached.
2015-10-09 14:43:12 +02:00
Holger Hans Peter Freyther 1a1aa0c739 ctr: Count number of dropped messages
In case of back pressure we can not send messages quick enough
and will drop messages. Add a counter so we can count how often
this happened per link/linkset. The SCTP M2UA code is not changed
as we don't have a link in the hands and adding it is too risky
without tests (not all M2UA have a link index so some might not
have a link).
2015-10-04 15:24:27 +02:00
Holger Hans Peter Freyther b492e86e4f ss7: Allow to force the link down when the IPA conn is going down
For the "bridging" to IPA mode we can force the SCTP/M3UA connection
down. This way the remote STP will do a proper link fail-over
procedure instead of the STP throwing data away.

This is not configurable yet.
2015-09-21 16:43:20 +02:00
Holger Hans Peter Freyther 78f5060c62 ss7: Inform the application layer that a connection is down
This can be used to force one connection down while the other
is down. E.g. to force SCTP down when the IPA connection is
down as well.
2015-09-21 15:47:10 +02:00
Holger Hans Peter Freyther 1a3ceaf9a5 cellmgr: Attempt to fix the make distcheck 2015-04-19 20:52:11 -04:00
Holger Hans Peter Freyther 6a441c86fe m3ua: Make the traffic-mode configurable 2015-04-16 22:32:09 +02:00
Holger Hans Peter Freyther 316168249f all: Use the libosmo-sccp version of mtp_level3.h 2015-03-24 19:24:22 +01:00
Holger Hans Peter Freyther d1df399a97 m3ua: Implement link bring-up and sending/receiving of data
the opc/dpc for ISUP is currently wrong. The send/recv path
for actual SCCP data is not tested.
2015-03-24 18:53:21 +01:00
Holger Hans Peter Freyther 6a20bae1f9 m3ua: Implement connect and re-connect handling 2015-03-24 18:52:46 +01:00
Holger Hans Peter Freyther d2f21e0796 m3ua: Begin to create a m3ua client connection
Implement a basic M3UA state machine on a SCTP connection.
2015-03-24 18:52:45 +01:00
Holger Hans Peter Freyther 679a8d0b75 mtp: Allow to skip SLTM on links (e.g. m3ua)
For M3UA links we can't send SLTM messages but we can
assume that the link is fine. Add a flag that a link
can set in case SLTM should be skipped. The linkset will
then directly wait for routable DPCs and bring the
SCCP part up.
2015-03-24 18:41:45 +01:00
Holger Hans Peter Freyther bc4b0bbe12 mtp: Clean-up and remove the unused start routine 2015-03-23 17:16:22 +01:00
Holger Hans Peter Freyther 4fd82de1ba Port from libm2ua to libxua 2015-03-23 12:39:18 +01:00
Holger Hans Peter Freyther 4b750fb119 dtmf: Make the on/off time and transmit power configurable
Make it possible to configure the transmit power. These settings
will be in effect immediately (there is no lock between the two
threads but it is a read only).
2013-06-04 13:43:37 +02:00
Holger Hans Peter Freyther 9905b18811 dtmf: Make the API more robust and avoid inconsistencies
Because of the issue parsing the MGCP request a '\0' was added to
the queue. This lead to the dtmf scheduler believing that a play
was in progress while the playing code didn't play anything. This
lead to the queue to be stuck and nothing being played at all.

Return the number of tones that should be played and stop using
strlen on the tones.
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther 6c981176ab dtmf: Improve the log message and print the number of messages queued
Print the number of log messages that are queued in the error message.
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther 4db78de76e patching: Add a VTY option to hardcode the assignment complete message
For some equipment it is the easiest to patch the assignment
complete message transported to the MSC. Add a VTY config to
enable this patching, create a testcase that tests that the
original message is truncated. The setting of the VTY option
has been manually tested. The entire system has not been end
to end tested.
2013-05-13 21:08:36 +02:00
Holger Hans Peter Freyther b566c79d82 patching: Get the struct ss7_application down to the patching routine 2013-05-13 18:18:02 +02:00
Holger Hans Peter Freyther a5a17fa80a msc: Allow to listen for incoming connections.
This is mostly a hack to allow IPA/SCCP routing to SCTP/M2UA/MTP3/SCCP
without going through the full stack. The proper way of doing this
requires another round of abstraction for the mtp_link_set class.
2013-03-19 22:51:09 +01:00
Holger Hans Peter Freyther d93c84f96e misc: Address warnings coming from clang
* Include stdlib.h before the snmp headers to have a free declaration
* Use sprintf(dest, "%s", str) to avoid format string attacks
* Avoid bogus assignment. This pattern was used for marking something
  as unused in the past.
2013-03-18 19:03:44 +01:00
Holger Hans Peter Freyther 4822c8bc56 isup: Make isup CIC parsing/using work on big endian machines as well
This is a hot fix to make CIC reading (and later status) work on
big endian machines. There might be a more elegant way to do it
and I will explore this later.
2013-02-24 15:10:55 +01:00
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