blob: e2caa48758b4605625c8fc73da2d704fb61f6d0a [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
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200132 ms rbox mgwep [label="When the MS or BTS release the lchan"];
133 lchan abox lchan [label="LCHAN_ST_\nESTABLISHED"];
134 ms -> lchan [label="RLL Release Ind for SAPI=0"];
135 lchan abox lchan [label="LCHAN_ST_WAIT_RLL_RTP_RELEASED"];
136 lchan rbox lchan [label="Continue at 'common release' below"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200137 ...;
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200138 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200139 ms rbox mgwep [label="When the BSC decides to release the lchan"];
140 lchan box lchan [label="lchan_release()"];
141 lchan abox lchan [label="LCHAN_ST_WAIT_RLL_RTP_RELEASED"];
142 ms <= lchan [label="RR Release"];
143 lchan rbox lchan [label="common release"];
144 --- [label="IF RTP FSM present"];
145 lchan -> rtp [label="LCHAN_RTP_EV_RELEASE"];
146 --- [label="END: RTP FSM present"];
147 ms <= lchan [label="RSL Deactivate SACCH"];
148 ms <= lchan [label="RSL Release Request (Local End)",ID="for each SAPI except [0]"];
149 lchan note lchan [label="for ms->nokia.no_loc_rel_cnf we do not expect Release Confirm
150 messages and immediately mark all SAPIs as released"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200151
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200152 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200153 lchan <- rtp [label="LCHAN_EV_RTP_RELEASED"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200154 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200155 ms => lchan [label="RLL Release Confirm",ID="for each SAPI except [0]"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200156 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200157 lchan box lchan [label="Stay in\nLCHAN_ST_WAIT_\nRLL_RTP_RELEASED\nuntil only SAPI[0] remains active"];
158 lchan abox lchan [label="LCHAN_ST_WAIT_\nBEFORE_RF_RELEASE\nT3111"];
159 ...;
160 lchan box lchan [label="T3111 expires"];
161 lchan box lchan [label="lchan_fsm_pre_rf_release()"];
162 lchan abox lchan [label="LCHAN_ST_WAIT_\nRF_RELEASE_ACK\nT3111"];
163 ms <= lchan [label="RSL RF Channel Release"];
164 ...;
165 lchan rbox lchan [label="On timeout, continue at: 'On any error', 'unrecoverable'"];
166 ...;
167 ms => lchan [label="RSL RF Channel Release Ack"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200168 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200169 --- [label="IF release_in_error"];
170 lchan abox lchan [label="LCHAN_ST_WAIT_\nAFTER_ERROR\n(timeout: T3111+2 s, T993111)"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200171 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200172 lchan box lchan [label="timer expires"];
173 --- [label="END: release_in_error"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200174 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200175 lchan abox lchan [label="LCHAN_ST_UNUSED"];
176 ts <- lchan [label="TS_EV_LCHAN_UNUSED"];
177 |||;
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200178 |||;
179 |||;
180
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200181 ms rbox mgwep [label="On any error"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200182 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200183 --- [label="IF FOR_MS_CHANNEL_REQUEST"];
184 ms <= lchan [label="RR Immediate Assign Reject"];
185 --- [label="ELSE: FOR_ASSIGNMENT"];
186 lchan rbox lchan [label="dispatch\nASSIGNMENT_EV_\nLCHAN_ERROR\n(see Assignment FSM diagrams)"];
187 --- [label="ELSE: FOR_HANDOVER"];
188 lchan rbox lchan [label="dispatch\nHO_EV_LCHAN_ERROR\n(see Handover FSM diagrams)"];
189 --- [label="END"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200190 |||;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200191 --- [label="IF fi_rtp present"];
192 lchan -> rtp [label="LCHAN_RTP_EV_ROLLBACK"];
193 rtp rbox rtp [label="If to-BTS is not established yet, ROLLBACK is synonymous to LCHAN_RTP_EV_RELEASE"];
194 rtp rbox rtp [label="If there is no old_lchan, just DLCX instead"];
195 rtp abox rtp [label="LCHAN_RTP_ST_ROLLBACK"];
196 rtp box rtp [label="connect_mgw_endpoint_to_lchan()\nusing old_lchan"];
197 rtp -> mgwep [label="MDCX to-BTS"];
198 mgwep rbox mgwep [label="MGCP: MDCX"];
199 ...;
200 mgwep rbox mgwep [label="MGCP: MDCX OK"];
201 rtp <- mgwep [label="LCHAN_RTP_EV_MGW_ENDPOINT_CONFIGURED"];
202 rtp abox rtp [label="terminate"];
203 lchan <- rtp [label="LCHAN_EV_RTP_RELEASED"];
204 --- [label="END: fi_rtp present"];
205 |||;
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200206 |||;
207 --- [label="IF unrecoverable error"];
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200208 lchan abox lchan [label="LCHAN_ST_BORKEN"];
209 ms note lchan [label="The broken state usually stays around
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200210 until the BTS disconnects."];
211 ...;
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200212 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 +0200213 'repair' the lchan so that it is usable again."];
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +0200214 ms -> lchan [label="RF Chan Release ACK"];
215 lchan rbox lchan [label="continue above at\nLCHAN_ST_WAIT_\nAFTER_ERROR"];
Neels Hofmeyr44fcc9f2018-05-28 14:29:49 +0200216}