aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc
AgeCommit message (Collapse)AuthorFilesLines
2013-03-13SMPP: Implement SMPP Osmocom Estensions on MO-SMS0.13.0Harald Welte4-6/+111
An ESME can now be configured in the VTY to enable osmocom-extensions, which will add vendor-specific SMPP TLVs for RxLev/RxQual/ARFCN/IMEI and transmit power to the SMPP DELIVER-SM message type.
2013-03-13SMPP: Fix crash on delivery of incoming SUBMIT-SMHarald Welte1-5/+8
As bsc_gsmnet is NULL at the time we call smpp_openbsc_init(), we later run into segfaults with subscribers that don't have a subscr->net set. However, we cannot delay smpp_openbsc_init() until after bsc_bootstrap_network(), as we then fail to parse the SMPP specific VTY/config file options...
2013-03-03vty: Document some previously undocumented parametersHolger Hans Peter Freyther1-2/+4
Katerina pointed out that some nodes are not fully documented and proposed some messages. The token/timeout messages were correct, I have modified the other messages. I removed the full-stop from the PING/PONG documentation as we are normally not using a full sentence.
2013-02-12VTY: backwards compatibility for 'logging level sms'Harald Welte1-0/+14
when the SMS code was moved into libosmocore, its logging prefix was changed from 'sms' to 'lsms', which breaks existing config files. This introduces a deprecated/hidden vty command to make sure those config files are still parsed OK, and will simply print a warning message about the config needing some update.
2013-01-25CC: gsm48_cc_tx_release() must not remove callrefAndreas Eversberg1-2/+0
If after release has been sent, the call control layer waits for: - reception of release complete - or timeout - or release of transaction (due to radio link failure) In this case, an MNCC_REL_CNF is sent to upper layer. The callref must still exist, so the upper layer can handle this confirm.
2013-01-25CC: mncc_release_ind() must send MNCC_REL_CNF in state N19Andreas Eversberg1-0/+2
If transaction is destroyed, but callref still exists, the mncc_release_ind function is called. If the upper layer already sent an MNCC_REL_REQ, the state N19 was entered. In this case it expects an MNCC_REL_CNF.
2013-01-25CC: Be sure to allocate call instance with talloc_zero()Andreas Eversberg1-1/+1
2013-01-24smpp_vty: Ensure to not print 'system-id' in openbsc.cfg if its emptyHarald Welte1-1/+2
... as an empty system-id would render the openbsc.cfg unparseable on next openbsc start.
2013-01-20smpp: Fix a memleak of the SMS on the submit pathHolger Hans Peter Freyther1-1/+2
2013-01-20SMPP: Inform the SMS Queue that a SMS was submitted to kick the queueHolger Hans Peter Freyther1-1/+6
Work on the 'forward' part.. tell the sms queue that something has been submitted for it.. Conflicts: openbsc/src/libmsc/smpp_openbsc.c
2013-01-13sms: Avoid infinite CP-ERROR/CP-ACK loop with sms.Holger Hans Peter Freyther1-0/+12
The issue can be reproduced by typing the following 9 or more times. OpenBSC> subscriber id 2 sms sender id 2 send bla For some unknown reason the phone sends us a CP-ERROR for a transaction identifier we have allocated and used but don't remember. Due the way we use the SMC/SMR we 'establish' the machine and this results in a CP-ACK being sent out. But the CP-ERROR is not having the content we want for an establish so we send out a RP-ERROR. This will result in a CP-ERROR because the phone does not know the transaction... Avoid the issue by checking the direction of the transaction. If we do not know the transaction and it is supposed to be allocated by us then just ignore it and do not create a new transaction.
2013-01-01libmsc: Track and update the location update expiryJan Luebbe2-6/+132
Set the subscriber expiry timeout to twice the duration of the location update period and provide functions subscr_expire() and db_subscriber_expire() to mark subscribers offline that have missed two location update periods. This patch increases the DB revision to 3, so the hlr will be incompatible with prior versions. We should allow 0 for T3212 as well to disable the location update period. In that case we will need a way to indicate that in the database.
2013-01-01misc: Do not use else when using return in the previous branchHolger Hans Peter Freyther1-1/+1
2013-01-01libmsc: Allow to set sender id when sending SMS from the VTYSylvain Munaut3-16/+54
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-01libmsc: Refuse service to anyone not attachedSylvain Munaut1-0/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-29gsm_04_08: Display debug message correctly on DETACH INDICATIONdaniel/channel-ho-wipDaniel Willmann1-3/+5
Log messages would get mangled before if we receive detach by TMSI or IMSI.
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 Freyther1-13/+20
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-25gsm_subscriber: change subscr_bsc_active_subscriber to pluralJan Luebbe1-5/+5
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-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-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-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-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 Welte3-21/+32
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 Welte5-11/+485
2012-11-21sms: Use the DLSMS instead of the DSMS category throughout our codeHolger Hans Peter Freyther4-61/+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 Welte2-1/+5
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
2012-11-16SMPP: More consistent logging / error reportingHarald Welte1-25/+53
2012-11-16SMPP: Implement ALERT NOTIFICATION on attach/detach of subscribersHarald Welte3-2/+78
2012-11-16SMPP: Deal with DCS according to 03.38 and respect TP-PIDHarald Welte1-12/+11
2012-11-16SMPP: Introduce wrapper macro to memset all structures to zeroHarald Welte1-8/+14
For some reason, libsmpp34 is too smart to zero out the entire structure to which it is unpacking. This introduces an ugly wrapper macro to work around. This needs discussion with the libsmpp34 maintainer.
2012-11-16SMPP: Introduce ESME reference coountingHarald Welte4-18/+64
In case a ESME disappears after SUBMIT-SM but before the MT-SMS is delivered (transaction mode), we have to make sure the esme structure still exists.
2012-11-16SMPP: Implement transaction mode for SUBMIT-SMHarald Welte3-1/+78
WARNING: if the ESME disconnects, osmo_esme gets freed, and sms->smpp.esme might point to invalid/unallocated memory!
2012-11-16Initial support of SMPP interface for MT-SMSHarald Welte4-0/+765
2012-11-11sms: Re-order the include files after the separationf OpenBSC and osmocoreHolger Hans Peter Freyther1-3/+5
2012-11-02sms_queue: It is a bad idea to detach a subscriber on failed deliveryHolger Hans Peter Freyther1-13/+0
It is a bad idea to detach a subscriber. The subscriber will not be reachable until the next periodic updating cycle. In case we have too many failed deliveries we will need to reduce the period for the LU and implement a subscriber purging task. This is a preparation for the 29C3 and a problem Jolly experience with his type writer system.
2012-09-19nncc_builtin: send CHAN MODE MODIFY after CALL PROCEEDINGHarald Welte1-6/+6
This is specified in fifugre 7.10c of 3GPP TS 04.08.
2012-09-11misc: Address compiler warning on unused variablesHolger Hans Peter Freyther2-6/+4
abis_nm.c: In function ‘abis_nm_get_attr’: abis_nm.c:1380:11: warning: unused variable ‘cur’ [-Wunused-variable] abis_nm.c: In function ‘ipac_parse_bcch_info’: abis_nm.c:2588:11: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] bts_nokia_site.c:1310:6: warning: variable ‘constructed’ set but not used [-Wunused-but-set-variable] bts_nokia_site.c: At top level: bts_nokia_site.c:1364:12: warning: ‘dump_elements’ defined but not used [-Wunused-function] gsm_04_08.c: In function ‘mm_rx_loc_upd_req’: gsm_04_08.c:521:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] osmo_msc.c: In function ‘msc_ciph_m_compl’: osmo_msc.c:122:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] bts_hsl_femtocell.c: In function ‘hslfemto_bootstrap_om’: bts_hsl_femtocell.c:101:11: warning: variable ‘cur’ set but not used [-Wunused-but-set-variable] bts_hsl_femtocell.c: In function ‘hsl_drop_oml’: bts_hsl_femtocell.c:232:21: warning: variable ‘line’ set but not used [-Wunused-but-set-variable] handover_logic.c: In function ‘ho_chan_activ_ack’: handover_logic.c:197:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
2012-08-17VTY: improve VTY prompt and make sure exit/end works everywhereHarald Welte1-1/+3
Some nodes below 'config' didn't have ournode_exit / ournode_end, and thus were not able to properly perform this function. exit should always only go back one level, while end drops us back to ENABLE_NODE. The prompt now represents the nesting level, and there's one consistent space after the final prompt character (typically #).