aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/mgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-10 12:54:57 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-10 13:35:53 +0100
commitcf2f158caa47e9d1410453309c7aec58e99ac011 (patch)
tree0b0a8b43bac952f90c06f917be076031d818d97e /openbsc/tests/mgcp
parentd267f4d685bccdf6eaa839044db2721b3c3c37c4 (diff)
mgcp: Add testdata for MDCX handling
Diffstat (limited to 'openbsc/tests/mgcp')
-rw-r--r--openbsc/tests/mgcp/mgcp_test.c18
-rw-r--r--openbsc/tests/mgcp/mgcp_test.ok3
2 files changed, 21 insertions, 0 deletions
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index c4769710a..f0b58ef02 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -34,6 +34,21 @@
#define SHORT "CRCX \r\n"
#define SHORT_RET "510 000000 FAIL\r\n"
+#define MDCX_WRONG_EP "MDCX 18983213 ds/e1-3/1@172.16.6.66 MGCP 1.0\r\n"
+#define MDCX_ERR_RET "510 18983213 FAIL\r\n"
+#define MDCX_UNALLOCATED "MDCX 18983214 ds/e1-1/2@172.16.6.66 MGCP 1.0\r\n"
+#define MDCX_RET "400 18983214 FAIL\r\n"
+#define MDCX3 "MDCX 18983215 1@mgw MGCP 1.0\r\n"
+#define MDCX3_RET "200 18983215 OK\r\n" \
+ "I: 1\n" \
+ "\n" \
+ "v=0\r\n" \
+ "o=- 1 23 IN IP4 0.0.0.0\r\n" \
+ "c=IN IP4 0.0.0.0\r\n" \
+ "t=0 0\r\n" \
+ "m=audio 0 RTP/AVP 126\r\n" \
+ "a=rtpmap:126 AMR/8000\r\n"
+
#define SHORT2 "CRCX 1"
#define SHORT2_RET "510 000000 FAIL\r\n"
#define SHORT3 "CRCX 1 1@mgw"
@@ -103,7 +118,10 @@ struct mgcp_test {
static const struct mgcp_test tests[] = {
{ "AUEP1", AUEP1, AUEP1_RET },
{ "AUEP2", AUEP2, AUEP2_RET },
+ { "MDCX1", MDCX_WRONG_EP, MDCX_ERR_RET },
+ { "MDCX2", MDCX_UNALLOCATED, MDCX_RET },
{ "CRCX", CRCX, CRCX_RET },
+ { "MDCX3", MDCX3, MDCX3_RET },
{ "DLCX", DLCX, DLCX_RET },
{ "CRCX_ZYN", CRCX_ZYN, CRCX_ZYN_RET },
{ "EMPTY", EMPTY, EMPTY_RET },
diff --git a/openbsc/tests/mgcp/mgcp_test.ok b/openbsc/tests/mgcp/mgcp_test.ok
index 5f300e463..dc0b3225a 100644
--- a/openbsc/tests/mgcp/mgcp_test.ok
+++ b/openbsc/tests/mgcp/mgcp_test.ok
@@ -1,6 +1,9 @@
Testing AUEP1
Testing AUEP2
+Testing MDCX1
+Testing MDCX2
Testing CRCX
+Testing MDCX3
Testing DLCX
Testing CRCX_ZYN
Testing EMPTY