public static Csta.EventBuffer_t clearCall(Acs.ACSHandle_t acsHandle, Csta.ConnectionID_t cId) { Csta.EventBuffer_t evtBuf = new Csta.EventBuffer_t(); Acs.InvokeID_t invokeId = new Acs.InvokeID_t(); Acs.RetCode_t retCode = Csta.cstaClearCall(acsHandle, invokeId, cId, null); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("cstaClearCall error: " + retCode); return null; } ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents; retCode = Acs.acsGetEventBlock(acsHandle, evtBuf, ref eventBufSize, null, out numEvents); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("acsGetEventBlock error: " + retCode); return null; } return evtBuf; }
public static Csta.EventBuffer_t clearCall(Acs.ACSHandle_t acsHandle, Csta.ConnectionID_t cId) { Csta.EventBuffer_t evtBuf = new Csta.EventBuffer_t(); Acs.InvokeID_t invokeId = new Acs.InvokeID_t(); Acs.RetCode_t retCode = Csta.cstaClearCall(acsHandle, invokeId, cId, null); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("cstaClearCall error: " + retCode); return(null); } ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents; retCode = Acs.acsGetEventBlock(acsHandle, evtBuf, ref eventBufSize, null, out numEvents); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("acsGetEventBlock error: " + retCode); return(null); } return(evtBuf); }
public attSelectiveListeningRetrievePopupForm(Csta.ConnectionID_t[] conns) { this._conns = conns; InitializeComponent(); for (int i = 0;(i < conns.Length) && (i < 10) ; i++) { var rb = new RadioButtonConn(); rb.Location = new System.Drawing.Point(7, 20 * (i + 1)); rb.TabIndex = i + 1; rb.Text = conns[i].deviceID.ToString(); rb.Connection = conns[i]; rb.CheckedChanged += new System.EventHandler(this.rb1_CheckedChanged); var rb2 = new RadioButtonConn(); rb2.Location = new System.Drawing.Point(7, 20 * (i + 1)); rb2.TabIndex = i + 1; rb2.Text = conns[i].deviceID.ToString(); rb2.Connection = conns[i]; rb2.CheckedChanged += new System.EventHandler(this.rb2_CheckedChanged); this.connGroupBox1.Controls.Add(rb); this.connGroupBox2.Controls.Add(rb2); } var selected1 = (RadioButtonConn)this.connGroupBox1.Controls[0]; selected1.Checked = true; var selected2 = (RadioButtonConn)this.connGroupBox2.Controls[1]; selected2.Checked = true; }
public Att.ATTUCID_t GetUcid(Csta.ConnectionID_t conn) { Acs.InvokeID_t invokeId = new Acs.InvokeID_t(); Csta.EventBuffer_t evtBuf = new Csta.EventBuffer_t(); ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents = 0; Acs.RetCode_t retCode = Att.attQueryUCID(this.privData, conn); retCode = Csta.cstaEscapeService(acsHandle, invokeId, this.privData); this.privData.length = Att.ATT_MAX_PRIVATE_DATA; retCode = Acs.acsGetEventBlock(acsHandle, evtBuf, ref eventBufSize, this.privData, out numEvents); Att.ATTEvent_t attEvt = new Att.ATTEvent_t(); retCode = Att.attPrivateData(this.privData, attEvt); Debug.WriteLine("attPrivateData retCode = " + retCode._value); return attEvt.queryUCID.ucid; }
public static Csta.EventBuffer_t clearConnection(Acs.ACSHandle_t acsHandle, Acs.PrivateData_t privData, Csta.ConnectionID_t cId) { var u2uString = "Hello, I AM test u2u string"; var u2uInfo = new Att.ATTUserToUserInfo_t(); // fixed u2u size int u2uSize = Att.ATT_MAX_UUI_SIZE; u2uInfo.length = (short)u2uString.Length; u2uInfo.type = Att.ATTUUIProtocolType_t.UUI_IA5_ASCII; u2uInfo.value = System.Text.Encoding.ASCII.GetBytes(u2uString); Array.Resize(ref u2uInfo.value, u2uSize); Att.attV6ClearConnection(privData, Att.ATTDropResource_t.DR_NONE, ref u2uInfo); Csta.EventBuffer_t evtBuf = new Csta.EventBuffer_t(); Acs.InvokeID_t invokeId = new Acs.InvokeID_t(); Acs.RetCode_t retCode = Csta.cstaClearConnection(acsHandle, invokeId, cId, privData); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("cstaClearConnection error: " + retCode); return(null); } privData.length = Att.ATT_MAX_PRIVATE_DATA; ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents; retCode = Acs.acsGetEventBlock(acsHandle, evtBuf, ref eventBufSize, privData, out numEvents); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("acsGetEventBlock error: " + retCode); return(null); } return(evtBuf); }
public static Csta.EventBuffer_t clearConnection(Acs.ACSHandle_t acsHandle, Acs.PrivateData_t privData, Csta.ConnectionID_t cId) { var u2uString = "Hello, I AM test u2u string"; var u2uInfo = new Att.ATTUserToUserInfo_t(); // fixed u2u size int u2uSize = Att.ATT_MAX_UUI_SIZE; u2uInfo.length = (short)u2uString.Length; u2uInfo.type = Att.ATTUUIProtocolType_t.UUI_IA5_ASCII; u2uInfo.value = System.Text.Encoding.ASCII.GetBytes(u2uString); Array.Resize(ref u2uInfo.value, u2uSize); Att.attV6ClearConnection(privData, Att.ATTDropResource_t.DR_NONE, ref u2uInfo); Csta.EventBuffer_t evtBuf = new Csta.EventBuffer_t(); Acs.InvokeID_t invokeId = new Acs.InvokeID_t(); Acs.RetCode_t retCode = Csta.cstaClearConnection(acsHandle, invokeId, cId, privData); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("cstaClearConnection error: " + retCode); return null; } privData.length = Att.ATT_MAX_PRIVATE_DATA; ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents; retCode = Acs.acsGetEventBlock(acsHandle, evtBuf, ref eventBufSize, privData, out numEvents); if (retCode._value < 0) { System.Windows.Forms.MessageBox.Show("acsGetEventBlock error: " + retCode); return null; } return evtBuf; }
public static extern Acs.RetCode_t attSetBillRate( [In, Out] Acs.PrivateData_t privateData, Csta.ConnectionID_t call, Att.ATTBillType_t billType, float billrate);
public static extern Acs.RetCode_t attSendDTMFToneExt( [In, Out] Acs.PrivateData_t privateData, Csta.ConnectionID_t sender, ref ATTConnIDList_t receivers, string tones, short toneDuration, short pauseDuration);
public static extern Acs.RetCode_t cstaSetDoNotDisturb( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, ref Csta.DeviceID_t device, bool doNotDisturb, Acs.PrivateData_t privateData);
public static extern Acs.RetCode_t attV6SupervisorAssistCall( [In, Out] Acs.PrivateData_t privData, ref Csta.DeviceID_t deviceRoute, ref ATTUserToUserInfo_t userInfo);
public static extern Acs.RetCode_t attV6MakeCall( [In, Out] Acs.PrivateData_t privateData, ref Csta.DeviceID_t destRoute, bool priorityCalling, ref ATTUserToUserInfo_t userInfo);
public static extern Acs.RetCode_t attV10QueryStationStatus( [In, Out] Acs.PrivateData_t privateData, ref Csta.DeviceID_t device);
public static extern Acs.RetCode_t attQueryAgentLogin( [In, Out] Acs.PrivateData_t privateData, ref Csta.DeviceID_t device);
public static extern Acs.RetCode_t attConsultationCall( [In, Out] Acs.PrivateData_t privData, ref Csta.DeviceID_t deviceRoute, bool priorityCalling, ref ATTV5UserToUserInfo_t userInfo);
public static extern Acs.RetCode_t cstaTransferCall( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, Csta.ConnectionID_t heldCall, Csta.ConnectionID_t activeCall, Acs.PrivateData_t privateData);
public static extern Acs.RetCode_t cstaSnapshotDeviceReq( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, ref Csta.DeviceID_t snapshotObj, Acs.PrivateData_t privateData);
public static extern Acs.RetCode_t cstaSetMsgWaitingInd( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, ref Csta.DeviceID_t device, bool messages, Acs.PrivateData_t privateData);
public static extern Acs.RetCode_t attSingleStepConferenceCall( [In, Out] Acs.PrivateData_t privateData, Csta.ConnectionID_t activeCall, ref Csta.DeviceID_t deviceToBeJoin, Att.ATTParticipationType_t participationType, bool alertDestination);
public static extern Acs.RetCode_t attQueryDeviceName( [In, Out] Acs.PrivateData_t privateData, ref Csta.DeviceID_t split);
public static extern Acs.RetCode_t attSingleStepTransferCall( [In, Out] Acs.PrivateData_t privateData, Csta.ConnectionID_t activeCall, ref Csta.DeviceID_t transferredTo);
public static extern Acs.RetCode_t attQueryEndpointRegistrationInfo( [In, Out] Acs.PrivateData_t privateData, ref Csta.DeviceID_t device);
public static extern Acs.RetCode_t attV6DirectAgentCall( [In, Out] Acs.PrivateData_t privData, ref Csta.DeviceID_t split, bool priorityCalling, ref ATTUserToUserInfo_t userInfo);
public static Att.ATTUCID_t[] GetUcid(Csta.DeviceID_t device) { Acs.ACSHandle_t acsHandle; Acs.InvokeID_t invokeId; // Set PrivateData request var privData = new Acs.PrivateData_t(); privData.vendor = "VERSION"; privData.data = new byte[1024]; privData.data[0] = Acs.PRIVATE_DATA_ENCODING; // Get supportedVersion string string requestedVersion = "3-7"; // Private Data version request System.Text.StringBuilder supportedVersion = new System.Text.StringBuilder(); Acs.RetCode_t attrc = Att.attMakeVersionString(requestedVersion, supportedVersion); //Console.WriteLine("attrc = " + attrc + "; supportedVersion = " + supportedVersion); for (int i = 0; i < supportedVersion.Length; i++) { privData.data[i + 1] = (byte)supportedVersion[i]; } privData.length = Att.ATT_MAX_PRIVATE_DATA; Acs.RetCode_t retCode = OpenStream(out acsHandle, out invokeId, ref privData); //Console.WriteLine("acsOpenStream retCode = " + retCode + ", Handle = " + acsHandle.ToString()); retCode = Csta.cstaSnapshotDeviceReq(acsHandle, invokeId, ref device, ref privData); privData.length = Att.ATT_MAX_PRIVATE_DATA; Csta.CSTAEvent_t evt = new Csta.CSTAEvent_t(); ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents = 0; retCode = Acs.acsGetEventBlock(acsHandle, out evt, ref eventBufSize, ref privData, out numEvents); int callCount = evt.cstaConfirmation.snapshotDevice.snapshotData.count; Csta.ConnectionID_t[] connections = new Csta.ConnectionID_t[callCount]; for (int i = 0; i < evt.cstaConfirmation.snapshotDevice.snapshotData.count; i++) { connections[i] = evt.cstaConfirmation.snapshotDevice.snapshotData.info[i].callIdentifier; } if (callCount > 0) { //Console.WriteLine(evt.cstaConfirmation.snapshotDevice.snapshotData); //Console.WriteLine(evt.cstaConfirmation.snapshotDevice.snapshotData.info[1].localCallState); Att.ATTUCID_t[] ucids = new Att.ATTUCID_t[callCount]; for (int i = 0; i < callCount; i++) { //Csta.ConnectionID_t connection = evt.cstaConfirmation.snapshotDevice.snapshotData.info[i].callIdentifier; retCode = Att.attQueryUCID(ref privData, ref connections[i]); //Console.WriteLine("attQueryUCID retCode = " + retCode); //Console.WriteLine("privData.Length = " + privData.length); retCode = Csta.cstaEscapeService(acsHandle, invokeId, ref privData); //Console.WriteLine("cstaEscapeService retCode = " + retCode); //Console.WriteLine("privData.Length = " + privData.length); // Set private data length (we'll have to call GetEventBlock otherwise) privData.length = Att.ATT_MAX_PRIVATE_DATA; retCode = Acs.acsGetEventBlock(acsHandle, out evt, ref eventBufSize, ref privData, out numEvents); //Console.WriteLine("acsGetEventBlock retCode = " + retCode + " Buffer size = " + eventBufSize + ", numEvents = " + numEvents); //Console.WriteLine("eventClass = " + evt.eventHeader.eventClass); //Console.WriteLine("eventType = " + evt.eventHeader.eventType); //Console.WriteLine("privData.Length = " + privData.length); // Decode ATTPrivateData Att.ATTEvent_t attevt; retCode = Att.attPrivateData(ref privData, out attevt); ucids[i] = attevt.queryUCID.ucid; //Console.WriteLine("attPrivateData retCode = " + retCode); //Console.WriteLine("privData.Length = " + privData.length); //Console.WriteLine("ATTeventType = " + attevt.eventType); //Console.WriteLine("ucid #{0} = {1}", i + 1, attevt.queryUCID.ucid); } Acs.acsAbortStream(acsHandle, out privData); return(ucids); } else { Console.WriteLine("No active calls"); Acs.acsAbortStream(acsHandle, out privData); return(new Att.ATTUCID_t[0]); } }
public static extern Acs.RetCode_t attV6MakePredictiveCall( [In, Out] Acs.PrivateData_t privateData, bool priorityCalling, short maxRings, ATTAnswerTreat_t answerTreat, ref Csta.DeviceID_t destRoute, ref ATTUserToUserInfo_t userInfo);
private Csta.EventBuffer_t snapshotCall(Csta.ConnectionID_t cId) { Csta.EventBuffer_t evtBuf = new Csta.EventBuffer_t(); Acs.InvokeID_t invokeId = new Acs.InvokeID_t(); Acs.RetCode_t retCode = Csta.cstaSnapshotCallReq(this.acsHandle, invokeId, cId, this.privData); if (retCode._value < 0) { MessageBox.Show("cstaSnapshotCallReq error: " + retCode); return null; } this.privData.length = Att.ATT_MAX_PRIVATE_DATA; ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents; retCode = Acs.acsGetEventBlock(this.acsHandle, evtBuf, ref eventBufSize, privData, out numEvents); if (retCode._value < 0) { MessageBox.Show("acsGetEventBlock error: " + retCode); return null; } if (evtBuf.evt.eventHeader.eventClass.eventClass != Csta.CSTACONFIRMATION || evtBuf.evt.eventHeader.eventType.eventType != Csta.CSTA_SNAPSHOT_CALL_CONF) { if (evtBuf.evt.eventHeader.eventClass.eventClass == Csta.CSTACONFIRMATION && evtBuf.evt.eventHeader.eventType.eventType == Csta.CSTA_UNIVERSAL_FAILURE_CONF) { MessageBox.Show("Snapshot call failed. Error: " + evtBuf.evt.cstaConfirmation.universalFailure.error); } } return evtBuf; }
public static extern Acs.RetCode_t cstaSetAgentState( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, ref Csta.DeviceID_t device, AgentMode_t agentMode, AgentID_t agentID, AgentGroup_t agentGroup, AgentPassword_t agentPassword, Acs.PrivateData_t privateData);
public static extern Acs.RetCode_t cstaRouteSelectInv( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, RouteRegisterReqID_t routeRegisterReqID, RoutingCrossRefID_t routingCrossRefID, ref Csta.DeviceID_t routeSelected, RetryValue_t remainRetry, ref SetUpValues_t setupInformation, bool routeUsedReq, Acs.PrivateData_t privateData);
public static extern Acs.RetCode_t attQueryTrunkGroup( [In, Out] Acs.PrivateData_t privateData, ref Csta.DeviceID_t device);
public static extern Acs.RetCode_t cstaSetForwarding( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, ref Csta.DeviceID_t device, ForwardingType_t forwardingType, bool forwardingOn, ref Csta.DeviceID_t forwardingDestination, Acs.PrivateData_t privateData);
private Csta.ConnectionID_t[] GetCurrentConnections(Csta.DeviceID_t device) { if (!this.configured) { MessageBox.Show("Application is not configured"); this.mainTabs.SelectTab(configTab); return null; } if (!streamCheckbox.Checked || deviceTextBox.Text.Length == 0 || deviceTextBox.Text.Length > 5 || !streamCheckbox.Checked) { return null; } Csta.DeviceID_t currentDevice = device; Acs.InvokeID_t invokeId = new Acs.InvokeID_t(); Acs.RetCode_t retCode = Csta.cstaSnapshotDeviceReq(this.acsHandle, invokeId, ref currentDevice, privData); if (retCode._value < 0) { MessageBox.Show("cstaSnapshotDeviceReq error: " + retCode); return null; } var evtBuf = new Csta.EventBuffer_t(); this.privData.length = Att.ATT_MAX_PRIVATE_DATA; ushort eventBufSize = Csta.CSTA_MAX_HEAP; ushort numEvents; retCode = Acs.acsGetEventBlock(this.acsHandle, evtBuf, ref eventBufSize, privData, out numEvents); if (retCode._value != Acs.ACSPOSITIVE_ACK) { MessageBox.Show("acsGetEventBlock error: " + retCode); return null; } if (evtBuf.evt.eventHeader.eventClass.eventClass != Csta.CSTACONFIRMATION || evtBuf.evt.eventHeader.eventType.eventType != Csta.CSTA_SNAPSHOT_DEVICE_CONF) { if (evtBuf.evt.eventHeader.eventClass.eventClass == Csta.CSTACONFIRMATION && evtBuf.evt.eventHeader.eventType.eventType == Csta.CSTA_UNIVERSAL_FAILURE_CONF) { MessageBox.Show("Snapshot device failed. Error: " + evtBuf.evt.cstaConfirmation.universalFailure.error); } return null; } int callCount = evtBuf.evt.cstaConfirmation.snapshotDevice.snapshotData.count; Csta.ConnectionID_t[] conns = new Csta.ConnectionID_t[callCount]; for (int i = 0; i < callCount; i++) { var snapDeviceInfoArray = (Csta.CSTASnapshotDeviceResponseInfo_t[])evtBuf.auxData["snapDeviceInfo"]; conns[i] = snapDeviceInfoArray[i].callIdentifier; } return conns; }
public static extern Acs.RetCode_t attQueryUCID( [In, Out] Acs.PrivateData_t privData, Csta.ConnectionID_t call);
public static extern Acs.RetCode_t attSelectiveListeningRetrieve( [In, Out] Acs.PrivateData_t privateData, Csta.ConnectionID_t subjectConnection, bool allParties, Csta.ConnectionID_t selectedParty);
public static extern Acs.RetCode_t cstaRouteRegisterReq( Acs.ACSHandle_t acsHandle, Acs.InvokeID_t invokeID, ref Csta.DeviceID_t routingDevice, Acs.PrivateData_t privateData);