aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm_04_08.c
AgeCommit message (Collapse)AuthorFilesLines
2009-06-06gsm_04_08.c: Some spoofing protection against two location updating requestsHolger Freyther1-0/+11
Do not allow two location updating requests on the same lchan. Such an event is certainly spoofed and can confuse the internal logic of the application. Prevent that.
2009-06-06lchan: Handle the abnormal case of channel getting closedHolger Freyther1-0/+25
The abnormal case is that lchan_free ist getting called due a RSL_MT_CHAN_REL_ACK in the RSL but the refcount of this channel is not zero. This means that some "logical operation" is still going on that needs to be cancelled. Instead of always queuing up all operations in the struct gsm_lchan use the signal framework to inform higher layers about this abnormal case. In gsm_04_08.c a signal handler is installed and in the abnormal case the location updating request operation is freed.
2009-06-05print reject cause of MM STATUS messageHarald Welte1-1/+10
2009-06-04[debug] Move subscr_get_by_tmsi below the debug statement (Andreas Eversberg)Holger Freyther1-1/+2
subscr_get_by_tmsi might log as well and then the order of debugging it not as clear as it could be.
2009-06-02[debug] Change DEBUGPC statements to contain \n (Andreas Eversberg)Holger Freyther1-3/+3
Some debug outputs now correctly use end-of-line characters.
2009-06-02[subcriber] Fix the subscriber use counting in gsm_04_08.c (Andreas Eversberg)Holger Freyther1-2/+8
This patch will fix subscriber usage countinig. It may happen, that the subscriber count will not be 0 after releasing of a call. (This problem is solved with the application patch (27), which will replace static call transaction by a dynamic transaction list, and use subscriber for each transaction created.)
2009-05-23With this patch, the TRAU muxing code supports not just bridging only. Harald Welte1-0/+2
A new function trau_recv_lchan() is used to link a channel to a call reference of a transaction. (Transactions are used in later patches.) TRAU frames will then be forwarded to the application with the given call reference (in later patches). Also the application can send TRAU frames by using trau_send_lchan(). A new list is introduced in trau_mux.c. (upqueue_entry) All subslots that must be sent to application are listed here. Received TRAU frames are written in the upqueue of application interface, if a call reference is found in the upqueue-list. If an entry is found the ss_entry list, the TRAU frames are bridged as before. The frames have a message type (msg_type), a call reference (callref) and a trau frame (data). The length of trau frame is defined by the content of the c-bits inside the frame. There is no support for ip.access yet, as they don't use the traditional TRAU frame format. Harald must add this in order to use application interface with ip-access. The bridging with ip-access works as before. (Andreas Eversberg)
2009-05-23Some messages have one or two length-value information elements. The isHarald Welte1-1/+1
no IE type included in the message. These information elements are mandatory, so their actual IE type is known. The improved parse_tlv() function allows to parse zero, one, or two length-value elements. (Andreas Eversberg)
2009-05-23add FIXME comment about the fact that we're paging in the wrong BTSHarald Welte1-0/+3
2009-05-23* rename the timer functions to avoid name collisions with libmisdn.Harald Welte1-2/+2
* the return value of bsc_update_timers() is required for applications to find out if a timer was fired (Andreas Eversberg)
2009-05-01Fix "CM Service Request" parsing for Phase 1 devices. This means MO calls ↵Harald Welte1-6/+12
from phase1 should work now.
2009-05-01add verbose reporting of RR STATUS causeHarald Welte1-1/+46
2009-04-12[subscriber] Introduce subscr_put_channelHolger Freyther1-2/+8
Introduce subscr_put_channel to release a channel and to allow gsm_subscriber.c to hand this channel to any suitable pending requests.
2009-04-12[subscriber] Update the current_bts field on imsi detach and LOC acceptHolger Freyther1-3/+5
When sending LOCATION UPDATING REQUEST Accept or when getting a IMSI Detach update the gsm_bts of the gsm_subscriber.
2009-04-12[calls] Remove a tautology from gsm48_cc_rx_disconnectHolger Freyther1-2/+1
We directly assign the call->state and then check for something that will never be true, and then immediately put the lchan and schedule it's disconnect... and then directly after having closed it down we send a message... Change this to uncondtionally put down the lchan after having changed the last(?) command.
2009-03-10move is_ipaccess_bts() and parse_btstype9) to gsm_data.cHarald Welte1-12/+0
2009-02-28actually request the IMEI not IMEISV, since Phase 1 doesn't have IMEISVHarald Welte1-2/+2
2009-02-28* more RSL and 04.08 constant definesHarald Welte1-2/+14
* initialize some data structures before using them in RSL * DATA_REQ is a transparent message * more elaborate DEBUGP statements here and there * don't call 04.08 with zero-length RSL DATA INDICATION * reject 04.08 CC HOLD and RETRIEVE, as we don't support them yet
2009-02-28make sure all channels in one BTS use the same TSC (training sequence code)Harald Welte1-0/+1
2009-02-22fix paging response parsing for phase1 phones (classmar2 can be less than 4 ↵Harald Welte1-4/+4
bytes in length)
2009-02-22add parsing of IMSI DETACHHarald Welte1-7/+67
2009-02-22PAGING RESPONSE could contain non-TMSI mobile identity such as IMSIHarald Welte1-1/+8
2009-02-22don't allow calls of a subscriber to himselfHarald Welte1-0/+7
2009-02-19implement dynamic TRAU frame mappingHarald Welte1-12/+38
2009-02-18* make sure we use the correct GSM48 encoding typeHarald Welte1-2/+3
* modify the RSL channel mode (BTS) side) after the 04.08 (MS side) has acked MODIFY
2009-02-17in case pagign of the 'B-end' during call setup fails, transmit message toHarald Welte1-1/+1
correct lchan rather than crashing
2009-02-17various CC updates:Harald Welte1-25/+59
* correctly lchan_put the second lchan of a call at teardown * map the RTP streams of ip.access onto each other * fix bug that prevented a CONNECt message to ever reach the 'B' side
2009-02-17CC: send correct messages (too much copy+paste) and better debug printoutHarald Welte1-14/+16
2009-02-17slightly more complete GSM 04.08 CC, we can nowHarald Welte1-33/+114
* initiate phone calls from one MS * look-up the subscriber based on dialled extension * page the called subscriber * send the SETUP to the called subscriber, including CLIP/CLIR * get ALERTING notification back to caller * relay DISCONNECT from either side to the other This is still far from being complete, but it at least works for the most common case
2009-02-16* introduce a callback function when paging completes (I know this is ↵Harald Welte1-6/+172
somewhat of an overlap with the signals, but I think paging always has one reason and thus one caller wants to get notified about completion, including a caller-specific context, etc) * introduce TLV parser definitions for GSM 04.08 * parse and generate BCD number IE's for 04.08 call control
2009-02-16modify the signal handler/dispatch code (sorry zecke, no offense, I just had ↵Harald Welte1-9/+6
some different ideas) * introduce new notion of subsystem in addition to signal number * no need for bitmasks of 'areas' (aka subsystems) * pass subsystem/signal_nr/... per argument rather than by data structure
2009-02-14[paging] Assign the subscriber to the channel first...Holger Freyther1-7/+7
Assign the GSM subscriber to the lchan and then inform the paging layer and dispatch a signal. This makes sure that lchan is updated with the right kind of information.
2009-02-14[signal] Move the area into the struct signal_data...Holger Freyther1-1/+4
Remove the parameter and move the signal kind into the signal struct. Make register/deregister fully symmetric.
2009-02-14[signal] dispatch the paging response...Holger Freyther1-0/+8
Inform people about the successfull paging response and provide access to the subscriber, lchan and bts...
2009-02-11* add more GSM 04.08 IEIsHarald Welte1-22/+75
* implement function for CHANNEL MODE MODIFY * don't use hard-coded SETUP message but construct it with tlv functions
2009-02-09[paging] Cleanup page -> paging in function namesHolger Freyther1-1/+1
2009-02-09fix compiler warning about undeclared function by adding include fileHarald Welte1-0/+1
2009-02-06[rr] Send a Channel Release before deactivating the channelHolger Freyther1-0/+20
After auto releasing a channel the next paging request will not be immediately answered. The hypothesis was that we do not release the channel properly. Implementing Channel Release of GSM 04.08 should have fixed it, but it didn't. According to the wireshark dissectors the message is correct though. - Add the RR cause values to gsm_04_08. - Implement the Channel Release message - Invoke the release channel function before deallocating the lchan.
2009-02-06stop paging a particular subscriber after we have received a PAGING RESPONSEHarald Welte1-0/+1
2009-02-06implement parsing of PAGING RESPONSEHarald Welte1-3/+40
2009-02-03cosmetic fixes / more commentsHarald Welte1-8/+8
2009-01-10If there is already a subscriber and it does not equal to us -> moanHarald Welte1-0/+5
And unreference the gsm_subscriber object otherwise we would leak.
2009-01-10Make mi_to_string parse the TMSI we generate, finish CM Service Request ↵Harald Welte1-10/+27
implementation The TMSI encoding is up to us but generate_mid_from_tmsi and mi_to_string did not agree on the encoding. Adjust mi_to_string to properly decode the TMSI generated by generate_mid_from_tmsi. Check that the four bits are '1111' and that the length is five. Memcpy the bytes to tmsi (to work with ARM or such) and convert the number to host order... Implement the CM Service Request. Try to get the subscriber from the TMSI and assign it to the gsm_lchan. There is a small issue that will be fixed in the next commit. (done by z.)
2009-01-10Start working on CM Service RequestHarald Welte1-5/+51
Be able to send Accept/Reject the Service Request. Use mi_string instead of the the msgb buffer (even if it is memsetted and such)... The TMSI allocation seems to be a bit problematic and needs some further checking. The rough idea is that we try to find the subscriber for a CM Service Request and then decide based on the subscriber if we want to handle the call.
2009-01-09Use use_lchan/put_lchan for call handling to keep the channel upHarald Welte1-1/+6
Increase when the refcount of the lchan when we initiate a call, get a SETUP message and put it when we want to release the call... Once we have proper Q.931 support the use/put needs to be improved, e.g. we currently do not allow to hangup from the network, and it will ring until the end of time...
2009-01-06Handle TMSI reallocation complete by printing the subscriberHarald Welte1-1/+6
It looks like that certain phones that send their old TMSI from a different network and we assign them a new one with LOCATION UPDATING ACCEPT will send us a TMSI Reallocation Complete. Print out the the imsi.
2009-01-04Make gcc happy and remove a couple of warningsHolger Freyther1-41/+10
Remove the callbacks from gsm_network for now. A set of different callbacks will be back. E.g. when the paging is completed, when the Q.931 like call handling is there... Remove var's or move them into #if 0, remove unused stuff that looks like we do not need it anytime soon or #if 0 them, move stuff around.
2009-01-04Make gsm48_sendmsg public as wellHolger Freyther1-1/+1
2009-01-04Make gsm48_msgb_alloc public and usable for the telnet_interfaceHolger Freyther1-1/+1
2009-01-01Do not call rsl_chan_release directly but use the use_count of the lchanHolger Freyther1-2/+2
Call use_lchan early in allocate_loc_updating_req, do not directly call rsl_chan_release but go through channel alloc to take the use_count into account.