Commit Graph

5144 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther d3496aed69 debian: Attempt to fix packaging and point to a meaningful readme
The empty README file has been removed but the package still tries
to install it.
2015-09-24 16:45:21 +02:00
Holger Hans Peter Freyther 3e4e8cfb74 vty: Change the return type from enum to int
clang complained that different enums are mixed with the
return type and we actually want this to be an int now.
2015-09-24 15:39:30 +02:00
Holger Hans Peter Freyther 925504bfe0 gbproxy: Add quirk commands to allow upgrade from pre-release
The pre-release didn't add a newline after the apn and the patching
pattern command. Create a quirk command that combines both. The
pre-release didn't include a differentation between routing and
patching.

The TLLI handling has a different and more generic name now. Make
it handle the old one that is actively used.

Add a file with the broken format and the standard config file
test should pick it up.
2015-09-24 10:28:43 +02:00
Neels Hofmeyr e57e0fa701 bsc_nat: Fix 1 log error output of wrong variable. 2015-09-23 19:02:36 +02:00
Andreas Eversberg 732665269e Add full AMR multirate IE support with VTY config for MS and BTS side 2015-09-22 16:46:27 +02:00
Neels Hofmeyr 354d1f3084 osmo-nitb: obsess about --help formatting.
Make every line use same punctuation style ('.' at the end and start in caps).
Insert spaces to have all help texts in a column.
2015-09-15 19:36:19 +02:00
Neels Hofmeyr c6a8d09b78 Remove empty README.
This README's content has moved to openbsc/README. This is just an empty
file now.
2015-09-15 19:36:19 +02:00
Neels Hofmeyr 51cf69cdb4 openbsc/configure.ac: check for pcap/pcap.h.
The build process requires pcap/pcap.h in openbsc/src/utils/meas_pcap2db.c, but
the configure script did not check for that file.
2015-09-15 19:36:19 +02:00
Holger Hans Peter Freyther 4b4a187b4f Merge branch 'zecke/features/rtp-bridge'
* Implement the rtp-bridge mode for MNCC
* Audio doesn't flow through the NITB at all
* It only works with IPv4 BTSes right now
* We need to select an audio codec way too early
* No tandem free operation
* Early assignment always equals TCH/F
2015-09-14 10:53:35 +02:00
Holger Hans Peter Freyther 53122b09d0 mncc: Use the default codec from the built-in mncc mode
In case of the RTP bridge mode we need to select the codec
ourselves. Rely on the same (incomplete) codec selection that
can be done using the mncc-int configuration node. This might
gain bearer capabilities support.

In case of a SDCCH a TCH/F will be attempted to be assigned.
This is an open issue for both modes and there should be a
preference for full or half-rate channels somewhere.
2015-09-14 10:12:29 +02:00
Holger Hans Peter Freyther c21dcb20e5 mncc: Implement CRCX->MDCX for handover for direct rtp mode
Implement sending MDCX on the newly allocated channel and send
the data to the same destination as the currently connected one.
This way the receiver can implement RTP RFC Appendix A.1 and
deal with the new source.
2015-09-14 10:12:29 +02:00
Holger Hans Peter Freyther c8a6c13e4e mncc: Implement the direct RTP mode for ip based systems
For the LCR rtp-bridge audio should directly flow to the
remote system. In contrast to the original patch audio
will now flow directly from the BTS to the remote system.
This assumes that BTS and the remote system are in the
same network segment and can directly communicate.

There are various limitations in the first iteration of
the implementation:

We could (and in the future) should delay the assignment
but currently we are forced to pick the channel and move
it to the audio state. In case we are located on a SDCCH
we always need to change but if we are on a TCH we could
send the ipa.CRCX and change the audio state a lot later.
The net effect is that the audio codec selection needs to
be done in the NITB code and not in the system connected
to it.

This only works with ip based systems. For E1 systems one
could still use the RTP socket or even try to move this
out of the process.

There is no code for handover handling and it relies on
the remote system dealing with the SSRC change of the
system.
2015-09-14 10:12:29 +02:00
Holger Hans Peter Freyther ffbf45e09e mncc: Update the protocol to match LCR
This adds the protocol definition for the RTP bridge extension
of Andreas Eversberg and bumps the protocol version.

I added the missing mncc mappings from value to string.

[ 5cf8fb10ea3addcae74d37f4dbf1c1be664df53e protocol extension
  5dac90de38990b188f499c602bf18a4f232070e8 payload extension]
2015-09-14 10:12:29 +02:00
Alexander Chemeris 08c508f84a msc: Add channel information to the meas_feed, bump version to v1. 2015-09-14 10:08:41 +02:00
Pablo Neira Ayuso d721579a6a osmux: fix show online-help
Before:

    <command id='osmux dummy (on|off)'>
      <params>
        <param name='osmux' doc='RTP multiplexing' />
        <param name='dummy' doc='Enable dummy padding' />
        <param name='on' doc='Disable dummy padding' />
        <param name='off' doc='(null)' />
      </params>

After:

    <command id='osmux dummy (on|off)'>
      <params>
        <param name='osmux' doc='RTP multiplexing' />
        <param name='dummy' doc='Dummy padding' />
        <param name='on' doc='Enable dummy padding' />
        <param name='off' doc='Disable dummy padding' />
      </params>
    </command>

Note the 'null' string in 'off'. Reported by Holger.
2015-09-07 11:31:17 +02:00
Ciaby 92360b15e3 Add SMPP support in the debian build, include libsmpp34-dev as a dependency. 2015-09-04 16:28:34 +02:00
Holger Hans Peter Freyther 614aba391d mgcp: Fix grammar, clean-up return codes
Mike's patch included clean-ups I want to apply separately and
change them a bit. If we return from an else we don't need to
put the else.

* Try the E1 trunk first
* Then try a local virtual trunk
* Fail if none of the above returned
2015-09-04 16:05:30 +02:00
Michael McTernan 79135acbb8 mgcp: Remove use of hardwired @mgw from endpoint IDs.
Remove the host portion of the endpoint Id.  This requires less
configuration and we are probably fine to trust that MGCP only
received messages designated for it.
2015-09-04 16:05:30 +02:00
Harald Welte e5ba92e7be system_information.c: Distinguish two previously identical log msgs 2015-09-04 06:25:48 +02:00
Harald Welte e18f78e81d Fix neighbor channel list generation for 1900 MHz PCS band
In the 1900 MHz PCS band, we always generated neighbor cell lists
consisting of only a single neighbor cell, rather than al the
configured BTSs.
2015-09-04 06:25:48 +02:00
Holger Hans Peter Freyther 8fc568466c debian: Require ares for the SGSN and GGSN resolving 2015-08-23 18:06:09 +02:00
Holger Hans Peter Freyther 0190d790b6 debian: Add libssl-dev for the NAT 2015-08-23 18:05:14 +02:00
Holger Hans Peter Freyther c390ae8eaf mgcp: Allow to bind to different ports for net/bts ports
When using multiple interfaces on a system one can now configure
which will be served for the BTS ports and which will be served
for the network. The direct usage of source_addr is now only to
initialize the MGCP receiving port itself.
2015-08-20 17:24:03 +02:00
Holger Hans Peter Freyther e6ed009a36 mgcp: Begin to separate network and bts endpoints
Make it possible to bind the call-agent to a specific IP address
and the network and bts end to different ip addresses. Begin by
clarifying which source ip address we want to have.
2015-08-20 14:58:19 +02:00
Holger Hans Peter Freyther ceef936ea8 mgcp: Add transcoding from PCMU as well
Use the existing ulaw encode/decode to support PCMU as well.
The MERA VoIP switch has some severe issues with the GSM codec
and it appears easier to enable transcoding for it.

The mera switch doesn't appear to cope with codec change
between a SIP 180 trying and the 200 ok connection result.

Inserting the codec is touching too many places. Ideally we
should have the transcoding function as pointer in the struct
as well but the arguments differ.. so it is not a direct way
forward.
2015-08-19 15:44:44 +02:00
Pablo Neira Ayuso 57e95a22f0 osmux: add option to pad the circuit with dummy messages
Iridium is a satellite network which operates a GPRS-like that allows you to
get speeds up to 128kbit/s. However, it takes from 5 to 6 secs to get the
bandwidth allocated, so the conversation is garbled during the time.

This patch uses the new dummy padding support in libosmo-netif that is
controlled through the osmux osmux_xfrm_input_open_circuit().

This includes a new VTY option for osmux.
2015-08-19 00:17:31 +02:00
Harald Welte ecff2424e5 Use 'ROUTING AREA' consistently, not 'ROUTEING AREA'
The spec unfortuantely uses both terms and has no consistent spelling,
but in our logging output we can at least try to be consistent.
2015-08-18 19:35:02 +02:00
Harald Welte b9845f937e GSM/GPRS 04.08: Don't print numeric mobile identity types
I guess none of our users knows what a mi_type=0x02 is, but most would
know what an IMSI or a TMSI is.  So let's use the newly introduced
gsm48_mi_type_name() function to fix this.
2015-08-18 19:35:02 +02:00
Harald Welte 6b39feedc7 GMM: fix format string compiler warning 2015-08-18 19:35:02 +02:00
Harald Welte 601cf12f81 GMM: Don't use DGPRS logging category from GMM 2015-08-18 19:35:02 +02:00
Harald Welte eb98c74fb1 GMM: use MMCTXP whenever possible to include MS identity in log output 2015-08-18 19:35:01 +02:00
Harald Welte 22df4ac848 LLC: Don't dispatch XID frames into GMM
For some odd reasons the XID is not a separate SAPI but has been kludged into
the GMM SAPI.  This means we ahve to be careful not to dispatch XID frames into
GMM.  We do this by introducing an explicit check for UI frames before the
dispatch to GMM.

The previous code already was doing "the right thing" but printed occasional
messages like "gprs_gmm.c:2082 Unknown GSM 04.08 discriminator 0x01: 01 00 0e
00 32 11 03 16 01 90 63 28 0b".  Those should be gone after this patch.
2015-08-18 19:35:01 +02:00
Harald Welte 78fa99103d LLC: Don't feed length=0 frames to SNDCP / GMM 2015-08-18 19:35:01 +02:00
Harald Welte 6a19dd0d31 GMM: add hexdump in case of unknown pdisc/msgtype 2015-08-18 19:35:01 +02:00
Harald Welte 9450882901 sgsn: make all SGSN timers configurable via the VTY 2015-08-18 19:35:01 +02:00
Andreas Eversberg 39ba248608 Send RADIO LINK TIMEOUT value via OML attribute to BTS
The same radio link timeout value is used for BTS and MS side.
2015-08-17 16:43:14 +02:00
Andreas Eversberg 4d4944a07d Add option to set RADIO LINK TIMEOUT value via VTY 2015-08-17 16:31:35 +02:00
Andreas Eversberg 93e795c1fd Add check for non existing lchan at tch_frame_down()
Traffic cannot sent to BTS, if there is (currently) no logical channel
associated with the transaction.

This happens, if TCH traffic is received from upper layer, but there is
no lchan available before completing immediate assignment, handover or
assignment process.

[hfreyther: The code has not been moved to tch_frame_down
but the issue looks similiar]
2015-08-17 16:21:24 +02:00
Holger Hans Peter Freyther 4c97435b35 mgcp: Test we don't crash on the NAT dummy MGCP message
We want the port and IPv4 address to be extracted but don't
expect any change in audio codecs.
2015-08-17 15:50:01 +02:00
Holger Hans Peter Freyther d17bc7b3a8 mgcp: Avoid crashing when rtpmap is not complete
The NAT sends an incomplete SDP file for the purpose of informing
the BSC about the remote IP/PORT early. The case of an incomplete
SDP file was not considered. Check if there is a codec and if not
skip it.

TODO: We need to have a better end-point life cycle test.
2015-08-17 15:22:30 +02:00
Holger Hans Peter Freyther a334e90ddf Merge branch 'zecke/features/sdp-codec-handling'
Move forward while preserving the legacy handling. Beging to
extract SDP rtpmap information and select codecs atfer this.
It is a foundation we can now build further and better check
ons.
2015-08-14 15:48:54 +02:00
Holger Hans Peter Freyther aeadf261e5 mgcp: Allow to enforce that the codecs need to match
We have a lot of legacy that I am afraid to break. We have
everything in place to make a good codec selection (e.g. if
we can avoid transcoding, pick the one with best quality or
the lowest speed). Right now I have a specific case where
from all options I want to pick GSM. Guard the codec compat
check behind the disallow transcoding option to make sure
to not break legacy application.
2015-08-14 15:43:06 +02:00
Holger Hans Peter Freyther ca7d05bdb9 mgcp: Turn SDP file parsing in a two stage process
First collect everything we know and the mapping. E.g. a genuis
could remap "3" to "AMR" so we only know the codecs once we are
at the end of the SDP file. Once we have collected everything we
can select the audio codecs. The current code is compatible in
that two codecs will be selected regardless of if they make any
sense or not.

mgcp_set_audio_info could re-use some of our codec information
but then the caller in the MGCP protocol needs to be updated as
well as we use the "I: GSM" information to derive the codec from
there.
2015-08-14 11:13:48 +02:00
Holger Hans Peter Freyther a611da8407 mgcp: Move the SDP handling into a separate file/module
The SDP file handling will get more complicated in terms of
codec selection so let's remove it from the protocol handling
before we start blowing it up in size.
2015-08-14 09:24:11 +02:00
Holger Hans Peter Freyther 0eaad4f216 mgcp: Remove unused parsing data struct
This struct was removed when we switched to strtok_r for
parsing the data. Remove the left-over.
2015-08-14 08:54:58 +02:00
Holger Hans Peter Freyther e9f7c9925c nat: Forward SDP files with multiple payload types in it
The parsing code assumed that there will be a single payload
type and this assumption is clearly wrong. Forward all of the
payload types. The code is still only extracting the first
type from the list. The variable name has been renamed to
reflect this.
2015-08-13 18:53:10 +02:00
Holger Hans Peter Freyther 29d58b734d sms: Attempt to plug memory leaks seen at Rhizomatica
Using the talloc leak report we see that there are some msgb's
that are allocated for SMS but we don't have transactions or
SMS around. We need to improve the name of the messages to
uniquely dscribe where they are from but the obvious leak does
occur in this routine.

The no available transaction id is most likely the case where
we leak memory. This should not occur and shows another issue
with the smsqueue/smpp handling. It doesn't explain the subscr
reference count issue either.

Extract of the leak report:

  GSM 04.11                      contains   1160 bytes in   1 blocks (ref 0) 0x2517dc0
  GSM 04.11                      contains   1160 bytes in   1 blocks (ref 0) 0x24b56e0
  GSM 04.11                      contains   1160 bytes in   1 blocks (ref 0) 0x23e7930
2015-08-12 13:38:22 +02:00
Holger Hans Peter Freyther c9dbe3c7b1 paging: Provide information about pending requests
For debugging it is nice to know how many requests are
pending. Simply count it and print it besides the paging
part.
2015-08-08 20:49:04 +02:00
Holger Hans Peter Freyther 2f25764e51 Merge branch 'zecke/fixes/subscr-leak'
At the rhizomatica sites some unauthorized subscribers have a
last used from long time ago but a bigger reference count. This
means that we have an unbalanced subscr_get/subscr_put that we
need to investigate. These two fixes are genuine fixes but are
unlikely to fix the issue I am not understanding yet.
2015-08-08 20:47:02 +02:00
Holger Hans Peter Freyther 5425e5ea27 subscr: Fix subscr refcount issue in case of message error
In case the SMPP payload didn't include the right fields we
would leak the subscr reference count.
2015-08-08 20:46:50 +02:00