private void attQueryTrunkGroupButton_Click(object sender, EventArgs e) { if (!streamCheckbox.Checked || deviceTextBox.Text.Length == 0 || deviceTextBox.Text.Length > 5 || !streamCheckbox.Checked) { return; } Csta.DeviceID_t currentDevice = deviceTextBox.Text; Acs.RetCode_t retCode = Att.attQueryTrunkGroup(this.privData, ref currentDevice); if (retCode._value < 0) return; var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); if (escapeData.attEvts[0] == null || escapeData.attEvts[0].eventType.eventType != Att.ATT_QUERY_TG_CONF) return; Log("attQueryTrunkGroup results:"); Log("Idle Trunks: " + escapeData.attEvts[0].queryTg.idleTrunks); Log("Busy Trunks: " + escapeData.attEvts[0].queryTg.usedTrunks); MessageBox.Show("attQueryTrunkGroup succeded. Look in the log for details."); }
private void attQueryEndpointRegistrationInfoButton_Click(object sender, EventArgs e) { if (!streamCheckbox.Checked || deviceTextBox.Text.Length == 0 || deviceTextBox.Text.Length > 5 || !streamCheckbox.Checked) { return; } Csta.DeviceID_t currentDevice = deviceTextBox.Text; Acs.RetCode_t retCode = Att.attQueryEndpointRegistrationInfo(this.privData, ref currentDevice); if (retCode._value < 0) return; var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); //TODO: find ATT_QUERY_ENDPOINT_REGISTRATION_INFO_CONF value //if (escapeData.attEvts[0].eventType.eventType != Att.ATT_QUERY_ENDPOINT_REGISTRATION_INFO_CONF) return; if (escapeData.attEvts == null || escapeData.attEvts.Length < 1) { MessageBox.Show("attQueryEndpointRegistrationInfo failed. Error: " + escapeData.cstaError.error); return; } Log("attQueryEndpointRegistrationInfo results:"); Log("Device:" + escapeData.attEvts[0].queryEndpointRegistrationInfo.device); Log("Service state:" + escapeData.attEvts[0].queryEndpointRegistrationInfo.serviceState); Log("[STUB] ptr to registered endpoints array:" + escapeData.attEvts[0].queryEndpointRegistrationInfo.registeredEndpoints); }
private void attQueryStationStatusButton_Click(object sender, EventArgs e) { if (!streamCheckbox.Checked || deviceTextBox.Text.Length == 0 || deviceTextBox.Text.Length > 5 || !streamCheckbox.Checked) { return; } Csta.DeviceID_t currentDevice = deviceTextBox.Text; Acs.RetCode_t retCode = Att.attQueryStationStatus(this.privData, ref currentDevice); if (retCode._value < 0) return; var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); if (escapeData.attEvts[0] == null || escapeData.attEvts[0].eventType.eventType != Att.ATT_QUERY_STATION_STATUS_CONF) return; Log("attQueryStationStatus results:"); Log("Station Status: " + escapeData.attEvts[0].queryStationStatus.stationStatus); //Log("Service State: " + escapeData.attEvts[0].queryStationStatus.serviceState); MessageBox.Show("attQueryStationStatus succeded. Look in the log for details."); }
private void attQueryDeviceNameButton_Click(object sender, EventArgs e) { if (!streamCheckbox.Checked || deviceTextBox.Text.Length == 0 || deviceTextBox.Text.Length > 5 || !streamCheckbox.Checked) { return; } Csta.DeviceID_t currentDevice = deviceTextBox.Text; Acs.RetCode_t retCode = Att.attQueryDeviceName(this.privData, ref currentDevice); if (retCode._value < 0) return; var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); if (escapeData.attEvts[0].eventType.eventType != Att.ATT_QUERY_DEVICE_NAME_CONF) return; Log("attQueryDeviceName results:"); Log("Device Type: " + escapeData.attEvts[0].queryDeviceName.deviceType); Log("Device: " + escapeData.attEvts[0].queryDeviceName.device); Log("Name: " + escapeData.attEvts[0].queryDeviceName.name); Log("Unicode Name: " + escapeData.attEvts[0].queryDeviceName.uname); MessageBox.Show("attQueryDeviceName succeded. Look in the log for details."); }
private void attQueryCallClassifierButton_Click(object sender, EventArgs e) { Acs.RetCode_t retCode = Att.attQueryCallClassifier(this.privData); var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); if (escapeData.attEvts[0].eventType.eventType != Att.ATT_QUERY_CALL_CLASSIFIER_CONF) return; Log("attQueryCallClassifier results:"); Log("Available ports:" + escapeData.attEvts[0].queryCallClassifier.numAvailPorts); Log("InUse ports:" + escapeData.attEvts[0].queryCallClassifier.numInUsePorts); MessageBox.Show("attQueryCallClassifier succeded. Look in the log for details."); }
private void QueryTimeOfDayButton_Click(object sender, EventArgs e) { Acs.RetCode_t retCode = Att.attQueryTimeOfDay(this.privData); if (retCode._value < 0) return; var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); if (escapeData.attEvts[0] == null || escapeData.attEvts[0].eventType.eventType != Att.ATT_QUERY_TOD_CONF) return; Log("attQueryTimeOfDay results:"); Log("Date: " + escapeData.attEvts[0].queryTod.month + "/" + escapeData.attEvts[0].queryTod.day + "/" + escapeData.attEvts[0].queryTod.year); Log("Time: " + escapeData.attEvts[0].queryTod.hour + ":" + escapeData.attEvts[0].queryTod.minute + ":" + escapeData.attEvts[0].queryTod.second); MessageBox.Show("attQueryTimeOfDay succeded. Look in the log for details."); }
private void querySplitButton_Click(object sender, EventArgs e) { Csta.DeviceID_t currentDevice = this.deviceTextBox.Text; Acs.RetCode_t retCode = Att.attQueryAcdSplit(this.privData, ref currentDevice); var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); if (escapeData.cstaReturnCode._value < 0) { MessageBox.Show("Could not get CSTA event. Error code = " + escapeData.cstaReturnCode._value); return; } if (escapeData.attReturnCode._value < 0) { MessageBox.Show("Could not get ATT event. Error code = " + escapeData.attReturnCode._value); return; } if (escapeData.attEvts == null) { MessageBox.Show("ATT method failed. Error was: " + escapeData.cstaError.error); return; } if (escapeData.attEvts[0].eventType.eventType == Att.ATT_QUERY_ACD_SPLIT_CONF) { Log("ATTQueryAcdSplit data:"); Log("availableAgents " + escapeData.attEvts[0].queryAcdSplit.availableAgents); Log("callsInQueue " + escapeData.attEvts[0].queryAcdSplit.callsInQueue); Log("agentsLoggedIn " + escapeData.attEvts[0].queryAcdSplit.agentsLoggedIn); MessageBox.Show("ATTQueryAcdSplit succeded. Look in the log for details."); } }
private void attQueryAgentLoginButton_Click(object sender, EventArgs e) { Csta.DeviceID_t currentDevice = this.deviceTextBox.Text; Acs.RetCode_t retCode = Att.attQueryAgentLogin(this.privData, ref currentDevice); var escapeData = new Att.CstaEscapeData(); escapeData.GetAttEvents(this.acsHandle, this.privData); if (escapeData.cstaReturnCode._value < 0) { MessageBox.Show("Could not get CSTA event. Error code = " + escapeData.cstaReturnCode._value); return; } if (escapeData.attReturnCode._value < 0) { MessageBox.Show("Could not get ATT event. Error code = " + escapeData.attReturnCode._value); return; } if (escapeData.attEvts == null) { MessageBox.Show("ATT method failed. Error was: " + escapeData.cstaError.error); return; } if (escapeData.attEvts[0].eventType.eventType == Att.ATT_QUERY_AGENT_LOGIN_CONF) { Att.ATTPrivEventCrossRefID_t privEventCrossRefID = escapeData.attEvts[0].queryAgentLogin.privEventCrossRefID; Log("attQueryAgentLogin results:"); Log("List of logged in agents:"); Log("__________________________________________________________"); foreach (Att.ATTEvent_t attEvt in escapeData.attEvts) { if (attEvt.eventType.eventType == Att.ATT_QUERY_AGENT_LOGIN_RESP && attEvt.queryAgentLoginResp.count > 0 && attEvt.queryAgentLoginResp.privEventCrossRefID._value == privEventCrossRefID._value) { string s = ""; for (int i = 0; i < attEvt.queryAgentLoginResp.count; i++) s += attEvt.queryAgentLoginResp.device[i] + "\t "; Log(s); } } MessageBox.Show("attQueryAgentLogin succeded. Look in the log for details."); } }