aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
AgeCommit message (Collapse)AuthorFilesLines
2012-12-26libmsc: One of assign_compl and assign_fail will always be calledHolger Hans Peter Freyther1-12/+0
Remove the log messages and comments as they are wrong for now. Even for the mode modify we will get the assign complete call.
2012-12-26handover: Fix the handover signalling for IP based BTSesHolger Hans Peter Freyther3-39/+33
This was reported by Kevin when he was testing handover. The problem is the order of the signal handlers for S_ABISIP_CRCX_ACK. Right now the handover signal handler is called before the one inside the libmsc gsm_04_08.c. This means S_HANDOVER_ACK is signalled _before_ there is a rtp socket created for the channel. The result is that the MDCX will never be sent and the called will not be properly switched _after_ the handover detection. I do not want to play with the order of signal handlers, remove the CRCX ack handling from the handover_logic.c and force the NITB (and later the BSC) to check if the lchan is involved with a handover and do the switching in there. This means right now we do what two signal handlers did in one. Reproduced and tested with the FakeBTS Handover test. Log message: <0004> abis_rsl.c:1954 (bts=1,trx=0,ts=3,ss=0) IPAC_CRCX_ACK ... <000c> gsm_04_08.c:1400 no RTP socket for new_lchan <001a> rtp_proxy.c:533 rtp_socket_create(): success <001a> rtp_proxy.c:615 rtp_socket_bind(rs=0x48703c8, IP=0.0.0.0): ...
2012-12-26gsm: Do not attempt to release SAPI=0 if it was never allocatedHolger Hans Peter Freyther2-0/+24
In case of handover (but probably on RACH) we would send a RLL for SAPI=0 even if this SAPI was never established. After we have released all SAPI>0 locally check that SAPI=0 is established and if not release the rf channel directly.
2012-12-26libbsc: Fix DL QUAL decoding from measurement reportsSylvain Munaut1-2/+2
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-25gsm_subscriber: change subscr_bsc_active_subscriber to pluralJan Luebbe2-10/+10
This was requested by Holger Freyther <zecke@selfish.org>.
2012-12-25nitb: Add a VTY command to initiate a handover to another BTSHolger Hans Peter Freyther1-0/+53
2012-12-23lchan: Introduce T3109 handling for the release procedureHolger Hans Peter Freyther4-18/+54
T3109 is started when the SACCH is deactivated. It is stopped when the phones sends the DISC/UA/UM on LAPDm for the main signalling link. In case of timeout the abnormal release procedure will be initiated. Make sure to not issue the SACCH Deactivate twice to avoid confusing the equipment. This is still not fully spec compliant. In case of a timeout the abnormal release handling will be started which involves starting T3111+2. The error handling should be split out of the rf channel release method, e.g. lchan_release should be called and check if the channel release was already initiated.
2012-12-23lchan: Introduce a BROKEN state for the lchanHolger Hans Peter Freyther2-4/+4
If the CHAN ACTIV is NACKED we set the state backto NONE. This is problematic as our channel allocator will allocate from the front or from the back and if the channel is early in the list it might cause permanent failures. Introduce a BROKEN state and use it when the channel activation is failing for an unknown reason. Copy the cause so it can be inspected later.
2012-12-23lchan: Document the behavior/quirks for abnormal channel releaseHolger Hans Peter Freyther1-5/+29
Deactivate the SACCH and release all SAPIs locally as of GSM 04.08. Add documentation to the code and explain what will happen as part of the release process.
2012-12-23lchan: Release the lchan more quickly, align with GSM 04.08Holger Hans Peter Freyther2-49/+42
* Release all channels with SAPI > 0 with the "local end release" (as of NOTE 1 of GSM 04.08). * No need to wait for all SAPIs to be torn down and the normal REL_IND/REL_CONF will call rsl_handle_release and the channel should be released. * Update the documentation
2012-12-23lchan: Release all higher sapis on the local end.Holger Hans Peter Freyther1-1/+1
According to GSM 04.08 3.4.13.1.1 RR connection release in NOTE 1 one should release all non main signaling links using the local end link release.
2012-12-23rsl: Cosmetic changes to the release codeHolger Hans Peter Freyther1-8/+12
Put the idiom that sets the lchan state to none and respecting the error state into a shared method. This way the special handling for the abnormal case is just in one place.
2012-12-23rsl: Call the release function with the enum name and not the numberHolger Hans Peter Freyther2-11/+11
Done with the semantic patch: @rule1@ expression E; expression F; @@ - lchan_release(E, F, 1); + lchan_release(E, F, RSL_REL_LOCAL_END); @rule2@ expression E; expression F; @@ - lchan_release(E, F, 0); + lchan_release(E, F, RSL_REL_NORMAL);
2012-12-23rsl: Rename the reason to release_mode and use the enum valueHolger Hans Peter Freyther2-5/+6
The API with 0 and 1 as legal values is hard to understand. Use the recently introduced enum values instead.
2012-12-23rsl: Use LOGL_ERROR instead of LOGL_NOTICE act/deact timeoutsHolger Hans Peter Freyther1-2/+2
It is a grave error when the BTS does not respond to the ACT/DEACT requests, use LOGL_ERROR for such conditions.
2012-12-22paging: Do not page when there is no OML linkHolger Hans Peter Freyther1-0/+4
Avoid printing error messages when paging while the BTS is down. In case a BTS is going down it is best to just let the timers expire normally. We can not expire them right away as multiple BTS could be paged and we do not want to interfere with that. There is no need to stop the queue right now.
2012-12-22libmsc: Avoid a crash on lchan release during call controlHolger Hans Peter Freyther1-5/+16
If subscriber A is calling B and has sent a CC Setup message we will allocate the MO and MT transaction and link them together. When the BTS or the lchan is failing the BSC API will send a clear request, as part of the clear request all pending transactions will be released. As part of taking down the transaction, the remote leg will be informed and will send a MNCC_REL_REQ. This results in a call to trans_free. The llist_for_each_entry_safe does not handle removing other elements from the list and we would segfault. One way to fix this is to move the transaction list into the subscriber connection. This might require to create the subscriber connection for MT handling earlier. Otherwise one could have one transaction list inside the subscriber connection and a global list for MT- transactions.
2012-12-22libmsc: Set trans->subscr = NULL after we release itHolger Hans Peter Freyther1-1/+3
This is a cosmetic change and should happen to find use after free of the subscriber.
2012-12-19abis: Activate the newest available installed on the BTSHolger Hans Peter Freyther1-5/+24
Select thew newest software from all available file versions.
2012-12-19abis: Create a routine that can parse all SW Descriptions of a SW ConfigHolger Hans Peter Freyther1-32/+55
Be able to parse the entire SW Config IE. Parse the SW Descruption into a struct provided by the caller.
2012-12-19misc: Fix compilation now that the method is located in libosmocoreHolger Hans Peter Freyther1-7/+0
These TLV helper functions are now located in libosmocore.
2012-12-16nitb: Do not crash on IMSI Detach messages from a phoneHolger Hans Peter Freyther1-1/+0
This has been reported and analyzed by Tobias Engel. The IMSI Detach is dispatched as part of the complete layer3 message. I had patched the code to release the anchor and call msc_release_connection to release the connection as fast as possible (otherwise the anchor would trigger in a couple of seconds). With commit 70ae5d3000edd12aee38497a6f541595a8c7dee8 I made this more generic to release the connection immediately if there are no operations, no transaction and no silent call. This leads to the subscriber connection being released twice and eventually causing a segfault. Remove the msc_release_connection invocation from the IMSI Detach code as the connection will be taken down by the BSC API. This has been tested using the FakeBTS and an IMSI Detach message. The channel is released immediately and the nitb does not crash.
2012-12-16mgcp: Allow to freely control the a=fmtp line for experimentsHolger Hans Peter Freyther2-2/+45
In case of AMR one can specify the available codecs out-of-band. Allow to configure this line statically in the configuration file.
2012-12-16mgcp: Fix the vary large jump detection in the codeHolger Hans Peter Freyther1-1/+1
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-10mgcp: Test and implement re-transmission handlingHolger Hans Peter Freyther1-161/+161
MGCP is used over UDP and a response might be lost. The MGCP RFC asks for keeping a list of responses and then using the previous response to answer a duplicate request. I tried to conserve memory and just wanted to remember the last transaction identifier and result-code and re-generate the result from that. This made the code look bad and this is why the entire response will now be stored. It sadly increases the memory usage but can not be avoided at this time. Remove the msg->l3h pointer for the RQNT callback as strtok has modified the content of it.
2012-12-10mgcp: Change the flow of the code when handling a MGCP responseHolger Hans Peter Freyther1-11/+14
Attempt to detect a response and return only then. Remove one level of tabls in preparation for the re-transmission handling.
2012-12-10mgcp: Methods generating a response now include the endpoint pointerHolger Hans Peter Freyther1-37/+35
This is required for remembering the last result in a central place and is required to properly implement detection of re-transmissions.
2012-12-10mgcp: Fix a typo.. it is msg and not mgsHolger Hans Peter Freyther1-1/+1
2012-12-10mgcp: We do not need to check for talloc_freeHolger Hans Peter Freyther1-8/+4
Simplify the code and remove null check for the two strings.
2012-12-10bsc: Fix compiler warning and return from the method with a value.Holger Hans Peter Freyther1-2/+3
2012-12-03bsc: Send the USSD message after the location updating accept.Holger Hans Peter Freyther2-9/+20
Make sure to accept the phone first before sending the USSD message.
2012-12-03msc: Add debug messages when not sending a USSD welcome messageHolger Hans Peter Freyther1-1/+8
2012-12-03bsc: Fix a brown paper bug and most likely fix the USSD welcome issueHolger Hans Peter Freyther1-1/+1
2012-12-03bsc: Call the variable with a more appropriate name.Holger Hans Peter Freyther1-4/+4
2012-12-01sms: Kill the linkid as we are using SAPI=3 all the timeHolger Hans Peter Freyther1-5/+3
For GSM (not GPRS) we will never use a SAPI!=3. Simplify the code and remove the link_id=0.
2012-12-01sms: Replaced the SMR process by new implementation in libosmocoreAndreas Eversberg1-85/+98
Rebased, tested and fixed by Holger Freyther. Release the transaction only once the SMC is asking for the release and set the cb's to NULL to catch a use after free early.
2012-12-01sms: Replaced the SMC process by new implementation in libosmocoreAndreas Eversberg1-168/+110
This has been rebased and fixed by Holger Freyther. The change of the debug area was split out in a previous commit and the is_mt was put back into the transaction code. The transaction is now freed from the RELEASE_REQ sent by the SMC layer and not inside the error path. When clearing the SMC instance we also clear the callbacks.
2012-12-01sms: Remove the susbcr_put_lchan logic from the SMS codeHolger Hans Peter Freyther1-22/+0
This should and does happen as part of the trans_free/msc_release_connection code. There is no easy way to determine that the lchan is now 'free' for other things.. Let the transaction code sort this out. This code just needs to make sure that transactions are always freed.
2012-12-01nitb: Release the channel if there is nothing on itHolger Hans Peter Freyther2-5/+20
This is more a work around and one still needs to implement a proper dispatch on the opening of the connection. If there is no operation left, no transaction and no silent call, close down the channel.
2012-11-29mgcp: Begin handling of the RQNT message as needed for DTMFHolger Hans Peter Freyther1-11/+47
Introduce a callback for the request and forward the signalrequest to the callback. This is not a full implementation of MGCP RQNT.
2012-11-24use DLSMS and not DSMS in SMPP related code (merge with master)Harald Welte1-8/+8
2012-11-24SMPP: fix handling of UDH / multi-part for 7-bit messagesHarald Welte1-14/+47
... I would have never believed it is such a broken mindfuck.
2012-11-24SMPP: add small utility program 'smpp_mirror'Harald Welte5-21/+356
This program binds as ESME transceiver to a SMSC and simply mirrors back all SMS that it receives.
2012-11-24SMPP: Implement support for MO SMSHarald Welte5-124/+577
Each ESME can have a number of prefix-matching routes, or it can be a 'default route' to whcih all otherwise unknown SMS destinations are routed.
2012-11-24SMPP: VTY configuration of SMPP code, authentication supportHarald Welte7-15/+503
2012-11-21sms: Use the DLSMS instead of the DSMS category throughout our codeHolger Hans Peter Freyther6-73/+61
2012-11-21sms: Use the definitions from the libosmogsmHolger Hans Peter Freyther1-227/+5
Use the code that is shipped inside the libosmogsm library. Right now the signature (besides the static) and the implementation is the same. This makes using the libosmogsm SMC code more easy in the near future. For the gsm340_gen_oa we are now using a small wrapper to generate the proper type and numbering plan.
2012-11-16SMPP: build the smpp interface only in case of ./configure --enable-smppHarald Welte3-3/+7
2012-11-16SMPP: fix subscriber reference leak.Harald Welte1-1/+1
subscr_get_by_* is already increasing the refcount, we shouldn't do that a second time (thanks, Holger).
2012-11-16SMPP: More logging in error cases, fix UDH in 7bit ASCIIHarald Welte1-1/+17