aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-01-16ctrl: Increase the maximum size of сontrol messagekluchnikov/nitb-ctrl-interfaceIvan Kluchnikov2-3/+3
We should support network-status control message, size of this message can be more than 4096 bytes.
2014-01-16nitb: Fix smsqueue ctrl commandIvan Kluchnikov3-8/+9
2014-01-16nitb: Fix output of lchan, paging, oml_link, channels-load and smsqueue ctrl ↵Ivan Kluchnikov1-0/+15
commands
2014-01-15nitb: Add output parameters for lchan ctrl commandIvan Kluchnikov1-18/+58
1. Add lchan connection state parameters. 2. Add subscriber id, authorized, name, extension, imsi, tmsi and use_count parameters. 3. Add bound ip, port, rtp payload and connection id parameters.
2014-01-15nitb: Fix lchan-summary ctrl commandIvan Kluchnikov1-9/+13
1. Rename command "lchan-summary", we should use "lchan" name, because command return all parameters of lchans. 2. We shouldn't print channel type for each lchan parameter, channel type is one of lchan parameters.
2014-01-15nitb: Minor code optimization for ctrl commandsIvan Kluchnikov2-60/+24
2014-01-15nitb: Add network-status ctrl command to get all network counters, SMS queue ↵Ivan Kluchnikov2-18/+99
status and channels status
2014-01-14nitb: Add ctrl command to get SMS queue statusIvan Kluchnikov3-0/+45
2014-01-14nitb: Add ctrl commands to get paging counters and state of oml linkIvan Kluchnikov1-3/+79
2014-01-14nitb: Change syntax of ctrl commands for network countersIvan Kluchnikov1-30/+30
2014-01-14nitb: Add ctrl command to get summary of logical channelsIvan Kluchnikov1-0/+109
2014-01-13nitb: Add ctrl command to get network channels loadIvan Kluchnikov1-1/+49
2014-01-13nitb: Add ctrl commands to get network related countersIvan Kluchnikov2-0/+132
2014-01-13nitb: Add ctrl command to set the TRX ARFCNHolger Hans Peter Freyther1-0/+3
2014-01-13nitb: Add ctrl command to set the TRX max_power_reductionHolger Hans Peter Freyther1-0/+24
2014-01-13nitb: Add ctrl command to add/remove the BTS neighbor listHolger Hans Peter Freyther1-0/+41
2014-01-13nitb: Add ctrl command to set the BTS neighbor modeHolger Hans Peter Freyther4-24/+70
2014-01-13nitb: Add ctrl command to set the BTS ms max powerHolger Hans Peter Freyther1-0/+3
2014-01-13nitb: Add ctrl command to set the BTS cell_identityHolger Hans Peter Freyther1-0/+3
2014-01-13nitb: Add ctrl command to set the BTS location area codeHolger Hans Peter Freyther1-0/+3
2014-01-13nitb: Add ctrl command to set the BTS site idHolger Hans Peter Freyther1-0/+3
2014-01-13nitb: Add ctrl command to set the BTS descriptionHolger Hans Peter Freyther1-0/+6
2014-01-13nitb: Add ctrl command for setting the global timersHolger Hans Peter Freyther2-7/+41
2014-01-13nitb: Add ctrl command to apply the configurationHolger Hans Peter Freyther1-0/+31
Right now this only works for IP based BTS like the sysmoBTS and by dropping the OML link.
2014-01-13nitb: Add ctrl command for saving the configurationHolger Hans Peter Freyther1-0/+28
2014-01-13nitb: Add ctrl command for MNC, MCC, short-name and long-nameHolger Hans Peter Freyther3-1/+83
Add the framework for adding more setting commands.
2014-01-13ctrl: Make it possible to re-use the string get and set routineHolger Hans Peter Freyther1-3/+7
This can be used for the description field that requires some special handling for newlines.
2014-01-13ctrl: Make the int range set, get and verify methods availableHolger Hans Peter Freyther1-4/+12
For the max power reduction we will need to have a different range method. It will need to check if the value is even. Make the set, get and verify methods available through a macro.
2014-01-09Add VTY option for Nokia BTS that does not send RELease CONFirm messageAndreas Eversberg4-2/+70
This option is a workarround for a bug found in Nokia InSite BTS firmware version 3.0.0. There is no RELease CONFirm message for local end release. Nokia MetroSite with firmware version 4.178.16 is not affected. TS 04.06 Chapter 5.4.4.4 "Local end release procedure" states that a confirm must be sent by layer 2 when receiving a local end release request. In order to correctly switch a channel (handover or assignment), local end release is required.
2014-01-08nitb: Set the DST field in generated MM info messagesJacob Erlbeck1-0/+15
Currently the NET_DST information element (see GSM 24.008) is not included in generated MM info messages even when the DST field in the timezone info has been set via the VTY or the control interface. This patch modifies gsm48_tx_mm_info() to append this information element if (and only if) a non-zero DST has been configured. The DST IE is not part of GSM 4.8. Therefore it will only be sent, if the DST offset is configured to a value != 0. The DST functionality has been verified with wireshark by Jacob. Sponsored-by: On-Waves ehf
2013-12-29smpp: In case we know the receiver set the context for loggingHolger Hans Peter Freyther1-0/+2
2013-12-29mncc: Add the context we get from the MNCC interfaceHolger Hans Peter Freyther1-0/+13
Currently we only set the SUBSCR on RSL messages. Extend it to messages that go through MNCC. For call control/bridging it is difficult to pick the right subscriber. We should support a list or at least two legs in the imsi filter context.
2013-12-28ussd: Reject and release unhandled SS requests/interrogationTobias Engel1-1/+9
In case the unpack of a USSD request is failing the channel would remain open and the phone would not receive a response. Simply reject the interrogation. Example interrogation: 0000 1b 7b 1c 0d a1 0b 02 01 01 02 01 0e 30 03 04 01 0010 11 7f 01 00
2013-12-27sms: Fix crash on RLL Establish Request timeouts with active callHolger Hans Peter Freyther1-13/+18
Sylvain pointed out that in the current crash log the transaction we try to read the SMS from is actually a transaction for Call Control. On AMD64 the struct layout is different and that leads to a crash when the CC transaction is in front of the SMS transaction. Look at the trans->protocol to fix the crash. The issue got introduced in 6a3d765bf97349535602ed5b2b55d2093aa18d71 (2010) when I added the SAPI N Reject handling. #0 smpp_sms_cb (subsys=1, signal=4, handler_data=0xbb8270, signal_data=0x7fff33574ea0) at smpp_openbsc.c:284 284 if (sms->source != SMS_SOURCE_SMPP) (gdb) bt #0 smpp_sms_cb (subsys=1, signal=4, handler_data=0xbb8270, signal_data=0x7fff33574ea0) at smpp_openbsc.c:284 #1 0x00007f424e4a094c in osmo_signal_dispatch (subsys=1, signal=4, signal_data=0x7fff33574ea0) at signal.c:105 #2 0x000000000042b070 in send_signal (sig_no=<optimized out>, trans=<optimized out>, sms=<optimized out>, paging_result=<optimized out>) at gsm_04_11.c:125 #3 0x000000000042ccd2 in gsm411_sapi_n_reject (conn=0xec6790) at gsm_04_11.c:1000 #4 0x0000000000408983 in send_sapi_reject (link_id=<optimized out>, conn=<optimized out>) at bsc_api.c:733 #5 rll_ind_cb (_data=<optimized out>, lchan=<optimized out>, link_id=<optimized out>, rllr_ind=<optimized out>) at bsc_api.c:755 #6 rll_ind_cb (lchan=<optimized out>, link_id=<optimized out>, _data=<optimized out>, rllr_ind=<optimized out>) at bsc_api.c:736 #7 0x000000000041f8d2 in complete_rllr (rllr=<optimized out>, type=<optimized out>) at bsc_rll.c:55 #8 0x00007f424e4a03bc in osmo_timers_update () at timer.c:243 #9 0x00007f424e4a069b in osmo_select_main (polling=0) at select.c:133 #10 0x0000000000407394 in main (argc=<optimized out>, argv=0x7fff33575238) at bsc_hack.c:346 (gdb) frame 3 #3 0x000000000042ccd2 in gsm411_sapi_n_reject (conn=0xec6790) at gsm_04_11.c:1000 1000 send_signal(S_SMS_UNKNOWN_ERROR, trans, sms, 0); (gdb) p trans $1 = (struct gsm_trans *) 0xedba80 (gdb) p *trans .... data = 0x1}}, sms = 0x3439323400000003}}} (gdb) p trans->protocol $4 = 3 '\003'
2013-12-27db: Avoid crash we have seen with the dbi code when reading a SMSHolger Hans Peter Freyther2-0/+16
Avoid a crash when reading a SMS and a Subscriber could not be resolved. It is not clear why the read was failing. The sender_id and the receiver_id was valid for the given sms. I assume that the database has been locked due external access to it. The side-effect is that in case of such a failure the sms_queue will start to deliver starting from subscriber id = 0 again. #1 0x0000000000428bec in sms_from_result (net=0x156a270, result=0x15eda30) at db.c:1146 #2 0x000000000042a8e0 in db_sms_get_unsent_by_subscr (net=0x156a270, min_subscr_id=<optimized out>, failed=<optimized out>) at db.c:1255 #3 0x000000000042e900 in take_next_sms (smsq=<optimized out>) at sms_queue.c:193 #4 sms_submit_pending (_data=0x158e300) at sms_queue.c:227 #5 0x00007f3fd30de3bc in osmo_timers_update () at timer.c:243 #6 0x00007f3fd30de69b in osmo_select_main (polling=0) at select.c:133 #7 0x0000000000406fbc in main (argc=9, argv=<optimized out>) at bsc_hack.c:346 (gdb) frame 1 #1 0x0000000000428bec in sms_from_result (net=0x156a270, result=0x15eda30) at db.c:1146 1146 strncpy(sms->src.addr, sms->sender->extension, sizeof(sms->src.addr)-1); (gdb) p *sms (gdb) p sms->sender $1 = (struct gsm_subscriber *) 0x0 (gdb) p sender_id $2 = <optimized out>
2013-12-27bsc: Reduce the RLL timeout to be smaller than TC1/max_retr+1Holger Hans Peter Freyther1-1/+1
Sylvain pointed out that the RLL and the SMC timeout is the same. This can lead to have a SMC re-transmission before the first RLL Establish Request has timed out. Reduce the RLL timeout. GSM 08.58 does not specify a timeout so right now I just reduce it to seven seconds.
2013-12-27libmsc: Set the "trans->conn" to NULL to catch invalid usageHolger Hans Peter Freyther1-1/+1
Make finding use-after-free more easy and set it to NULL.
2013-12-27lu crash: Fix a crash that likely occurred during the LU procedureHolger Hans Peter Freyther1-0/+3
conn->loc_operation is already NULL (e.g. due a five second timeout but we are still processing a RSL message after we initiated the release procedure). Do not attempt to authorize a subcriber without knowing the key_sequence. This can cause more problems but we will need to test this in the field. (gdb) bt #0 gsm0408_authorize (conn=0x19fc2f0, msg=<optimized out>) at gsm_04_08.c:323 #1 gsm0408_authorize (conn=0x19fc2f0, msg=<optimized out>) at gsm_04_08.c:319 #2 0x000000000043a99a in mm_rx_id_resp (conn=0x19fc2f0, msg=<optimized out>) at gsm_04_08.c:495 #3 gsm0408_rcv_mm (msg=<optimized out>, conn=0x19fc2f0) at gsm_04_08.c:1041 #4 gsm0408_dispatch (conn=0x19fc2f0, msg=<optimized out>) at gsm_04_08.c:3232 (gdb) p *conn $5 = {entry = {next = 0x1746930, prev = 0x1a14270}, subscr = 0x1745eb0, expire_timer_stopped = 1 '\001', loc_operation = 0x0, sec_operation = 0x0, anch_operation = 0x0, silent_call = 0, put_channel = 0, sccp_con = 0x0, in_release = 0, lchan = 0x7f8c79007218, ho_lchan = 0x0, bts = 0x1719f90, T10 = {node = { rb_parent_color = 0, rb_right = 0x0, rb_left = 0x0}, list = {next = 0x0, prev = 0x0}, timeout = {tv_sec = 0, tv_usec = 0}, active = 0, cb = 0, data = 0x0}, secondary_lchan = 0x0}
2013-12-27periodic/lu: Attempt to implicitly attach a subscriber instead of rejectingHolger Hans Peter Freyther1-4/+17
When modern Smartphones receive "Not in VLR". The baseband firmware apparently does not try to do an IMSI ATTACH but just remains un-happy and will not connect to the network anymore.
2013-12-27Revert "gsm_04_11: Speculative fix for MT SMS and SAPI 'n Reject"Holger Hans Peter Freyther1-2/+0
Let's revert it and see if we can find the real issue about the sms being invalid. Sylvain has pointed out that we get invoked from a timer and might not have stopped it properly. This reverts commit 80ba9b5dd62cc8bfd10dae2f3b63420ef1e8452d.
2013-12-27gsm_04_11: Speculative fix for MT SMS and SAPI 'n RejectHolger Hans Peter Freyther1-0/+2
I am not sure why it is crashing so this is a speculative fix based on something we already did in 3e9b2ec257bc064b866ce6a2735206dc6131f615. #0 sms_find_pending (smsq=0x2706300, sms=<optimized out>) at sms_queue.c:77 #1 sms_sms_cb (subsys=<optimized out>, signal=4, handler_data=0x26e2270, signal_data=0x7fffdac256c0) at sms_queue.c:396 #2 0x00007fcdea94394c in osmo_signal_dispatch (subsys=1, signal=4, signal_data=0x7fffdac256c0) at signal.c:105 #3 0x000000000042acc0 in send_signal (sig_no=<optimized out>, trans=<optimized out>, sms=<optimized out>, paging_result=<optimized out>) at gsm_04_11.c:124 #4 0x000000000042c8e2 in gsm411_sapi_n_reject (conn=0x2722d30) at gsm_04_11.c:999 #5 0x00000000004085d3 in send_sapi_reject (link_id=<optimized out>, conn=<optimized out>) at bsc_api.c:733 #6 rll_ind_cb (_data=<optimized out>, lchan=<optimized out>, link_id=<optimized out>, rllr_ind=<optimized out>) at bsc_api.c:755 #7 rll_ind_cb (lchan=<optimized out>, link_id=<optimized out>, _data=<optimized out>, rllr_ind=<optimized out>) at bsc_api.c:736 #8 0x000000000041f522 in complete_rllr (rllr=<optimized out>, type=<optimized out>) at bsc_rll.c:55 #9 0x00007fcdea9433bc in osmo_timers_update () at timer.c:243 #10 0x00007fcdea94369b in osmo_select_main (polling=0) at select.c:133 #11 0x0000000000406fbc in main (argc=9, argv=<optimized out>) at bsc_hack.c:346
2013-12-26sms: Move to gsm_7bit_encode_n in the sms sending codeHolger Hans Peter Freyther1-1/+2
Do not rely on the potential wrong gsm_7bit_encode result but use gsm_7bit_encode_n with maximum available space.
2013-12-26ussd: Move to use gsm_7bit_encode_n_ussd for USSD encodingHolger Hans Peter Freyther1-1/+1
The legacy functions have a bad/wrong return value for the number of septets in the string. Change the code to use the new functions which will fix encoding issues as well.
2013-12-26db: Fetch the authorized key using ulonglongKevin Redon1-2/+3
Location Update Requests time out and get rejected because the subscriber is not authorized. Authorizing the subscriber through openBSC or sqlite3 doesn't help the subscriber is still seen and shown as not authorized The value is read as uint, this is the wrong type it's a (u)longlong in libdbi 0.9.0 and later.
2013-12-19mgcp/rtp: Only patch timestamp alignment errorsJacob Erlbeck7-76/+143
Currently, all timestamps are force to SeqNo*d + C which is more than required by the nanoBTS which seems to be sensitive to alignment errors only (dTS != k*d, d = ptime * rate = 160). This patch replaces the force_constant_timing feature by a force_aligned_timing feature. The timestamp offset will only be changed (and timestamp errors counted) when the alignment does not match to the raster based on ptime (default 20ms). The VTY interface does not change. Sponsored-by: On-Waves ehf
2013-12-19mgcp/test: Use differential output for counters and timestampJacob Erlbeck2-112/+236
Currently the counter and output timestamp values are written out for each packet. This makes it difficult to see in the diffs what has been changed significantly. This patch changes this by showing differences for those values. The absolute input values are also shown now. In addition, the sequence numbers (the difference for the output value) are written, too. Sponsored-by: On-Waves ehf
2013-12-19mgcp/test: Add test cases for constant RTP sequence numberJacob Erlbeck2-5/+49
This adds two test cases: 1. Packet repetition (dSeq=0, dTS=0) 2. Broken seqNo (dSeq=0, dTS=160) The second had been already present in the test cases, but it was a mere copy&paste mistake which turned out to be rather helpful. This patch therefore turns it into a documented test case. Sponsored-by: On-Waves ehf
2013-12-19Add EFR support to TRAU muxer + test caseAndreas Eversberg11-59/+379
Decoding and encoding of FR and EFR TRAU frames are put into seperate functions. CRC check is done to detect bad EFR TRAU frames. The test case includes FR and EFR transcoding. EFR support was tested with Nokia InSite BTS and Siemens BS11.
2013-12-18Fix: Nokia requires VTY's "oml e1" parameters alsoAndreas Eversberg1-1/+1
When writing config file, OML configuration must be written for all E1 based BTS, which includes Nokia *Site BTS.
2013-12-18contrib/rtp: Fix default payload caseJacob Erlbeck1-1/+3
There is the wrong record field selection being used to extract the default value. It returns the tuple offset instead of the value. This patch fixes this. Sponsored-by: On-Waves ehf