9
0
Fork 0
Commit Graph

429 Commits

Author SHA1 Message Date
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 1cedd4a599 debian: Add a start script for osmo-stp 2015-03-23 10:15:13 +01:00
Holger Hans Peter Freyther 6b471a2738 debian: Rename the packages 2015-03-23 10:15:13 +01:00
Sylvain Munaut 9544ee2955 build: Replace deprecated INCLUDES with AM_CPPFLAGS
Thanks to mnhauke for the patch

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-12-22 22:36:17 +01:00
Holger Hans Peter Freyther 95d8272311 debian: Begin with a debian package for the STP 2014-07-30 09:23:11 +02:00
Holger Hans Peter Freyther b5f89891bf sctp_m2ua: Fix the byte order of the request flag for the StateConf
The ASP has not been looking at this value at all, fix the byte
order. On the other hand my ASP doesn't care about this either.
2013-06-28 19:35:30 +02:00
Holger Hans Peter Freyther fa48639adf sctp_m2ua: Fix the check of how many ASP for the same ident we have active
Currently this is only true for the same connection.

sctp_m2ua.c:195 Two active SCTP conns with 1.2.3.4 on 0x9c21cf0, 0x9c21cf0
2013-06-28 10:11:00 +02: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 3bb2a91cd8 dtmf: Add tone detection to the event handling
We get a trap for detected tones and then need to query them. Print
the detected characters for now and do not forward them yet.
2013-06-04 13:43:30 +02:00
Holger Hans Peter Freyther a26e6173b1 mgcp: Return 502 in case the endpoint is allocated.
When an endpoint is allocated we do not have enough resources to
connect it again and this situation is permanent as long as the
endpoint is connected.

Returning 502 might help some switches to release stale audio resources.
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther e48231c539 dtmf: Check the tones that are put into the DTMF scheduler and reject a 0
Playing tones should be printable ascii characters, begin by checking
for NULL (as it happened before) as the first illegal tone. This is
an attempt to make the API more robust and detect errors more early.
2013-05-23 09:59:25 +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 cd062c8c66 mgcp: Initialize the tone to CHAR_MAX as this might not be a request
The RQNT message might not contain a 'S:' line with the actual tone
to play. Instead of calling the callback with the 0 as tone just leave
early.

Example:
X: 6B9519B88F0
R: D/[0-9#*](N), G/ft, fxr/t38

Merged from the OpenBSC development tree
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 6553f1b5e9 msc: Create a copy of the message for the forward_only case
We need to create a copy of the messages before we forward it
to MSC. This is already done in the other code path.
2013-04-22 18:55:50 +02:00
Holger Hans Peter Freyther c4e5066d1d app: Mark the transport as started for the relay mode
This code could be shared with the STP setup code.
2013-04-22 17:58:34 +02:00
Holger Hans Peter Freyther d90834c42a app: Make it possible to enable the forward only code
This change was either never implemented or has been lost at
some point in time. Allow to pass SCCP messages un-modified through
the A-link.
2013-04-22 17:56:09 +02:00
Holger Hans Peter Freyther 052b8e8c95 bss patch: Remove stale printf from the code that broke the tests 2013-03-25 13:52:32 +01:00
Holger Hans Peter Freyther 511848c864 bss patch: Patch all slots with FR2 in the assignment request
* Patch all slots with the FR2 codec. This is the easiest way to
  patch the entire message.
2013-03-25 11:06:31 +01:00
Holger Hans Peter Freyther 30be65a2e8 bss patching: Add test cases for assignment and assignment complete patching
* Chosen Channel and Speech Version are both optional. Patch them
  separately if they are present.
* Add testcase for the assignment request patching.
2013-03-25 10:32:23 +01:00
Holger Hans Peter Freyther a479c1b6f5 tests: Make the test data static const 2013-03-25 09:01:17 +01:00
Holger Hans Peter Freyther 49844e8deb msc_conn: Clear the write queue when the connection is dropping 2013-03-19 22:51:19 +01: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 e6caed12ca mgcp: Add a log message about the tones that will be queued 2013-02-26 16:48:05 +01:00
Holger Hans Peter Freyther 46c79994e6 mgcp: After the tones are played inform the DTMF state
dtmf_state_played will re-set the playing state. Currently the
first tone was played and then no more tones were scheduled to
be played.
2013-02-26 16:47:48 +01:00
Holger Hans Peter Freyther fb7ae15abe mgcp: Remove unused variable from the callback handling 2013-02-26 16:39:47 +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 6808407dcf isup_filter: Add debug and log messages for the filtering
This way one can check the logs if this code path is hit. The
logging normally only occurs for the two messages we are interested
in. It doesn't make sense to reset with a range of 0 so the code
has been re-ordered.
2013-02-24 15:10:49 +01:00
Holger Hans Peter Freyther 5d04481455 mgcp: Fix the vary large jump detection in the code
GCC 3.x on PowerPC correctly highlights that the code is fishy.
Re-reading the RFC 3550 shows that we should subtract it and then
we are in the 16bit range. The probation and re-sync code is still
missing.

GCC:
mgcp/mgcp_network.c:200: warning: comparison is always true due to limited range of data type
2012-12-16 13:23:11 +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 a9530059a1 isup: Test some more ISUP messages and that we parse them correctly 2012-12-16 12:10:36 +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 fe55ed14f7 mgcp: Write a small hint that this special endpoint number handling is broken
It is user defined where the signalling will take place, there might not
be any signalling at all.
2012-12-16 11:33:27 +01:00
Holger Hans Peter Freyther 57e9ca9fe9 mgcp: Use the realloc callback when freeing the endpoint via the VTY
In case the endpoint is allocated and the VTY is used to force it
to be freed use the realloc_cb to make sure that any resources
allocated to it will be freed. The mgcp_ss7 binary will then call
mgcp_ss7_endp_free to free audio encoder resources.
2012-12-16 11:33:27 +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 611d238a68 mgcp: Add a hack to allow to patch the SSRC
This is a hack and we will need to do this only if a MDCX with
a new IP address is arriving.
2012-12-16 11:33:27 +01:00
Holger Hans Peter Freyther e310310843 mgw: Always disable the writing for the socket notifier, initialize variable
This was spotted while verifying the RSIP code using valgrind.
2012-12-16 11:33:27 +01:00
Holger Hans Peter Freyther 677fd1e5c8 adler: Remove the SCTP hack that we needed to force the adler checksum
Remove the hack that was required for inter-op. The equipment will
migrate to the CRC32 checksum soon.
2012-07-01 17:40:04 +02:00
Holger Hans Peter Freyther 11a1415fc1 syslog: Log all exit paths in this code
There are some exit paths that do not have syslog logging.
2012-06-12 15:50:38 +02:00