blob: 7084d1d2a37c6c3134fc9826516148c8de571d7f [file] [log] [blame]
Neels Hofmeyr3b5de1b2018-06-16 16:08:55 +02001msc {
2 hscale=2;
3 notify [label="calling FSM"], mgwep[label="MGW endpoint FSM"], mgcp[label="mgcp client FSM"],
4 mgw[label="MGW"];
5
6 notify note mgw [label="MGW endpoint FSM\nmanages multiple CI for one endpoint"];
7
8 |||;
9
10 notify rbox notify [label="conn FSM"];
11 notify box notify [label="gscon_ensure_mgw_endpoint()"];
12 notify -> mgwep [label="mgw_endpoint_alloc()"];
13 mgwep abox mgwep [label="MGWEP_ST_UNUSED"];
14
15 ...;
16 ...;
17 ...;
18 notify rbox mgw [label="CRCX"];
19
20 notify rbox notify [label="lchan RTP FSM"];
21 notify -> mgwep [label="mgw_endpoint_ci_add()"];
22 mgwep note mgwep [label="Return an unassigned endpoint CI slot in the local array"];
23 ...;
24 mgwep note mgwep [label="First request on a CI must be a CRCX"];
25 notify -> mgwep [label="mgw_endpoint_ci_request(CRCX)"];
26 notify note mgwep [label="verb=CRCX\nverb_info='rtpbridge/*@mgw'\nnotify_event"];
27 mgwep box mgwep [label="CI[x].pending=true"];
28 mgwep abox mgwep [label="MGWEP_ST_WAIT_MGW_RESPONSE"];
29 |||;
30 notify note mgwep [label="If more mgw_endpoint_ci_request() are triggered, they will be set to
31 'pending' and wait until all ongoing requests are through and MGWEP_ST_IN_USE is
32 reached."];
33 |||;
34 mgwep box mgwep [label="for each pending CI:\nsend_verb()"];
35 mgwep -> mgcp [label="CI[x]: mgcp_conn_create()"];
36 mgwep note mgcp [label="Each CI[i] has two events from the FSM instance event range assigned, one
37 for success, one for failure. These are passed to the mgcp client FSM."];
38 mgcp => mgw [label="CRCX"];
39 ...;
40 mgcp <= mgw [label="CRCX OK"];
41 mgcp note mgw [label="MGW returns:\n'rtpbridge/123@mgw',\nnew CI identifier '123abc',\n
42 MGW side RTP IP:port"];
43 mgwep <- mgcp [label="CI[x] success event"];
44 mgwep box mgwep [label="on_success(CI[x])"];
45 mgwep note mgwep [label="CI[x].rtp_info = IP:port\nmgcp_ci_str = '123abc'\n
46 endpoint name = 'rtpbridge/123@mgw'"];
47 notify <- mgwep [label="notify_event from mgw_endpoint_ci_request()"];
48 notify note mgwep [label="notify_event will be one of:\n
49 LCHAN_RTP_EV_MGW_ENDPOINT_AVAILABLE (towards BTS)\n
50 ASSIGNMENT_EV_MSC_MGW_OK (towards MSC)\n
51 HO_EV_MSC_MGW_OK (towards MSC)"];
52 mgwep abox mgwep [label="MGWEP_ST_IN_USE"];
53
54 ...;
55 ...;
56 ...;
57 notify rbox mgw [label="MDCX"];
58
59 mgwep note mgwep [label="Second or later request on a CI must be MDCX or DLCX"];
60 notify -> mgwep [label="mgw_endpoint_ci_request(MDCX)"];
61 notify note mgwep [label="verb=MDCX\nverb_info=BTS RTP IP:port\n
62 automatic: full endpoint name as from CRCX OK\n
63 notify_event\n"];
64 mgwep box mgwep [label="CI[x].pending=true"];
65 mgwep abox mgwep [label="MGWEP_ST_WAIT_MGW_RESPONSE"];
66 mgwep box mgwep [label="for each pending CI:\nsend_verb()"];
67 mgwep -> mgcp [label="CI[x]: mgcp_conn_modify()"];
68 mgcp => mgw [label="MDCX"];
69 ...;
70 mgcp <= mgw [label="MDCX OK"];
71 mgwep <- mgcp [label="CI[x] success event"];
72 mgwep box mgwep [label="on_success(CI[x])"];
73 notify <- mgwep [label="notify_event from mgw_endpoint_ci_request()"];
74 notify note mgwep [label="notify_event will be one of:\n
75 LCHAN_RTP_EV_MGW_ENDPOINT_CONFIGURED (towards BTS)\n
76 ASSIGNMENT_EV_MSC_MGW_OK (towards MSC)\n
77 HO_EV_MSC_MGW_OK (towards MSC)"];
78 mgwep abox mgwep [label="MGWEP_ST_IN_USE"];
79
80 ...;
81 ...;
82 ...;
83 notify rbox mgw [label="DLCX"];
84
85 notify -> mgwep [label="mgw_endpoint_ci_dlcx()"];
86 mgwep box mgwep [label="mgw_endpoint_ci_request(DLCX)"];
87 mgwep box mgwep [label="CI[x].pending=true"];
88 mgwep abox mgwep [label="MGWEP_ST_WAIT_MGW_RESPONSE"];
89 mgwep box mgwep [label="for each pending CI:\nsend_verb()"];
90 mgwep -> mgcp [label="CI[x]: mgcp_conn_delete()"];
91 mgcp => mgw [label="DLCX"];
92 mgcp box mgcp [label="detach from parent fi"];
93 mgwep box mgwep [label="forget and clear CI[x]"];
94 --- [label="IF other CI remain valid"];
95 mgwep abox mgwep [label="MGWEP_ST_IN_USE"];
96 --- [label="IF no CI remain on endpoint"];
97 mgwep abox mgwep [label="terminate"];
98 notify rbox notify [label="conn FSM"];
99 notify <- mgwep [label="GSCON_EV_FORGET_MGW_ENDPOINT"];
100 ---;
101 ...;
102 mgcp <= mgw [label="DLCX OK"];
103 mgcp abox mgcp [label="terminate"];
104
105}