We are interfacing with other teams in Java. Most of our code is in C and we are using J/Direct to interface between our C and Java code.
For each function we need from signaling and data exchange, we create an instance of
the com.ms.dll.Callback
class. In this case, we implement the callback(...)
method in that class with the other teams.
For a description of what the following functions do, see the What we accomplished section.
package mia.gateway; import com.ms.dll.Callback; public class Gateway{ /** * Signaling interface */ public static int gw_initialize(boolean useIPLink); public static native int gw_setupConnection(int wire, int de_buffer_size); public static native int gw_terminateConnection(int wire); public static native int gw_dial(int wire, char[] dialstr); /** * Management interface */ public static native int gw_set_param(int param_no, int val); public static native int gw_get_param(int param_no); }
public class SIEventHandler extends Callback{ public void callback(int wireNumber, int event){ ... } }
Event Name | Description |
EVENT_DIGIT_PRESSED | DTMF detected. Event structure includes digit pressed |
EVENT_ERROR | An unidentified error occurred on a wire. Connection must be terminated. |
Dialogic Card events are passed to Signaling through this interface. This function has to be non-blocking and can not call gw_* functions.
public class ConnectionDX implements VoiceConnection { public ConnectionTable getConnectionTable() public void close() public void setParams( CMS_MsgDataXParams params) public void write(byte[] s) public int getOptimalWriteSize() }
public class ConnectionGatewayDX extends ConnectionDX { public ConnectionGatewayDX(CallBack obsrvr, InetAddress timeServerIP, Object params) public ConnectionGatewayDX(CallBack obsrvr, InetAddress timeServerIP, Object params, int latency) public byte[] read() public void open() }
Warning! These interfaces are not designed or intended for use in on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility.