neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37233?usp=email )
Change subject: mgcp_test.c: verify osmo-mgw accepts m=audio 0 ......................................................................
mgcp_test.c: verify osmo-mgw accepts m=audio 0
When osmo-hnbgw does not yet know the remote port, it wants to send a CRCX to set up IuUP at the MGW, with the audio port set to zero. Make sure osmo-mgw accepts port == 0.
Related: SYS#6907 SYS#6974 Change-Id: I42011c2e7256d372a37b6a2fe86af0153038e2d0 --- M tests/mgcp/mgcp_test.c M tests/mgcp/mgcp_test.ok 2 files changed, 66 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/33/37233/1
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index ffc8a20..65756e0 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -386,6 +386,56 @@ "a=rtpmap:97 GSM-EFR/8000\r\n" \ "a=ptime:40\r\n"
+#define CRCX_PORT_0 \ + "CRCX 3 1@mgw MGCP 1.0\r\n" \ + "m: recvonly\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 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ + "a=ptime:40\r\n" + +#define CRCX_PORT_0_RET \ + "200 3 OK\r\n" \ + "I: %s\r\n" \ + "\r\n" \ + "v=0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ + "s=-\r\n" \ + "c=IN IP4 0.0.0.0\r\n" \ + "t=0 0\r\n" \ + "m=audio 16014 RTP/AVP 97\r\n" \ + "a=rtpmap:97 GSM-EFR/8000\r\n" \ + "a=ptime:40\r\n" + +#define CRCX_PORT_0_IUFP \ + "CRCX 4 1@mgw MGCP 1.0\r\n" \ + "m: recvonly\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:40\r\n" + +#define CRCX_PORT_0_IUFP_RET \ + "200 4 OK\r\n" \ + "I: %s\r\n" \ + "\r\n" \ + "v=0\r\n" \ + "o=- %s 23 IN IP4 0.0.0.0\r\n" \ + "s=-\r\n" \ + "c=IN IP4 0.0.0.0\r\n" \ + "t=0 0\r\n" \ + "m=audio 16016 RTP/AVP 96\r\n" \ + "a=rtpmap:96 VND.3GPP.IUFP/16000\r\n" \ + "a=ptime:40\r\n" + #define DLCX \ "DLCX 7 1@mgw MGCP 1.0\r\n" \ "I: %s\r\n" \ @@ -623,6 +673,8 @@ {"MDCX_NULL", MDCX_NULL, MDCX_NULL_RET}, {"DLCX_NULL", DLCX_NULL, DLCX_NULL_RET}, {"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}, };
static const struct mgcp_test retransmit[] = { diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok index d76e455..a81d9dd 100644 --- a/tests/mgcp/mgcp_test.ok +++ b/tests/mgcp/mgcp_test.ok Binary files differ