Example #1
0
        private void DialNow()
        {
            //QsysPotsControllerEvent(this, new QsysEventsArgs(eQscEventIds.PotsControllerDialString, cName, false, 0, string.Empty, null));

            if (onDialingEvent != null)
            {
                onDialStringEvent(string.Empty);
            }

            ComponentChangeString dialNumber = new ComponentChangeString()
            {
                Params = new ComponentChangeParamsString()
                {
                    Name     = cName,
                    Controls = new List <ComponentSetValueString>()
                    {
                        new ComponentSetValueString()
                        {
                            Name = "call_number", Value = currentlyCalling
                        }
                    }
                }
            };

            QsysCoreManager.Cores[coreId].Enqueue(JsonConvert.SerializeObject(dialNumber, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));

            ComponentChange dial = new ComponentChange()
            {
                Params = new ComponentChangeParams()
                {
                    Name     = cName,
                    Controls = new List <ComponentSetValue>()
                    {
                        new ComponentSetValue()
                        {
                            Name = "call_connect", Value = 1
                        }
                    }
                }
            };

            QsysCoreManager.Cores[coreId].Enqueue(JsonConvert.SerializeObject(dial, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));
        }
Example #2
0
        public void Dial()
        {
            currentlyCalling = dialString.ToString();
            dialString.Remove(0, dialString.Length);

            QsysPotsControllerEvent(this, new QsysEventsArgs(eQscEventIds.PotsControllerDialString, cName, false, 0, string.Empty, null));

            ComponentChangeString dialNumber = new ComponentChangeString();

            dialNumber.Params = new ComponentChangeParamsString();

            dialNumber.Params.Name = cName;

            ComponentSetValueString dialStringSetValue = new ComponentSetValueString();

            dialStringSetValue.Name  = "call_number";
            dialStringSetValue.Value = currentlyCalling;

            dialNumber.Params.Controls = new List <ComponentSetValueString>();
            dialNumber.Params.Controls.Add(dialStringSetValue);

            QsysProcessor.Enqueue(JsonConvert.SerializeObject(dialNumber, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));

            ComponentChange dial = new ComponentChange();

            dial.Params = new ComponentChangeParams();

            dial.Params.Name = cName;

            ComponentSetValue dialSetValue = new ComponentSetValue();

            dialSetValue.Name  = "call_connect";
            dialSetValue.Value = 1;

            dial.Params.Controls = new List <ComponentSetValue>();
            dial.Params.Controls.Add(dialSetValue);

            QsysProcessor.Enqueue(JsonConvert.SerializeObject(dial, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));
        }
Example #3
0
        public void SetDialString(string _dialString)
        {
            ComponentChangeString cc = new ComponentChangeString()
            {
                Params = new ComponentChangeParamsString()
                {
                    Name = this.componentName
                }
            };
            ComponentSetValueString ccv = new ComponentSetValueString {
                Name = "call_number", Value = _dialString
            };

            cc.Params.Controls = new List <ComponentSetValueString>()
            {
                ccv
            };
            this.myCore.SendDebug(string.Format("Component {0} :: SetDialString - {1}", this.componentName));
            this.myCore.Enqueue(JsonConvert.SerializeObject(cc));
        }