From cf2f158caa47e9d1410453309c7aec58e99ac011 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 10 Dec 2012 12:54:57 +0100 Subject: mgcp: Add testdata for MDCX handling --- openbsc/tests/mgcp/mgcp_test.c | 18 ++++++++++++++++++ openbsc/tests/mgcp/mgcp_test.ok | 3 +++ 2 files changed, 21 insertions(+) (limited to 'openbsc/tests/mgcp') 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 -- cgit v1.2.3