aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
AgeCommit message (Collapse)AuthorFilesLines
2013-10-06abis: Consistent usage of LOGP/DEBUGP at the "RSL CONNECT NACK" log output.Alexander Chemeris1-2/+2
2013-10-04Add "subscriber create" VTY command.Alexander Chemeris1-0/+27
It may be useful in production, but it's really required for VTY testing of subscriber related commands.
2013-10-04Slight clean up of the code in gsm340_rx_tpdu() and a fix for an unlikely, ↵Alexander Chemeris1-3/+4
but possible memory leak there.
2013-10-04Fix typo in console output: "PEROIDOC" -> "PERIODIC".Alexander Chemeris1-1/+1
2013-10-04Fix typo ',' -> ';' at the end of a line.Alexander Chemeris1-1/+1
Funny, this is a correct C expression and doesn't change execution, thus it stayed unnoticed for quite a while.
2013-10-04Fix copy-paste error in console output in db_test.Alexander Chemeris1-1/+1
2013-07-29Fix: Handle CM service request on already secured channel correctlyAndreas Eversberg1-0/+5
A CM service request must be acknowledged also, when encryption is already enabled. Without encryption enabled, the security status is GSM_SECURITY_NOTAVAIL, which causes a CM service acknowledge. On initial CM service request, the security status is GSM_SECURITY_SUCCEED, if encryption is enabled. This will not lead to an acknowledge, because the cyphering command implies an acknowlege. An additional CM service request requires an acknowledge, so I added a new security status: GSM_SECURITY_ALREADY
2013-07-29Allow handling of TCH/F and TCH/H frames from layer 4Andreas Eversberg1-2/+3
2013-07-29osmo-nitb support for codec negotiationAndreas Eversberg5-69/+109
Since codec negotiation is done automatically, there is no need to define codec for TCH/F and TCH/H via VTY anymore.
2013-07-29If requested TCH/H channel is not available, try assigning TCH/FAndreas Eversberg1-0/+11
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.
2013-07-29Fix: If half rate channel is used, indicate hr when modifying channel modeAndreas Eversberg1-1/+2
2013-07-29Fix: If paging for half rate was requested, use hr, if supported by MSAndreas Eversberg1-1/+1
2013-07-29Fixed AMR payload type selection and handlingAndreas Eversberg1-1/+4
2013-07-29Add full AMR multirate IE support with VTY config for MS and BTS sideAndreas Eversberg8-41/+708
2013-07-29Drop 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 decoded, which creates anoying noise. This patch drops these frames. It depends on the SIP endpoint how these dropped frames are handled. (insert silence, extrapolate speech...)
2013-07-29Add 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.
2013-07-29Use helper function to check is an MNCC frame is data (speech/traffic)Andreas Eversberg3-19/+11
2013-07-29Send 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.
2013-07-29Add option to set RADIO LINK TIMEOUT value via VTYAndreas Eversberg3-3/+18
2013-07-29Each BTS can be configured for speech support (other than GSM full rate)Andreas Eversberg3-0/+217
Speech codings which are not supported by BTS will be removed from the bearer capability information element after parsing. This way it is not required for the MNCC application to consider support of each BTS. Only GSM full rate is supported by default.
2013-07-29Fix: TCHH/HR payloads are 15 bytes (ToC + 14 bytes of speech data)Andreas Eversberg1-3/+3
2013-07-29Fixed problem of mute audio on some callsAndreas Eversberg1-3/+1
When reading from RTP socket, the first read() may fail right after connecting to remote socket. Subsequent read() will work as it should. I have not checked why this read fails, but I don't see any reason why we should stop reading, just because one read() fails at the beginning.
2013-07-29Finished support for all codecs (RTP bridge and MNCC interface)Andreas Eversberg7-20/+42
The codes is not yet tested. AMR rate is currently fixed to 5.9k.
2013-07-29Fixed delay problems, if RTP stream jitters too muchAndreas Eversberg1-6/+30
The RTP stream is generated or forwarded by OpenBSC to nanoBTS. Due to switching of streams (hold/retrieve call), packet loss or even stalling of sender's process, the time stamp must be corrected. If outdated packets are received, they get dropped.
2013-07-29Allow dynamic RTP payload types between application and MNCC interfaceAndreas Eversberg4-15/+43
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.
2013-07-29Adding handling of BFI (Bad Frame Indicatior) of received TRAU framesAndreas Eversberg4-3/+18
If a bad TRAU frame is received, it is forwarded to MNCC application as GSM_TCHF_BAD_FRAME. The application can now handle the GAP of missing audio. (e.g. with extrapolation) If TRAU frames are forwarded via RTP, bad frames are dropped, but frame counter and timestamp of RTP sender state is increased.
2013-07-29Adding traffic forwarding via RTP to remote applicationAndreas Eversberg13-43/+251
Instead of forwarding traffic through MNCC interface, traffic can now be forwarded to a given RTP destination. A special MNCC message is used for that. 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.
2013-07-29Fix of several compiler warningsAndreas Eversberg9-7/+29
2013-07-28gprs: Fix a typo in the commentHolger Hans Peter Freyther1-1/+1
2013-07-27tests: TestCase.assertGreater is not available on Python 2.5Holger Hans Peter Freyther1-2/+2
The jenkins build node has Python 2.5.X installed and the assertGreater method is not available. Use assert_ until we can use newer versions of Python.
2013-07-27expiration: Allow to disable the periodic location updating procedureHolger Hans Peter Freyther5-28/+101
Disable the periodic LU using "no periodic location update" VTY command. In that case set the expire_lu to 0 which will then be translated to a NULL in the database layer. This leads to a bit of copy and paste in the db_sync_subscriber method but I don't see how we could easily use 'datetime(%i, 'unixepoch')' and 'NULL' at the same time. Change the query to find expired queries to check for NOT NULL and the time being in the past. This means if there are still old subscribers in the database they might not be expired. One would need to execute a query like "UPATE Subscriber SET expire_lu = 0 WHERE expire_lu is null". The same applies when disabling the periodic LU. One would need to update the database by hand. Manual tests executed/passed: 1.) periodic LU enabled: * use gst LUTest.st to do a LU * UPDATE Subscriber SET expire_lu=datetime('now'); * observe the subscriber being expired (it was) 2.) periodic LU disabled: * use gst LUTest.st to do a LU * verify that the expire_lu is NULL in the database
2013-07-27expiration: Speculative fixes for the periodic expiring handlingHolger Hans Peter Freyther6-17/+66
We were expiring subscribers during active calls. This is because the T3212 is stopped under certain conditions but we didn't stop that timer at all. Remember if T3212 timer was stopped due something done by NITB and update the expiration time at the end of the radio connection, as the phone should restart it when returning to MM Idle. It is a bit difficult to decide when we should set the flag. E.g. in a CM Service Request we don't know if we accept the service and during a LU we already send MM messages before we accept or reject the subscriber. The easiest is to set the flag when receiving a paging response on known subscribers and at the end of the authentication process. Do not expire a subscriber that has an active connection that is marked with the flag, e.g. we would still expire a subscriber that is being paged. Manual tests executed/passed: * gst LUTest.st verified that a expiration date was set * gst SMSTest.st (doing another LU but forcing a timeout on the SMS sending). Verified that the expire_lu was updated.
2013-07-27expiration: Print the "expire_lu" time in show subscriberHolger Hans Peter Freyther1-0/+9
This can help with debugging subscriber expiration issues.
2013-07-27smpp: Move the coding/mode detection into a utils fileHolger Hans Peter Freyther13-37/+174
Make sure to not ever have issues with this code again, move the utility code to a new file and create a basic testcase. The method currently has 100% line and branch coverage. My initial patched missed the smpp_utils.c file and I re-did the copying (and verifying the branch coverage)
2013-07-27misc: Fix compilation warningsHolger Hans Peter Freyther7-20/+11
bsc_api.c:417:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] bsc_api.c: In function ‘handle_ass_fail’: bsc_api.c:458:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] db.c: In function ‘db_sync_subscriber’: db.c:785:3: warning: format ‘%i’ expects argument of type ‘int’, but argument 8 has type ‘time_t’ [-Wformat] osmo_msc.c: In function ‘msc_release_connection’: osmo_msc.c:145:20: warning: unused variable ‘trans’ [-Wunused-variable] smpp_smsc.c: In function ‘link_accept_cb’: smpp_smsc.c:891:24: warning: assignment from incompatible pointer type [enabled by default] smpp_smsc.c:271:1: warning: ‘esme_by_system_id’ defined but not used [-Wunused-function] smpp_openbsc.c: In function ‘smpp_openbsc_init’: smpp_openbsc.c:545:2: warning: implicit declaration of function ‘smpp_vty_init’ [-Wimplicit-function-declaration] osmo_bsc_ctrl.c: In function ‘verify_bts_loc’: osmo_bsc_ctrl.c:340:19: warning: variable ‘height’ set but not used [-Wunused-but-set-variable smpp_mirror.c: In function ‘main’: smpp_mirror.c:297:2: warning: implicit declaration of function ‘osmo_init_logging’ [-Wimplicit-function-declaration]
2013-07-21sgsn: spelling fixes inside commentsHarald Welte2-3/+3
2013-07-21SMPP: complete the VTY help/documentationHarald Welte1-9/+33
As discovered by osmotestconfig.py, a number of SMPP related VTY commands were missing their help/documentation text.
2013-07-21remove 'bind early' from osmo-bsc_mgcp example configHarald Welte1-1/+0
(discovered by osmotestconfig.py)
2013-07-21sgsn: Add "auth-policy" VTY command to enable/disable ACLHarald Welte3-1/+20
2013-07-21sgsn: add a minimalistic ACLHarald Welte4-2/+84
This adds a minimalistic ACL by which certain, individual roaming IMSIs can be authorized to use the SGSN. So you can selectively bypass the 'MCC+MNC == first 5 digits of IMSI' checking for a couple of IMSIs
2013-07-18oml: Add a missing break switch for NM_OC_BS11Holger Hans Peter Freyther1-0/+1
It appears to me that for NM_OC_BS11 mo was either NULL or the one mo value from NM_OC_BS11_RACK. The break inside the nested switch case didn't break from the outer one. Fixes Coverity: CID 1040728
2013-07-14smpp: Close the file descriptor when we can't accept the SMSC connHolger Hans Peter Freyther1-1/+4
When we failed to allocate the memory or failed to register the fd we would have leaked the file descriptor. Close the fd and avoid the leak.
2013-07-14smpp: Add the classic check for osmo_fd_registerHolger Hans Peter Freyther1-1/+5
In case the osmo_fd_register will fail we will need to free the memory we have allocated. Fixes: Coverity CID 1042375
2013-07-14smpp: Fix possible NULL dereference of the emse->aclHolger Hans Peter Freyther1-2/+2
The esme->acl is treated like it can be NULL in other places of the code. Assume it can be NULL during this check as well. Dereference after null check (FORWARD_NULL) 9. var_deref_op: Dereferencing null pointer "esme->acl". Fixes: Coverity CID 1042374
2013-07-14smpp: Checking an array for NULL will always be falseHolger Hans Peter Freyther2-2/+2
The if (submit->short_message) and if (smsc->system_id) will always be true. Fixes: Coverity CID 1042371, CID 1042372
2013-07-14ipaccess: The proxy code checked the array but not the elementHolger Hans Peter Freyther1-1/+1
Array compared against 0 (NO_EFFECT) array_null: Comparing an array to null is not useful: "ipbc->bsc_rsl_conn". Fixes: Coverity CID 1040718
2013-07-14ipaccess: Fix a resource leak in case the stat is failingHolger Hans Peter Freyther1-0/+1
Close the file when the stat is failing. Fixes: Coverity CID 1040711
2013-07-14nitb: The subscr->imsi is an array will never be NULLHolger Hans Peter Freyther2-4/+2
Array compared against 0 (NO_EFFECT) array_null: Comparing an array to null is not useful: "subscr->imsi" Fixes: Coverity CID 1040716
2013-07-13Fix license header at smpp_openbsc.c and smpp_smsc.cHarald Welte2-22/+24
As Holger pointed out, they contained a GPLv2+ disclaimer rather than the AGPLv3+ which we use for OpenBSC. This is not an incompaibility, but was done unintentionally. The code was always mean to be under AGPLv3+. Nevertheless, anyone using those two files in a version up to this commit have the right to use it under GPLv2+ as well. This is not applicable for any versions after this commit.
2013-07-11smpp_openbsc: Fix parsing of 03.38 data coding scheme in MO caseHarald Welte1-15/+28