Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 1 | |
| 2 | GSM 04.08 7.1.7 / 9.1.7 RR CHANNEL RELESE |
| 3 | |
| 4 | RSL 08.58 3.4 / ? RLL Link Release Request |
| 5 | |
| 6 | RSL 08.58 4.6 / 8.4.5 DEACTivate SACCH |
| 7 | * Deactivate SACCH according to Channel Release Proc 04.08 |
| 8 | * to be sent after RR CHANNEL RELEASE is sent to MS |
| 9 | |
| 10 | RSL 08.58 4.7 / 8.4.14 RF CHANnel RELease |
| 11 | * tells the BTS to release a radio channel |
| 12 | * "when an activated radio channel is no longer needed" |
| 13 | * BTS responds with RF CHANnel RELease ACKnowledge |
| 14 | |
| 15 | |
| 16 | GSM 04.08 3.4.13: RR connection release procedure |
| 17 | |
| 18 | * network sends RR CHANNEL RELEASE to MS on the DCCH |
| 19 | * start T3109 |
| 20 | * deactivate SACCH |
| 21 | * MS disconnects main signalling link (by sending DISC) |
| 22 | * all other data links are disconnected by local end link release |
| 23 | * network receives DISC (BTS sends RLL REL IND to BSC) |
| 24 | * stop T3109 |
| 25 | * start T3111 |
| 26 | * when T3111 times out, the network can reuse the channls |
| 27 | * if T3109 times out, the network deactivates the channels |
| 28 | and can reuse them |
| 29 | * this probably means simply RF CHANnel RELease |
| 30 | |
| 31 | |
| 32 | == Implementation in OpenBSC == |
| 33 | |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 34 | There are two possible reasons a gsm_subscriber_connection |
| 35 | will be released. One is a network failure, the other is |
| 36 | the completion of an operation/transaction. |
Holger Hans Peter Freyther | 4049455 | 2010-06-28 17:09:29 +0800 | [diff] [blame] | 37 | |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 38 | === Failure === |
| 39 | The BSC API will call the gsm_04_08.c:gsm0408_clear_request callback |
| 40 | and the MSC part will release all transactions, operations and such |
| 41 | and the channels will be released as error case. |
| 42 | |
| 43 | === Success === |
| 44 | Every time an 'operation' or 'transaction' is finished msc_release_connection |
| 45 | will be called and it will determine if the gsm_subscriber_connection can |
| 46 | be released. |
| 47 | |
| 48 | In case it can be released bsc_api.c:gsm0808_clear will be called |
| 49 | which will release all lchan's associated with the connection. For the |
| 50 | primary channel a SACH Deactivate will be send with the release |
| 51 | reason NORMAL RELEASE. |
| 52 | |
| 53 | |
| 54 | bsc_api.c:gsm0808_clear |
| 55 | * Release a channel used for handover |
| 56 | * Release the primary lchan with normal release, SACH deactivate |
| 57 | |
| 58 | chan_alloc.c:lchan_release(chan, sach_deactivate, reason) |
| 59 | * Start release procedure. It is working in steps with callbacks |
| 60 | coming from the abis_rsl.c code. |
| 61 | * Release all SAPI's > 0, wait for them to be released |
| 62 | * Send SACH Deactivate on SAPI=0 |
| 63 | * Finally Release the channel |
| 64 | |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 65 | RX of RELease INDication: |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 66 | * Calls internal rsl_handle_release which might release the RF. |
| 67 | * Informs chan_alloc.c about the release with |
| 68 | rsl_lchan_rll_release. |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 69 | |
| 70 | RX of RELease CONFimem: |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 71 | * Calls internal rsl_handle_release which might release the RF. |
| 72 | * Informs chan_alloc.c about the release with |
| 73 | rsl_lchan_rll_release. |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 74 | |
| 75 | * RX of RF_CHAN_REL_ACK |
| 76 | * call lchan_free() |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 77 | |
| 78 | |
| 79 | === Integration with SMS === |
| 80 | |
| 81 | * RX of CP_ERROR or unimplemented MT |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 82 | * trigger trans_free() which will msc_release_connection() |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 83 | |
| 84 | * CP TC1* expired while waiting for CP-ACK |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 85 | * trigger trans_free() which will msc_release_connection() |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 86 | |
| 87 | * RX of RP_ERROR |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 88 | * trigger trans_free() which will msc_release_connection() |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 89 | |
| 90 | * TX of CP-ACK in MT DELIVER |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 91 | * trigger trans_free() which will msc_release_connection() |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 92 | |
| 93 | * RX of CP-ACK in MO SUBMIT |
Holger Hans Peter Freyther | 6262643 | 2010-09-03 15:34:12 +0800 | [diff] [blame] | 94 | * trigger trans_free() which will msc_release_connection() |
Harald Welte | d26d3d9 | 2009-08-10 11:35:33 +0200 | [diff] [blame] | 95 | |