9
0
Fork 0
Commit Graph

354 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 1f7315058a Work-In-Progress for M3UA/SCCPlite.. handling
This is a bit of a dead-end. SCCPlite/M3UA should not use a mtp_linkset
as this requires dealing with SLTM/SLTA.. routing data. Right now I can
either add special code to the linkset to shut off parts of or bypass it
in the SS7 application code..
2013-03-18 19:04:17 +01:00
Holger Hans Peter Freyther c4e913993d sccp: Allow to set the src port which enable the SCCP-lite/MAP-lite mode 2013-03-18 19:04:10 +01:00
Holger Hans Peter Freyther 53e2ba8e5a sccp: Begin to introduce a SCCP-lite/MAP-lite handler
The goal is to have a simple IP/TCP/IPA/SCCP connector that can
talk IP/SCTP/M2UA/SCCP on the other side of the link. Refactor
and share the code with the sctp handler.
2013-03-18 19:04:03 +01:00
Holger Hans Peter Freyther 2031c9510c sctp: Rename sctp_m2ua_transport to mtp_transport as it will be shared
This structure can be shared with the upcoming SCCP-lite handling.
2013-03-18 19:03:55 +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
Holger Hans Peter Freyther 826390a5ba syslog: Add syslog for the MGCP MTN thread
We can not use the osmocore logging in multiple threads, open a
separate syslog to log errors.
2012-06-12 15:50:31 +02:00
Holger Hans Peter Freyther 4d47451521 mgcp: Always restore the endpoint routing when destroying the endpoint
In case MtnSaAllocate failed the code did not restore the audio routing
when destroying the endpoint. Move the hw_maybe_loop_endp out of the if
statement.
2012-05-11 11:46:31 +02:00
Holger Hans Peter Freyther d56ddfc380 mgcp: Possible fix for using the right DSP resource on the MGCP MGW
This got broken in the previous commit. Use the hw_dsp_port we assigned
to the endpoint instead of the dsp_resource that is one ahead. For the
non loop-on-idle configuration audio routing appears to be broken.
2012-05-11 11:36:19 +02:00
Holger Hans Peter Freyther e1ec4c7047 hw: The DSP resource was one based with the SNMP API, subtract it
* Change the assigning dsp_resource to start with one and increase
  after usage and not before usage (so it becomes the next free
  port).
* Subtract one from dsp_port after we have selected the path. In the
  longer run I should make dsp_resources zero based all the way.
2012-01-23 16:30:16 +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 765c48aba7 mgcp: Move to using the NexusWare API for Timeslot config 2012-01-22 11:43:39 +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 8aaaa406bb mgcp: Move the SNMP file to _hw.c to move to the NexusAPI 2012-01-22 11:40:35 +01:00
Holger Hans Peter Freyther d183052dae TODO: Add some known shortcomings and some talk about what to do. 2012-01-16 11:55:26 +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 53559b39e5 mtp: Provide the method with the OPC and DPC
We want to submit on a link set but want to provide the OPC and
DPC of the callers choice.
2012-01-16 09:57:06 +01:00
Holger Hans Peter Freyther 104280700a mtp: Name the parameter opc instead of just PC 2012-01-16 09:55:42 +01:00
Holger Hans Peter Freyther a59af64126 ss7: Make the forwarding methods static 2012-01-16 09:54:09 +01:00
Holger Hans Peter Freyther f3e9ad01c1 tests: Remove the copy of the 'missing' and use the $(top_srcdir) one 2011-12-04 23:29:46 +01:00
Holger Hans Peter Freyther d87ef3bc66 vty: Add show msc [NR] to specify an optional MSC nr 2011-11-28 10:16:38 +01:00
Holger Hans Peter Freyther c5e8f08303 msc: Make 'show msc' show the primary msc connection again
Revert an accidental change when introducing show mscs. We want
show msc to be like it was before.
2011-11-25 17:26:44 +01:00
Holger Hans Peter Freyther fffdd76f56 msc: Only take down the link if it is up
If the link was never started and we send a SIGUSR2
we would start the link. Don't do it.
2011-11-25 17:24:59 +01:00
Holger Hans Peter Freyther 31d6597c3f vty: Introduce show mscs to show all mscs 2011-11-25 16:23:43 +01:00
Holger Hans Peter Freyther ade60edd5f msc: Only unregister the fd when we have a valid fd 2011-11-25 15:32:45 +01:00
Holger Hans Peter Freyther 143af9a02d bss: Add an additional test where we do not want to patch anything 2011-11-24 11:23:30 +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 1ab8961450 bss_patch: Remove magic number and use define for BSSAP management 2011-11-23 19:25:10 +01:00
Holger Hans Peter Freyther 7eaf6fb9f9 sccp: PC -> PointCode and we remove them to avoid routing issues 2011-11-23 18:38:30 +01:00
Holger Hans Peter Freyther df38eb1b4c rate_ctr: Initialize the rate_ctr to update them properly
This way we get proper information about packets per second/hour
and minute. Right now we only count the total.
2011-11-20 13:26:31 +01:00
Holger Hans Peter Freyther e616863190 misc: Address various compiler warnings in the code 2011-11-20 11:11:01 +01:00