module MGCP_Test { import from MGCP_Types all; type component dummy_CT { }; testcase TC_selftest() runs on dummy_CT { const charstring c_auep := "AUEP 158663169 ds/e1-1/2@172.16.6.66 MGCP 1.0\r\n"; const charstring c_mdcx3 := "MDCX 18983215 1@mgw MGCP 1.0\r\n"; const charstring c_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" & "s=-\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" & "a=ptime:20\r\n"; const charstring c_mdcx4 := "MDCX 18983216 1@mgw MGCP 1.0\r\n" & "M: sendrecv\r" & "C: 2\r\n" & "I: 1\r\n" & "L: p:20, a:AMR, nt:IN\r\n" & "\n" & "v=0\r\n" & "o=- 1 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 4441 RTP/AVP 99\r\n" & "a=rtpmap:99 AMR/8000\r\n" & "a=ptime:40\r\n"; log(c_auep); log(dec_MgcpCommand(c_auep)); log(c_mdcx3); log(dec_MgcpCommand(c_mdcx3)); log(c_mdcx3_ret); log(dec_MgcpResponse(c_mdcx3_ret)); log(c_mdcx4); log(dec_MgcpCommand(c_mdcx4)); } control { execute(TC_selftest()); } }