diff options
-rw-r--r-- | mgw/MGCP_Test.cfg | 2 | ||||
-rw-r--r-- | mgw/MGCP_Test.ttcn | 54 |
2 files changed, 56 insertions, 0 deletions
diff --git a/mgw/MGCP_Test.cfg b/mgw/MGCP_Test.cfg index 6eeb9c2f..da45761b 100644 --- a/mgw/MGCP_Test.cfg +++ b/mgw/MGCP_Test.cfg @@ -30,6 +30,8 @@ MGCP_Test.TC_crcx_wildcarded MGCP_Test.TC_crcx_wildcarded_exhaust MGCP_Test.TC_mdcx_without_crcx MGCP_Test.TC_dlcx_without_crcx +MGCP_Test.TC_mdcx_wildcarded +MGCP_Test.TC_dlcx_wildcarded MGCP_Test.TC_crcx_and_dlcx_ep_callid_connid MGCP_Test.TC_crcx_and_dlcx_ep_callid MGCP_Test.TC_crcx_and_dlcx_ep diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 6c47e27b..9632e798 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -518,6 +518,58 @@ module MGCP_Test { setverdict(pass); } + /* test valid wildcarded MDCX */ + testcase TC_mdcx_wildcarded() runs on dummy_CT { + /* Note: A wildcarded MDCX is not allowed, so we expect the + * MGW to reject this request */ + var template MgcpCommand cmd; + var MgcpResponse resp; + var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "*@" & c_mgw_domain; + var MgcpCallId call_id := '1225'H; + var template MgcpResponse rtmpl := { + line := { + /* TODO: accept/enforce better error? */ + code := "507", + string := ? + }, + params:= { }, + sdp := omit + }; + + f_init(ep); + + cmd := ts_MDCX(get_next_trans_id(), ep, "sendrecv", call_id, call_id); + cmd.sdp := ts_SDP("127.0.0.1", "127.0.0.2", "23", "42", 2344, { "98" }, + { valueof(ts_SDP_rtpmap(98, "AMR/8000")), + valueof(ts_SDP_ptime(20)) }); + resp := mgcp_transceive_mgw(cmd, rtmpl); + setverdict(pass); + } + + /* test valid wildcarded DLCX */ + testcase TC_dlcx_wildcarded() runs on dummy_CT { + /* Note: A wildcarded DLCX is specified, but our MGW does not + * support this feature so we expect the MGW to reject the + * request */ + var template MgcpCommand cmd; + var MgcpResponse resp; + var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "*@" & c_mgw_domain; + var template MgcpResponse rtmpl := { + line := { + code := "507", + string := ? + }, + params:= { }, + sdp := omit + }; + + f_init(ep); + + cmd := ts_DLCX(get_next_trans_id(), ep, '41234'H); + resp := mgcp_transceive_mgw(cmd, rtmpl); + setverdict(pass); + } + /* Test (valid) CRCX followed by (valid) DLCX containig EP+CallId+ConnId */ testcase TC_crcx_and_dlcx_ep_callid_connid() runs on dummy_CT { var template MgcpCommand cmd; @@ -688,6 +740,8 @@ module MGCP_Test { execute(TC_crcx_wildcarded_exhaust()); execute(TC_mdcx_without_crcx()); execute(TC_dlcx_without_crcx()); + execute(TC_mdcx_wildcarded()); + execute(TC_dlcx_wildcarded()); execute(TC_crcx_and_dlcx_ep_callid_connid()); execute(TC_crcx_and_dlcx_ep_callid()); execute(TC_crcx_and_dlcx_ep()); |