aboutsummaryrefslogtreecommitdiffstats
path: root/library/MGCP_CodecPort.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'library/MGCP_CodecPort.ttcn')
-rw-r--r--library/MGCP_CodecPort.ttcn36
1 files changed, 34 insertions, 2 deletions
diff --git a/library/MGCP_CodecPort.ttcn b/library/MGCP_CodecPort.ttcn
index d33afe18..8614eef1 100644
--- a/library/MGCP_CodecPort.ttcn
+++ b/library/MGCP_CodecPort.ttcn
@@ -41,11 +41,33 @@ module MGCP_CodecPort {
MgcpMessage msg
}
+ type record MGCP_SendTo {
+ ConnectionId connId,
+ HostName remName,
+ PortNumber remPort,
+ MgcpMessage msg
+ };
+
template MGCP_Send t_MGCP_Send(template ConnectionId connId, template MgcpMessage msg) := {
connId := connId,
msg := msg
}
+ template MGCP_SendTo t_MGCP_SendTo(template ConnectionId connId, HostName remName,
+ PortNumber remPort,template MgcpMessage msg) := {
+ connId := connId,
+ remName := remName,
+ remPort := remPort,
+ msg := msg
+ }
+
+ template MGCP_SendTo t_MGCP_SendToMrf(MGCP_RecvFrom mrf,template MgcpMessage msg) := {
+ connId := mrf.connId,
+ remName := mrf.remName,
+ remPort := mrf.remPort,
+ msg := msg
+ }
+
private function IPL4_to_MGCP_RecvFrom(in ASP_RecvFrom pin, out MGCP_RecvFrom pout) {
pout.connId := pin.connId;
pout.remName := pin.remName;
@@ -65,13 +87,23 @@ module MGCP_CodecPort {
pout.msg := char2oct(enc_MgcpMessage(pin.msg));
} with { extension "prototype(fast)" };
+ private function MGCP_to_IPL4_SendTo(in MGCP_SendTo pin, out ASP_SendTo out_ud) {
+ out_ud.connId := pin.connId;
+ out_ud.remName := pin.remName;
+ out_ud.remPort := pin.remPort;
+ out_ud.proto := { udp := {} };
+ out_ud.msg := char2oct(enc_MgcpMessage(pin.msg));
+ } with { extension "prototype(fast)" };
+
type port MGCP_CODEC_PT message {
- out MGCP_Send;
+ out MGCP_Send,
+ MGCP_SendTo;
in MGCP_RecvFrom,
ASP_ConnId_ReadyToRelease,
ASP_Event;
} with { extension "user IPL4asp_PT
- out(MGCP_Send -> ASP_Send:function(MGCP_to_IPL4_Send))
+ out(MGCP_Send -> ASP_Send:function(MGCP_to_IPL4_Send);
+ MGCP_SendTo -> ASP_SendTo: function(MGCP_to_IPL4_SendTo))
in(ASP_RecvFrom -> MGCP_RecvFrom: function(IPL4_to_MGCP_RecvFrom);
ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple;
ASP_Event -> ASP_Event: simple)"