public bool QueryDeviceForwarding(string device) { QueryDeviceForwardingStr Msg = new QueryDeviceForwardingStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.QUERYDEVICEFORWARDING; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(device, Msg.Device); } Msg.END = 0x55; Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : QUERYDEVICEFORWARDING, device " + device); return(SendMessageToSocket(Msg)); }
public bool MonitorStop(string xrefId) { MonitorStopStr Msg = new MonitorStopStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.MONITORSTOP; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(xrefId, Msg.XrefId); } Msg.END = 0x55; Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : MONITORSTOP, xrefid " + xrefId); return(SendMessageToSocket(Msg)); }
public bool MakeCall(string calling_device, string called_directory_number, short shPrompt) { MakeCallStr Msg = new MakeCallStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.MAKECALL; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(calling_device, Msg.Calling_device); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(called_directory_number, Msg.Called_directory_number); } Msg.ShPrompt = shPrompt; Msg.END = 0x55; Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : MAKECALL, device " + calling_device.ToString() + " dir number " + called_directory_number.ToString() + " shpromt " + shPrompt.ToString()); return(SendMessageToSocket(Msg)); }
public bool SetFeatureForwarding(string device, string fwd_dn, short type, short shOn) { SetFeatureForwardingStr Msg = new SetFeatureForwardingStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.SETFEATUREFORWARDING; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(device, Msg.Device); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(fwd_dn, Msg.Fwd_dn); } Msg.Type = type; Msg.ShOn = shOn; Msg.END = 0x55; Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : SETFEATUREFORWARDING, device " + device + " fwd_dn " + fwd_dn + " type " + type.ToString() + " shon " + shOn.ToString()); return(SendMessageToSocket(Msg)); }
public bool TransferCall(string held_device_id, string active_device_id, string held_call_id, string active_call_id) { TransferCallStr Msg = new TransferCallStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.TRANSFERCALL; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(held_device_id, Msg.Held_device_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(active_device_id, Msg.Active_device_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(held_call_id, Msg.Held_call_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(active_call_id, Msg.Active_call_id); } Msg.END = 0x55; Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : TRANSFERCALL, held_device_id " + held_device_id + " active_device_id " + active_device_id + " held_call_id " + held_call_id + " active_call_id " + active_call_id); return(SendMessageToSocket(Msg)); }
public bool SnapshotDevice(string device) { SnapshotDeviceStr Msg = new SnapshotDeviceStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.SNAPSHOTDEVICE; Msg.END = 0x55; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(device, Msg.Device); } if (SendMessageToSocket(Msg)) { Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : SNAPSHOTDEVICE, device " + device); return(true); } return(false); }
public bool SingleStepTransfer(string active_call_id, string active_device_id, string transfered_to_device_id, string pvt_uu_data, short pvt_uu_data_len) { SingleStepTransferStr Msg = new SingleStepTransferStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.SINGLESTEPTRANSFER; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(active_call_id, Msg.Active_call_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(active_device_id, Msg.Active_device_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(transfered_to_device_id, Msg.Transfered_to_device_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(pvt_uu_data, Msg.Pvt_uu_data); } Msg.Pvt_uu_data_len = pvt_uu_data_len; Msg.END = 0x55; Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : SINGLESTEPTRANSFER, active_call_id " + active_call_id.ToString() + " active_device_id " + active_device_id.ToString() + " transfer_to_device_id " + transfered_to_device_id.ToString() + " pvt_uu_data " + pvt_uu_data); return(SendMessageToSocket(Msg)); }
public bool ConsultationCall(string held_device_id, string called_device_id, string held_call_id, string pvt_uu_data, short pvt_uu_data_len) { ConsultationCallStr Msg = new ConsultationCallStr(); Msg.BEG = 0xaa; Msg.Size = (short)(System.Runtime.InteropServices.Marshal.SizeOf(Msg) - NetworkPacketTools.PCK_HDR_TRM_LEN()); Msg.Cmd = PacketTypes.CONSULTATIONCALL; unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(held_device_id, Msg.Held_device_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(called_device_id, Msg.Called_device_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(held_call_id, Msg.Held_call_id); } unsafe { NetworkPacketTools.StrinToBytes_MAX_STN_CHARNO(pvt_uu_data, Msg.Pvt_uu_data); } Msg.Pvt_uu_data_len = pvt_uu_data_len; Msg.END = 0x55; Globals.Logger.LogString(LogManager.LogLevels.LogFlagNetwork, nclient.ServerIPAndPort + " CMSG : CONSULTATIONCALL, held_device_id " + held_device_id + " called_device_id " + called_device_id + " Held_called_id " + held_call_id + " pvt_uu_data " + pvt_uu_data); return(SendMessageToSocket(Msg)); }