Exemple #1
0
        public void Run(params string[] args)
        {
            DN   dn    = PhoneSystem.Root.GetDNByNumber(args[1]);
            bool found = false;

            foreach (var ac in dn.GetActiveConnections())
            {
                PhoneSystem.Root.DropCall(ac);
                found = true;
            }
            if (!found)
            {
                Console.WriteLine(args[2] + " does not participate in call " + args[1]);
            }
        }
        public void Run(params string[] args)
        {
            DN dn = PhoneSystem.Root.GetDNByNumber(args[2]);

            ActiveConnection[] conns = dn.GetActiveConnections();
            bool found = false;

            foreach (ActiveConnection ac in conns)
            {
                if (ac.CallID == int.Parse(args[1]) && ac.Status == ConnectionStatus.Connected)
                {
                    PhoneSystem.Root.TransferCall(ac, args[3]);
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                Console.WriteLine(args[2] + " does not participate in call " + args[1] + " or call is in incorrect state");
            }
        }
Exemple #3
0
        public void Run(params string[] args)
        {
            DN dn = PhoneSystem.Root.GetDNByNumber(args[2]);

            ActiveConnection[] conns = dn.GetActiveConnections();
            bool found = false;

            foreach (ActiveConnection ac in conns)
            {
                if (ac.CallID == int.Parse(args[1]) && ac.Status == ConnectionStatus.Ringing)
                {
                    PhoneSystem.Root.DivertCall(ac, args[3], (args.Length > 4 && System.Convert.ToInt32(args[4]) == 1) ? true : false);
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                Console.WriteLine(args[2] + " does not participate in call " + args[1] + " or call is in incorrect state");
            }
        }
Exemple #4
0
        public void Run(params string[] args)
        {
            DN dn = PhoneSystem.Root.GetDNByNumber(args[2]);

            ActiveConnection[] conns = dn.GetActiveConnections();
            bool found = false;

            foreach (ActiveConnection ac in conns)
            {
                if (ac.CallID == int.Parse(args[1]) && ac.Status == ConnectionStatus.Connected)
                {
                    PBXConnection pbx = Utilities.CreatePbxConn();
                    pbx.RecordCall(System.Convert.ToInt32(args[1]), args[2], System.Convert.ToInt32(args[3]) != 0);
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                Console.WriteLine(args[2] + " does not participate in call " + args[1] + " or call is in incorrect state");
            }
        }