Example #1
0
        ///<summary>Sets the phone to the default queue for the employee passed in in regards to the phoneempdefault table.
        ///Will correctly put the phone into the Triage ring group if the PhoneEmpDefault has been flagged as IsTriageOperator
        ///This method does nothing if there is no corresponding phoneempdefault row for the employee passed in.</summary>
        public static void SetToDefaultQueue(PhoneEmpDefault phoneEmpDefault)
        {
            //No need to check RemotingRole; no call to db.
            if (phoneEmpDefault == null)
            {
                return;
            }
            //If the employee was set to triage, do not set them to their default queue, instead set them to the triage queue.
            AsteriskQueues defaultQueue = (phoneEmpDefault.IsTriageOperator ? AsteriskQueues.Triage : phoneEmpDefault.RingGroups);

            PhoneAsterisks.SetQueueForExtension(phoneEmpDefault.PhoneExt, defaultQueue);
        }
Example #2
0
        public static void SetQueueForExtension(int extension, AsteriskQueues asteriskQueue)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), extension, asteriskQueue);
                return;
            }
            //Update the phone table so that the PhoneTrackingServer knows what queue to put this extension into.
            string command = "UPDATE phone SET RingGroups=" + POut.Int((int)asteriskQueue) + " "
                             + "WHERE Extension=" + POut.Int(extension);

            Db.NonQ(command);
            //Create a custom signalod so that the queue system (new way of doing ring groups) knows how to handle this extension.
            Signalods.SetInvalid(InvalidType.PhoneAsteriskReload, KeyType.PhoneExtension, (long)extension);
        }