blob: b0e32d684dfb930fba58c04e5ea72658fe33ec50 [file] [log] [blame]
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +02001msc {
2 hscale=2;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +02003 ms [label="MS/BTS"], ts [label="BSC timeslot FSM"],
4 lchan[label="BSC lchan FSM"], rtp[label="BSC lchan RTP FSM"],mgwep[label="BSC MGW endpoint FSM"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +02005
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +02006 ms box mgwep [label="lchan allocation sequence"];
7 lchan abox lchan [label="LCHAN_ST_UNUSED"];
8 ...;
9 lchan rbox lchan [label="lchan_activate(activate_info)"];
10 lchan note lchan [label="Dispatching event to make sure the lchan FSM permits activation."];
11 lchan -> lchan [label="LCHAN_EV_ACTIVATE\ndata = activate_info"];
12 lchan abox lchan [label="LCHAN_ST_\nWAIT_TS_READY"];
13 ts <- lchan [label="TS_EV_LCHAN_REQUESTED"];
14 ts rbox ts [label="Most details omitted. See timeslot FSM diagrams."];
15 ts note ts [label="A dyn TS may be in PDCH mode and will asynchronously switch off PDCH first. A
16 non-dynamic TS is ready immediately."];
17 |||;
18 --- [label="IF requires_voice_stream"];
19 lchan -> rtp [label="lchan_rtp_fsm_start()"];
20 rtp abox rtp [label="allocate\n LCHAN_RTP_ST_\nWAIT_MGW_ENDPOINT_\nAVAILABLE"];
21 --- [label="IF no endpoint-CI yet"];
22 rtp box rtp [label="gscon_ensure_mgw_endpoint()"];
23 rtp -> mgwep [label="mgw_endpoint_ci_add(to-BTS)"];
24 rtp -> mgwep [label="CRCX to-BTS"];
25 mgwep rbox mgwep [label="MGCP: CRCX"];
26 ...;
27 mgwep rbox mgwep [label="MGCP: CRCX OK"];
28 rtp <- mgwep [label="LCHAN_RTP_EV_MGW_ENDPOINT_AVAILABLE"];
29 rtp note mgwep [label="The CRCX OK has assigned us a new endpoint CI number"];
30 rtp abox rtp [label="LCHAN_RTP_ST_WAIT_LCHAN_READY"];
31 --- [label="END: no endpoint-CI yet"];
32 --- [label="END: requires_voice_stream"];
33 |||;
34 ...;
35 ts -> lchan [label="LCHAN_EV_TS_READY"];
36 lchan abox lchan [label="LCHAN_ST_\nWAIT_ACTIV_ACK"];
37 --- [label="IF FOR_MS_CHANNEL_REQUEST"];
38 ms <= lchan [label="RSL Chan Activ (RSL_ACT_INTRA_IMM_ASS)"];
39 --- [label="ELSE: FOR_ASSIGNMENT"];
40 ms <= lchan [label="RSL Chan Activ (RSL_ACT_INTRA_NORM_ASS)"];
41 --- [label="ELSE: FOR_HANDOVER"];
42 ms <= lchan [label="RSL Chan Activ (RSL_ACT_INTER_ASYNC)"];
43 --- [label="END"];
44 ...;
45 ms rbox lchan [label="On timeout or Chan Activ NACK, see: 'On any error', 'unrecoverable'"];
46 ...;
47 ms => lchan [label="RSL Chan Activ ACK"];
48 lchan box lchan [label="lchan_fsm_post_activ_ack()"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +020049
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +020050 --- [label="IF FOR_MS_CHANNEL_REQUEST"];
51 ms <= lchan [label="RR Immediate Assignment"];
52 --- [label="ELSE: FOR_ASSIGNMENT"];
53 lchan rbox lchan [label="dispatch\nASSIGNMENT_EV_\nLCHAN_ACTIVE\n(see Assignment FSM diagrams)"];
54 ms <= lchan [label="RR Assignment Command"];
55 --- [label="ELSE: FOR_HANDOVER"];
56 lchan rbox lchan [label="dispatch\nHO_EV_LCHAN_ACTIVE\n(see Handover FSM diagrams)"];
57 --- [label="END"];
58
59
60 lchan abox lchan [label="LCHAN_ST_WAIT_\nRLL_RTP_ESTABLISH\nT3101"];
61 |||;
62 |||;
63 --- [label="IF requires_voice_stream"];
64 lchan -> rtp [label="LCHAN_RTP_EV_LCHAN_READY"];
65 |||;
66 --- [label="IF ip.access style BTS"];
67 rtp abox rtp [label="LCHAN_RTP_ST_WAIT_IPACC_CRCX_ACK"];
68 ms <= rtp [label="IPACC CRCX"];
69 ...;
70 ms => rtp [label="IPACC CRCX ACK (BTS RTP port info)"];
71 rtp abox rtp [label="LCHAN_RTP_ST_WAIT_IPACC_MDCX_ACK"];
72 ms <= rtp [label="IPACC MDCX (MGW RTP port info)"];
73 ...;
74 ms => rtp [label="IPACC MDCX ACK"];
75 --- [label="END ip.access style BTS"];
76 |||;
77 rtp box rtp [label="lchan_rtp_fsm_switch_rtp()"];
78 |||;
79 --- [label="IF wait_before_switching_rtp"];
80 rtp note rtp [label="During Handover, wait for HO DETECT before redirecting an existing endpoint
81 CI towards the new lchan."];
82 rtp abox rtp [label="LCHAN_RTP_ST_WAIT_READY_TO_SWITCH_RTP"];
83 ...;
84 ms => rtp [label="HO DETECT (via Handover FSM)"];
85 --- [label="END: wait_before_switching_rtp"];
86 |||;
87 rtp abox rtp [label="LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_CONFIGURED"];
88 rtp box rtp [label="connect_mgw_endpoint_to_lchan()"];
89 rtp -> mgwep [label="MDCX to-BTS"];
90 mgwep rbox mgwep [label="MGCP: MDCX"];
91 ...;
92 mgwep rbox mgwep [label="MGCP: MDCX OK"];
93 rtp <- mgwep [label="LCHAN_RTP_EV_MGW_ENDPOINT_CONFIGURED"];
94 rtp abox rtp [label="LCHAN_RTP_ST_READY"];
95 lchan <- rtp [label="LCHAN_EV_RTP_READY"];
96 rtp note rtp [label="RTP FSM stays ready for Rollback until final establish event"];
97 ...;
98 lchan -> rtp [label="LCHAN_RTP_EV_ESTABLISHED\nvia gscon_change_primary_lchan()"];
99 rtp abox rtp [label="LCHAN_RTP_ST_\nESTABLISHED"];
100 --- [label="END: requires_voice_stream"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200101 |||;
102 |||;
103
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200104 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200105 ms => lchan [label="RLL Establish Ind"];
106 lchan abox lchan [label="LCHAN_ST_\nESTABLISHED"];
107 lchan box lchan [label="lchan_on_fully_established()"];
108 --- [label="IF FOR_MS_CHANNEL_REQUEST"];
109 ms note lchan [label="No action required. The MS will have sent an L3 message in the RLL
110 Establish Ind and is then free to dispatch DTAP."];
111 --- [label="ELSE: FOR_ASSIGNMENT"];
112 lchan rbox lchan [label="dispatch\nASSIGNMENT_EV_\nLCHAN_ESTABLISHED\n(see Assignment FSM diagrams)"];
113 --- [label="ELSE: FOR_HANDOVER"];
114 lchan rbox lchan [label="dispatch\nHO_EV_LCHAN_ESTABLISHED\n(see Handover FSM diagrams)"];
115 --- [label="END"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200116 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200117 --- [label="IF requires_voice_stream"];
118 lchan rbox lchan [label="Assignment or Handover FSM:"];
119 lchan -> mgwep [label="CRCX/MDCX to-MSC"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200120 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200121 lchan <- mgwep [label="OK"];
122 lchan box lchan [label="gscon_change_primary_lchan()"];
123 lchan -> rtp [label="LCHAN_RTP_EV_ESTABLISHED"];
124 rtp abox rtp [label="LCHAN_RTP_ST_\nESTABLISHED"];
125 rtp box rtp [label="Forget any Rollback info"];
126 --- [label="END: requires_voice_stream"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200127
128 ...;
129 ...;
130 ...;
131
Philipp Maier92eed412020-08-21 20:47:49 +0200132 ms rbox mgwep [label="On Mode Modify (e.g. change a TCH lchan from signalling to voice)"];
133 lchan abox lchan [label="LCHAN_ST_\nWAIT_RR_CHAN_\nMODE_MODIFY_ACK"];
134 ms <= lchan [label="RR Chan Mode Modif"];
135 ...;
136 ms => lchan [label="RR Chan Mode Modif Ack"];
137 lchan abox lchan [label="LCHAN_ST_\nWAIT_RSL_CHAN_\nMODE_MODIFY_ACK"];
138 ms <= lchan [label="RSL MT Mode Modify Req"];
139 ...;
140 ms => lchan [label="RSL MT Mode Modify Ack"];
141 --- [label="IF adding RTP stream"];
142 lchan abox lchan [label="LCHAN_ST_WAIT_\nRLL_RTP_ESTABLISH\nT3101"];
143 lchan rbox rtp [label="See above at 'LCHAN_RTP_EV_LCHAN_READY'"];
144 --- [label="IF not adding RTP stream"];
145 lchan abox lchan [label="LCHAN_ST_\nESTABLISHED"];
146 --- [label="END: whether adding voice stream"];
147
148 ...;
149 ...;
150 ...;
151
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200152 ms rbox mgwep [label="When the MS or BTS release the lchan"];
153 lchan abox lchan [label="LCHAN_ST_\nESTABLISHED"];
154 ms -> lchan [label="RLL Release Ind for SAPI=0"];
155 lchan abox lchan [label="LCHAN_ST_WAIT_RLL_RTP_RELEASED"];
156 lchan rbox lchan [label="Continue at 'common release' below"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200157 ...;
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200158 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200159 ms rbox mgwep [label="When the BSC decides to release the lchan"];
160 lchan box lchan [label="lchan_release()"];
161 lchan abox lchan [label="LCHAN_ST_WAIT_RLL_RTP_RELEASED"];
162 ms <= lchan [label="RR Release"];
163 lchan rbox lchan [label="common release"];
164 --- [label="IF RTP FSM present"];
165 lchan -> rtp [label="LCHAN_RTP_EV_RELEASE"];
166 --- [label="END: RTP FSM present"];
167 ms <= lchan [label="RSL Deactivate SACCH"];
168 ms <= lchan [label="RSL Release Request (Local End)",ID="for each SAPI except [0]"];
169 lchan note lchan [label="for ms->nokia.no_loc_rel_cnf we do not expect Release Confirm
170 messages and immediately mark all SAPIs as released"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200171
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200172 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200173 lchan <- rtp [label="LCHAN_EV_RTP_RELEASED"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200174 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200175 ms => lchan [label="RLL Release Confirm",ID="for each SAPI except [0]"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200176 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200177 lchan box lchan [label="Stay in\nLCHAN_ST_WAIT_\nRLL_RTP_RELEASED\nuntil only SAPI[0] remains active"];
178 lchan abox lchan [label="LCHAN_ST_WAIT_\nBEFORE_RF_RELEASE\nT3111"];
179 ...;
180 lchan box lchan [label="T3111 expires"];
181 lchan box lchan [label="lchan_fsm_pre_rf_release()"];
182 lchan abox lchan [label="LCHAN_ST_WAIT_\nRF_RELEASE_ACK\nT3111"];
183 ms <= lchan [label="RSL RF Channel Release"];
184 ...;
185 lchan rbox lchan [label="On timeout, continue at: 'On any error', 'unrecoverable'"];
186 ...;
187 ms => lchan [label="RSL RF Channel Release Ack"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200188 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200189 --- [label="IF release_in_error"];
190 lchan abox lchan [label="LCHAN_ST_WAIT_\nAFTER_ERROR\n(timeout: T3111+2 s, T993111)"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200191 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200192 lchan box lchan [label="timer expires"];
193 --- [label="END: release_in_error"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200194 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200195 lchan abox lchan [label="LCHAN_ST_UNUSED"];
196 ts <- lchan [label="TS_EV_LCHAN_UNUSED"];
197 |||;
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200198 |||;
199 |||;
200
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200201 ms rbox mgwep [label="On any error"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200202 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200203 --- [label="IF FOR_MS_CHANNEL_REQUEST"];
204 ms <= lchan [label="RR Immediate Assign Reject"];
205 --- [label="ELSE: FOR_ASSIGNMENT"];
206 lchan rbox lchan [label="dispatch\nASSIGNMENT_EV_\nLCHAN_ERROR\n(see Assignment FSM diagrams)"];
207 --- [label="ELSE: FOR_HANDOVER"];
208 lchan rbox lchan [label="dispatch\nHO_EV_LCHAN_ERROR\n(see Handover FSM diagrams)"];
209 --- [label="END"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200210 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200211 --- [label="IF fi_rtp present"];
212 lchan -> rtp [label="LCHAN_RTP_EV_ROLLBACK"];
213 rtp rbox rtp [label="If to-BTS is not established yet, ROLLBACK is synonymous to LCHAN_RTP_EV_RELEASE"];
214 rtp rbox rtp [label="If there is no old_lchan, just DLCX instead"];
215 rtp abox rtp [label="LCHAN_RTP_ST_ROLLBACK"];
216 rtp box rtp [label="connect_mgw_endpoint_to_lchan()\nusing old_lchan"];
217 rtp -> mgwep [label="MDCX to-BTS"];
218 mgwep rbox mgwep [label="MGCP: MDCX"];
219 ...;
220 mgwep rbox mgwep [label="MGCP: MDCX OK"];
221 rtp <- mgwep [label="LCHAN_RTP_EV_MGW_ENDPOINT_CONFIGURED"];
222 rtp abox rtp [label="terminate"];
223 lchan <- rtp [label="LCHAN_EV_RTP_RELEASED"];
224 --- [label="END: fi_rtp present"];
225 |||;
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200226 |||;
227 --- [label="IF unrecoverable error"];
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200228 lchan abox lchan [label="LCHAN_ST_BORKEN"];
229 ms note lchan [label="The broken state usually stays around
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200230 until the BTS disconnects."];
231 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200232 ms note lchan [label="If an ACK comes in late, for specific BTS models, we may choose to
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200233 'repair' the lchan so that it is usable again."];
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200234 ms -> lchan [label="RF Chan Release ACK"];
235 lchan rbox lchan [label="continue above at\nLCHAN_ST_WAIT_\nAFTER_ERROR"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200236}