aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2015-05-26osmo-nitb support for codec negotiationAndreas Eversberg5-71/+111
The caller's most preferred codec is selected out of the union of codecs, which both parties support. Since codec negotiation is done automatically, there is no need to define codec for TCH/F and TCH/H via VTY anymore. Conflicts: openbsc/src/libmsc/gsm_04_08.c openbsc/src/libmsc/vty_interface_layer3.c
2015-05-26If requested TCH/H channel is not available, try assigning TCH/FAndreas Eversberg1-0/+10
If MNCC application requests a half rate channel, the channel might not be available, due to different cell configuration, so the full rate channel is used instead.
2015-05-26Fix: If paging for half rate was requested, use hr, if supported by MSAndreas Eversberg1-1/+1
2015-05-26Add full AMR multirate IE support with VTY config for MS and BTS sideAndreas Eversberg9-42/+474
Conflicts: openbsc/include/openbsc/gsm_data_shared.h openbsc/src/libbsc/bsc_vty.c openbsc/src/libbsc/chan_alloc.c
2015-05-26Drop bad speech frames rather than forwarding them via RTPAndreas Eversberg1-0/+9
Some RTP endpoints may not check for bad frame indications, so a frame that is marked as bad may be still forwarded, which creates anoying noise. This patch drops these frames. It depends on the other RTP endpoint how dropped frames are handled. (insert silence, extrapolate speech...)
2015-05-26Add check for non existing lchan at tch_frame_down()Andreas Eversberg1-0/+4
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.
2015-05-26Send RADIO LINK TIMEOUT value via OML attribute to BTSAndreas Eversberg1-0/+4
The same radio link timeout value is used for BTS and MS side.
2015-05-26Add option to set RADIO LINK TIMEOUT value via VTYAndreas Eversberg4-3/+33
2015-05-26Allow dynamic RTP payload types between application and MNCC interfaceAndreas Eversberg4-18/+46
Since EFR/AMR/HR codecs use dynamic RTP payload, the payload type can be set. If it is set, the frame type must be set also, so OpenBSC knows what frame types are received via RTP. This modification only affects traffic beween application and MNCC interface, not the RTP traffic between OpenBSC and BTS. Conflicts: openbsc/src/libtrau/rtp_proxy.c
2015-05-26Add traffic forwarding via RTP to remote applicationAndreas Eversberg15-43/+253
Instead of forwarding traffic through MNCC interface, traffic can be forwarded to a given RTP peer directly. A special MNCC message is used to control the peer's destination. The traffic can still be forwarded through MNCC interface when this special MNCC message is not used. It also works with E1 based BTSs. In conjunction with LCR's "rtp-bridge" feature, the RTP traffic can be directly exchanged with a remote SIP endpoint, so that the traffic is not forwarded by LCR itself. This way the performance of handling traffic only depends on OpenBSC and the remote SIP endpoint. Also the traffic is exchanged with the SIP endpoint without transcoding, to have maximum performance. Increment MNCC version to 5. Conflicts: openbsc/tests/gbproxy/gbproxy_test.c
2015-05-05sgsn: Show the QoS that has been assignedHolger Hans Peter Freyther1-1/+2
2015-05-05sgsn: Dump the E164 (encoded) assigned to the subscriberHolger Hans Peter Freyther1-0/+5
2015-05-05sgsn: Handle different levels of QoSHolger Hans Peter Freyther1-5/+12
If QoS is only three bytes it does not include the allocation/ retention policy. Otherwise it does. Copy it depending on that. We should have a macro for the clamping to reduce code duplication. The insanity does come from the MAP data and this seems to be the easiest in terms of complexity. It is an array of bytes that is transported from MAPProxy to the SGSN and then simply forwarded. The case of more than three bytes is neither unit nor manually tested so far.
2015-05-05sgsn: Store subscribed QoS and attempt to use itHolger Hans Peter Freyther5-4/+41
sgsn_create_pdp_ctx should use the subscribed QoS. When selecting the PDP context we inject the QoS to be used into the TLV structure and use it during the request. Assume a "qos-Subscribed" structure only with three bytes and prepend the Allocation/Retention policy to the request.
2015-05-05sgsn: Copy the msisdn to the sgsn_data and use it in PDP activationHolger Hans Peter Freyther4-2/+36
The MSISDN should be present for "security" reasons in the first activation of a PDP context. Take the encoded MSISDN, store it for future use and then put it into the PDP activation request. The MM Context contains a field for a decoded MSISDN already. As we need to forward the data to the GGSN I want to avoid having to store TON and NPI in another place. Simply store the data in the encoded form.
2015-05-05gsup: Extract the QoS fieldHolger Hans Peter Freyther3-1/+15
Add roundtrip test for the new QoS IE. It will be consumed in later commits.
2015-05-05gsup: Extract the new MSISDN stringHolger Hans Peter Freyther3-0/+17
Extract the new MSISDN IE from the GSUP message and verify that it is read/written to the message.
2015-05-05gsup: Specify the QoS service for the PDP infoHolger Hans Peter Freyther1-0/+22
QoS is a mess. In MAP there is qos-Subscribed which is then extended using ext-QoS-Subscribed, ext2-QoS-Subscribed, ext3-QoS-Subscribed and maybe even ext4-QoS-Subscribed by now. The MAP ASN1 files defined how these need to be "linearized". Instead of copying this I have decided to include the two semantics with/without the Allocation/Retention policy using the size of the data.
2015-05-05gsup: Document passing MSISDN as part of the responseHolger Hans Peter Freyther1-0/+23
When asking the GGSN to create/open a PDP context one needs to send a MSISDN. The MSISDN can only be provided through the GSUP interface.
2015-05-03bsc: Send a LU Reject in case it has been filteredHolger Hans Peter Freyther1-8/+42
In case we filter the request and it was a Location Updating Procedure we should reject it.
2015-05-03bsc: Add access list filtering to the BSCHolger Hans Peter Freyther4-4/+63
2015-05-03bsc: Add access lists to the MSC and the BSCHolger Hans Peter Freyther6-2/+84
It is a bit arbitary to decide which one is the global and which one is the local one. We might change it around. I don't think we want to introduce it based on BTS.
2015-05-03filter: Move the con_type into the filter_stateHolger Hans Peter Freyther11-52/+54
2015-05-03filter: Move from DNAT to DFILTER categoryHolger Hans Peter Freyther3-12/+18
2015-05-03filter: Remove bsc_connection from the filter APIHolger Hans Peter Freyther3-37/+37
Remove the last occurence of NAT datastructures in the filtering module and add the ctx to the filter request structure.
2015-05-03filter: Remove nat_sccp_connection from public APIHolger Hans Peter Freyther7-27/+35
2015-05-03filter: Remove the bsc_connection from the internal functionsHolger Hans Peter Freyther1-6/+6
2015-05-03filter: Put all the parameters in a struct to avoid order issuesHolger Hans Peter Freyther1-19/+31
With the "local" and "global" list name we might pick the wrong argument. Avoid it by passing them as a struct.
2015-05-03filter: Remove NAT knowledge from auth_imsiHolger Hans Peter Freyther1-8/+17
Push back the parameters we need to pass. auth_imsi doesn't know anything about the nat now.
2015-05-03filter: Separate SCCP/BSSAP extraction and gsm48 codeHolger Hans Peter Freyther6-57/+130
For the BSC we will have the gsm48_hdr and don't need to find data within SCCP. For legacy reasons we need to initialize con_type, imsi, reject causes early on and need to do the same in the filter method.
2015-05-03filter: More renaming and remove of "NAT" from itHolger Hans Peter Freyther5-41/+41
2015-05-03filter: Rename BSC to LOCAL and NAT to GLOBALHolger Hans Peter Freyther3-6/+6
2015-05-03filter: Remove nat from bsc_nat_acc_lst and replace with msgHolger Hans Peter Freyther9-63/+63
2015-05-03filter: Cease out "struct bsc_nat" from the APIHolger Hans Peter Freyther7-26/+24
This means we need to require a talloc context and simply operate on the list. I had considered creating a structure to hold the list head but I didn't find any other members so omitted it for now.
2015-05-03filter: Move VTY code into the filter moduleHolger Hans Peter Freyther4-111/+149
2015-05-03filter: Move the access list management aroundHolger Hans Peter Freyther6-97/+128
2015-05-03filter: Move the method definition to the filter moduleHolger Hans Peter Freyther9-59/+80
Move the filter methods to the filter module. This is still only usable for the NAT and the _dt/_cr filter routines need to move back to the bsc_nat in the long run.
2015-05-03filter: Move the gsm 04.08 filter to a common placeHolger Hans Peter Freyther6-4/+16
For customer requirements we want to be able to do filtering on the BSC as well. The same messages need to be scanned and the same access-lists will be looked at. In the future we might even split traffic based on the IMSI. Begin with moving the code to a new top level directory and then renaming and removing the nat dependency.
2015-05-02mgcp: Fix compiler warning on 64bit buildsHolger Hans Peter Freyther1-1/+1
ENDPOINT_NUMBER takes the difference of two pointers. On 64bit builds the difference is a long and the compiler then complains about the usage of abs. We will never have thousands of endpoints so silence the warning by casting the ENDPOINT_NUMBER to int. mgcp_vty.c:1381:34: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] rtp_port = rtp_calculate_port(ENDPOINT_NUMBER(endp), ^ ../../include/openbsc/mgcp_internal.h:206:31: note: expanded from macro 'ENDPOINT_NUMBER' #define ENDPOINT_NUMBER(endp) abs(endp - endp->tcfg->endpoints) ^ mgcp_vty.c:1381:34: note: use function 'labs' instead
2015-04-29sub: Remove the queue from the subscriber codeHolger Hans Peter Freyther10-201/+102
The idea of "subscriber_get_channel" was that different requests would be coordinated. At the same time we have seen that the "queue" can get stuck at both 31C3 and the rhizomatica installations. Voice calls and SMS do not need coordination. We should be able to send SMS on a voice channel and switch the MS from a SDCCH to a TCH in case we establish a voice call. The SMS code itself needs to coordinate to obey the limit of one SMS per direction but this should be enforced in the sms layer and not on the subscriber. Modify the code to have a simple paging coordination. The subscriber code will schedule the paging and register who would like to know about success/failure. This allowed to greatly simplify the paging response handling for the transaction code (and in fact we could move the transaction list into the subscriber structure now). The code gained to support to cancel the notification of a request (but not the paging itself yet). TODO: Cancel paging request in case no one cares about it anymore.
2015-04-29sub: Remove introspection of the "channel queue"Holger Hans Peter Freyther3-127/+4
Over the next commits the queuing of commits will be completely modified to remove the queue and move the scheduling/limits to the outer callers.
2015-04-29sub: Remove paging requests before dispatchingHolger Hans Peter Freyther1-4/+10
The dispatching might lead to the removal of more paging requests and makes "request" invalid. Remove it before calling the callback.
2015-04-29mncc: Select the codec similar to the modify handlingHolger Hans Peter Freyther1-1/+1
In case the default TCH/F codec is "EFR" and we do an early assignment from SDCCH to a TCH we would assign the TCH/H codec. This is because the lchan_type will be neither a TCH/H nor a TCH/F. At the same time the _gsm48_lchan_modify code to check for half vs. full-rate is the other way around. Align both. It is full-rate if it is not a TCH_H. This will have some other complications down the way (early assignment on cells with only TCH/H). So the mode should not depend on the _current_ channel but the kind of channel we want.
2015-04-29mgcp/test: Fix mgcp-transcoding assertion (Coverity)Jacob Erlbeck1-1/+1
In test_rtp_seq_state an assignment is accidently done within an assertion. This commit changes that into a comparison as it was intended. Fixes: Coverity CID 1295457, 1295458 Sponsored-by: On-Waves ehf
2015-04-28mgcp: Move assignment of src_codec downwardsJacob Erlbeck1-1/+2
Currently the src_codec const variable is set to &src_end->codec before src_end is checked against NULL. Since the assigment is just an address operation and the memory where it points to is only accessed after the NULL check, this does not harm technically. Nevertheless this is potential source for errors if that code is changed. This commit moves the definition below the NULL check. This does not comply with the coding style, but it cannot be split into definition and a later assignment due to the const qualifier. Sponsored-by: On-Waves ehf
2015-04-24mgcp: Allow to disable transcoding for trunksHolger Hans Peter Freyther3-0/+56
We might have compiled transcoding into the MGW but we don't want to enable it for a given user. Add a new switch that should allow that. I had manually tested the allow-transcoding/no allow VTY interface for the primary interface and a new trunk using show running-config.
2015-04-24mgcp: Ignore the case for finding a codecHolger Hans Peter Freyther1-5/+5
It is unlikely that GSM, gsm and GsM refer to different codecs. The mera mvts does send the audio codecs in lower case even if RFC 3551 has them in upper case (but copy and paste is sometimes too hard).
2015-04-23nat: Make mode-set patching optionalHolger Hans Peter Freyther7-6/+68
2015-04-23sgsn/gtp: Fill out the optional RAT typeHolger Hans Peter Freyther1-0/+5
Assume we are always a GERAN network right now.
2015-04-23misc: Fix warnings about size of size_t in printfHolger Hans Peter Freyther4-16/+16
Fixes warnings like: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat]