do CN CRCX first
In order to send the MSC's RTP endpoint IP address+port in the initial
SDP, move the MGCP CRCX up to an earlier point in the sequence of
establishing a voice call.
Update the voice call sequence chart to show the effects.
Though the semantic change is rather simple, the patch is rather huge --
things have to happen in a different order, and async waits have to
happen at different times.
The new codec filter helps to carry codec resolution information across
the newly arranged code paths.
Related: SYS#5066
Change-Id: Ie433db1ba0c46d4b97538a969233c155cefac21c
diff --git a/doc/sequence_charts/voice_call_external_mncc.msc b/doc/sequence_charts/voice_call_external_mncc.msc
index 980755d..94cedee 100644
--- a/doc/sequence_charts/voice_call_external_mncc.msc
+++ b/doc/sequence_charts/voice_call_external_mncc.msc
@@ -13,24 +13,24 @@
moms =>> momsc [label="CC SETUP"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nINITIATED"];
-momsc =>> mncc [label="MNCC_SETUP_IND"];
+momgw <<= momsc [label="for CN: CRCX\nrtpbridge/*@msc"];
+momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-1 IP:port-1"];
+momsc =>> mncc [label="MNCC_SETUP_IND\nIP:port-1"];
+momgw <<= momsc [label="for RAN: CRCX\nEP-1"];
momsc <<= mncc [label="MNCC_RTP_CREATE"];
-momgw <<= momsc [label="for RAN: CRCX\nrtpbridge/*@msc"];
-momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-1 IP:port-1"];
+momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-2 IP:port-2"];
moms <<= momsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
moms =>> momsc [label="(BSSMAP) Assignment Complete"];
-momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-1"];
-momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-1 IP:port-1"];
-momgw <<= momsc [label="for CN: CRCX\nEP-1"];
-momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-2 IP:port-2"];
-momsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-2"];
+momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-2"];
+momsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-1"];
momsc <<= mncc [label="MNCC_CALL_PROC_REQ"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nMO_CALL_PROC"];
moms <<= momsc [label="CC CALL_PROC"];
-mtmsc <<= mncc [label="MNCC_SETUP_REQ"];
+mtmsc <<= mncc [label="MNCC_SETUP_REQ\nIP:port-1"];
mtms <<= mtmsc [label="Paging"];
+momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-2 IP:port-2"];
mtms =>> mtmsc [label="(BSSMAP) Complete Layer 3 Information"];
mtms =>> mtmsc [label="RR PAG_RESP"];
mtms <<= mtmsc [label="MM AUTH_REQ"];
@@ -45,23 +45,23 @@
mtms =>> mtmsc [label="CC CALL_CONF"];
mtmsc note mtmsc [label="CC stops timer T303"];
mtmsc note mtmsc [label="CC starts timer T310 (30s)"];
+mtmgw <<= mtmsc [label="for CN: CRCX\nrtpbridge/*@msc"];
mtmsc abox mtmsc [label="CC state:\nMO_TERM_CALL_CONF"];
-mtmgw <<= mtmsc [label="for RAN: CRCX\nrtpbridge/*@msc"];
mtmsc =>> mncc [label="MNCC_CALL_CONF_IND"];
mtmsc <<= mncc [label="MNCC_RTP_CREATE"];
-mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-3 IP:port-3"];
+mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-3 IP:port-3"];
+mtmgw <<= mtmsc [label="for RAN: CRCX\nEP-2"];
+mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-4 IP:port-4"];
mtms <<= mtmsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Assignment Complete"];
-mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-3"];
-mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-3 IP:port-3"];
-mtmgw <<= mtmsc [label="for CN: CRCX\nEP-2"];
-mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-4 IP:port-4"];
-mtmsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-4"];
+mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-4"];
+mtmsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-3"];
+mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-4 IP:port-4"];
mtms =>> mtmsc [label="CC ALERTING"];
mtmsc note mtmsc [label="CC stops timer T310"];
mtmsc note mtmsc [label="CC starts timer T301 (180s)"];
mtmsc abox mtmsc [label="CC state:\nCALL_RECEIVED"];
-mtmsc =>> mncc [label="MNCC_ALERT_IND"];
+mtmsc =>> mncc [label="MNCC_ALERT_IND\nIP:port-3"];
momsc <<= mncc [label="MNCC_ALERT_REQ"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
@@ -70,24 +70,24 @@
mtms =>> mtmsc [label="CC CONNECT"];
mtmsc note mtmsc [label="CC stops timer T301"];
mtmsc abox mtmsc [label="CC state:\nCONNECT_REQUEST"];
-mtmsc =>> mncc [label="MNCC_SETUP_CNF"];
-mtmsc <<= mncc [label="MNCC_RTP_CONNECT\nIP:port-2"];
-mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-4"];
+mtmsc =>> mncc [label="MNCC_SETUP_CNF\nIP:port-3"];
+mtmsc <<= mncc [label="MNCC_RTP_CONNECT\nIP:port-1"];
+mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-3"];
mtmsc <<= mncc [label="MNCC_SETUP_COMPL_REQ"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
mtmsc abox mtmsc [label="CC state:\nACTIVE"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtms <<= mtmsc [label="CC CONNECT_ACK"];
-momsc <<= mncc [label="MNCC_RTP_CONNECT\nIP:port-4"];
-momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-2"];
+momsc <<= mncc [label="MNCC_RTP_CONNECT\nIP:port-3"];
+momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-1"];
momsc <<= mncc [label="MNCC_SETUP_RSP"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc note momsc [label="CC starts timer T313 (30s)"];
momsc abox momsc [label="CC state:\nCONNECT_IND"];
moms <<= momsc [label="CC CONNECT"];
-mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-4 IP:port-4"];
-momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-2 IP:port-2"];
+mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-3 IP:port-3"];
+momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-1 IP:port-1"];
moms =>> momsc [label="CC CONNECT_ACK"];
momsc note momsc [label="CC stops timer T313"];
momsc abox momsc [label="CC state:\nACTIVE"];
diff --git a/doc/sequence_charts/voice_call_internal_mncc.msc b/doc/sequence_charts/voice_call_internal_mncc.msc
index 69af60e..898c1ff 100644
--- a/doc/sequence_charts/voice_call_internal_mncc.msc
+++ b/doc/sequence_charts/voice_call_internal_mncc.msc
@@ -13,29 +13,29 @@
moms =>> momsc [label="CC SETUP"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nINITIATED"];
-momsc =>> mncc [label="MNCC_SETUP_IND"];
+momgw <<= momsc [label="for CN: CRCX\nrtpbridge/*@msc"];
+momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-1 IP:port-1"];
+momsc =>> mncc [label="MNCC_SETUP_IND\nIP:port-1"];
momsc <<= mncc [label="MNCC_CALL_PROC_REQ"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nMO_CALL_PROC"];
moms <<= momsc [label="CC CALL_PROC"];
-momgw <<= momsc [label="for RAN: CRCX\nrtpbridge/*@msc"];
momsc <<= mncc [label="MNCC_LCHAN_MODIFY"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
-mtmsc <<= mncc [label="MNCC_SETUP_REQ"];
+mtmsc <<= mncc [label="MNCC_SETUP_REQ\nIP:port-1"];
mtms <<= mtmsc [label="Paging"];
-momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-1 IP:port-1"];
+momgw <<= momsc [label="for RAN: CRCX\nEP-1"];
+momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-2 IP:port-2"];
moms <<= momsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
-moms =>> momsc [label="(BSSMAP) Assignment Complete"];
-momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-1"];
-momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-1 IP:port-1"];
-momgw <<= momsc [label="for CN: CRCX\nEP-1"];
-momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-2 IP:port-2"];
-momsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-2"];
mtms =>> mtmsc [label="(BSSMAP) Complete Layer 3 Information"];
mtms =>> mtmsc [label="RR PAG_RESP"];
mtms <<= mtmsc [label="MM AUTH_REQ"];
+moms =>> momsc [label="(BSSMAP) Assignment Complete"];
+momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-2"];
+momsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-1"];
+momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-2 IP:port-2"];
mtms =>> mtmsc [label="MM AUTH_RESP"];
mtms <<= mtmsc [label="(BSSMAP) CIPHER_MODE_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Ciphering Mode Complete"];
@@ -47,49 +47,49 @@
mtms =>> mtmsc [label="CC CALL_CONF"];
mtmsc note mtmsc [label="CC stops timer T303"];
mtmsc note mtmsc [label="CC starts timer T310 (30s)"];
+mtmgw <<= mtmsc [label="for CN: CRCX\nrtpbridge/*@msc"];
mtmsc abox mtmsc [label="CC state:\nMO_TERM_CALL_CONF"];
-mtmgw <<= mtmsc [label="for RAN: CRCX\nrtpbridge/*@msc"];
mtmsc =>> mncc [label="MNCC_CALL_CONF_IND"];
mtmsc <<= mncc [label="MNCC_LCHAN_MODIFY"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
-mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-3 IP:port-3"];
+mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-3 IP:port-3"];
+mtmgw <<= mtmsc [label="for RAN: CRCX\nEP-2"];
+mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-4 IP:port-4"];
mtms <<= mtmsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Assignment Complete"];
-mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-3"];
-mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-3 IP:port-3"];
-mtmgw <<= mtmsc [label="for CN: CRCX\nEP-2"];
-mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-4 IP:port-4"];
-mtmsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-4"];
+mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-4"];
+mtmsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-3"];
+mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-4 IP:port-4"];
mtms =>> mtmsc [label="CC ALERTING"];
mtmsc note mtmsc [label="CC stops timer T310"];
mtmsc note mtmsc [label="CC starts timer T301 (180s)"];
mtmsc abox mtmsc [label="CC state:\nCALL_RECEIVED"];
-mtmsc =>> mncc [label="MNCC_ALERT_IND"];
-momsc <<= mncc [label="MNCC_ALERT_REQ"];
+mtmsc =>> mncc [label="MNCC_ALERT_IND\nIP:port-3"];
+momsc <<= mncc [label="MNCC_ALERT_REQ\nIP:port-3"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nCALL_DELIVERED"];
+momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-1"];
moms <<= momsc [label="CC ALERTING"];
+momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-1 IP:port-1"];
mtms =>> mtmsc [label="CC CONNECT"];
mtmsc note mtmsc [label="CC stops timer T301"];
mtmsc abox mtmsc [label="CC state:\nCONNECT_REQUEST"];
-mtmsc =>> mncc [label="MNCC_SETUP_CNF"];
+mtmsc =>> mncc [label="MNCC_SETUP_CNF\nIP:port-3"];
mtmsc <<= mncc [label="MNCC_SETUP_COMPL_REQ"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
mtmsc abox mtmsc [label="CC state:\nACTIVE"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtms <<= mtmsc [label="CC CONNECT_ACK"];
-momsc <<= mncc [label="MNCC_SETUP_RSP"];
+momsc <<= mncc [label="MNCC_SETUP_RSP\nIP:port-3"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc note momsc [label="CC starts timer T313 (30s)"];
momsc abox momsc [label="CC state:\nCONNECT_IND"];
moms <<= momsc [label="CC CONNECT"];
-mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-4"];
-momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-2"];
-mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-4 IP:port-4"];
-momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-2 IP:port-2"];
+mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-3"];
+mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-3 IP:port-3"];
moms =>> momsc [label="CC CONNECT_ACK"];
momsc note momsc [label="CC stops timer T313"];
momsc abox momsc [label="CC state:\nACTIVE"];