neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37281?usp=email )
Change subject: mgcp_test: add CRCX for IUFP in sendrecv ......................................................................
mgcp_test: add CRCX for IUFP in sendrecv
Note, there are also ttcn3 tests sending the same to osmo-mgw being submitted along with these patches, and the ttcn3 tests currently fail: osmo-mgw rejects the connection mode "sendrecv" in the first CRCX.
Change-Id: Icdb1085b8e44ac4cff6c457163349b81e81bf765 --- M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 2 files changed, 116 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/81/37281/1
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index c6a0f6e..2e06639 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -436,6 +436,44 @@ "a=rtpmap:96 VND.3GPP.IUFP/16000\r\n" \ "a=ptime:20\r\n"
+/* Do a CRCX in m=sendrecv */ +#define CRCX_PORT_0_IUFP_SENDRECV \ + "CRCX 4 1@mgw MGCP 1.0\r\n" \ + "M: sendrecv\r\n" \ + "C: 2\r\n" \ + "L: p:20\r\n" \ + "\r\n" \ + "v=0\r\n" \ + "c=IN IP4 123.12.12.123\r\n" \ + "m=audio 0 RTP/AVP 96\r\n" \ + "a=rtpmap:96 VND.3GPP.IUFP/16000\r\n" \ + "a=ptime:20\r\n" + +/* Do a CRCX using sendrecv mode in the SDP part */ +#define CRCX_PORT_0_IUFP_SENDRECV2 \ + "CRCX 4 1@mgw MGCP 1.0\r\n" \ + "C: 2\r\n" \ + "L: p:20\r\n" \ + "\r\n" \ + "v=0\r\n" \ + "c=IN IP4 123.12.12.123\r\n" \ + "a=sendrecv\r\n" \ + "m=audio 0 RTP/AVP 96\r\n" \ + "a=rtpmap:96 VND.3GPP.IUFP/16000\r\n" \ + "a=ptime:20\r\n" + +/* Do a CRCX entirely omitting a mode, i.e. implcit sendrecv */ +#define CRCX_PORT_0_IUFP_SENDRECV3 \ + "CRCX 4 1@mgw MGCP 1.0\r\n" \ + "C: 2\r\n" \ + "L: p:20\r\n" \ + "\r\n" \ + "v=0\r\n" \ + "c=IN IP4 123.12.12.123\r\n" \ + "m=audio 0 RTP/AVP 96\r\n" \ + "a=rtpmap:96 VND.3GPP.IUFP/16000\r\n" \ + "a=ptime:20\r\n" + #define DLCX \ "DLCX 7 1@mgw MGCP 1.0\r\n" \ "I: %s\r\n" \ @@ -675,6 +713,9 @@ {"RQNT_NULL", RQNT_NULL, RQNT_NULL_RET}, {"CRCX_PORT_0", CRCX_PORT_0, CRCX_PORT_0_RET, 97}, {"CRCX_PORT_0_IUFP", CRCX_PORT_0_IUFP, CRCX_PORT_0_IUFP_RET, 96}, + {"CRCX_PORT_0_IUFP_SENDRECV", CRCX_PORT_0_IUFP_SENDRECV, CRCX_PORT_0_IUFP_RET, 96}, + {"CRCX_PORT_0_IUFP_SENDRECV2", CRCX_PORT_0_IUFP_SENDRECV2, CRCX_PORT_0_IUFP_RET, 96}, + {"CRCX_PORT_0_IUFP_SENDRECV3", CRCX_PORT_0_IUFP_SENDRECV3, CRCX_PORT_0_IUFP_RET, 96}, };
static const struct mgcp_test retransmit[] = { diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index 68b9fc7..5dc00cd 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok @@ -656,6 +656,68 @@ (response contains a connection id)
================================================ +Testing CRCX_PORT_0_IUFP_SENDRECV +creating message from statically defined input: +---------8<--------- +CRCX 4 1@mgw MGCP 1.0 +M: sendrecv +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 0 RTP/AVP 96 +a=rtpmap:96 VND.3GPP.IUFP/16000 +a=ptime:20 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. +(response contains a connection id) + +================================================ +Testing CRCX_PORT_0_IUFP_SENDRECV2 +creating message from statically defined input: +---------8<--------- +CRCX 4 1@mgw MGCP 1.0 +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +a=sendrecv +m=audio 0 RTP/AVP 96 +a=rtpmap:96 VND.3GPP.IUFP/16000 +a=ptime:20 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. +(response contains a connection id) + +================================================ +Testing CRCX_PORT_0_IUFP_SENDRECV3 +creating message from statically defined input: +---------8<--------- +CRCX 4 1@mgw MGCP 1.0 +C: 2 +L: p:20 + +v=0 +c=IN IP4 123.12.12.123 +m=audio 0 RTP/AVP 96 +a=rtpmap:96 VND.3GPP.IUFP/16000 +a=ptime:20 + +---------8<--------- +checking response: +using message with patched conn_id for comparison +Response matches our expectations. +(response contains a connection id) + +================================================ Testing CRCX creating message from statically defined input: ---------8<---------