Esempio n. 1
0
        public void Run(params string[] args)
        {
            DN            dn    = PhoneSystem.Root.GetDNByNumber(args[1]);
            bool          found = false;
            PBXConnection pbx   = Utilities.CreatePbxConn();

            foreach (var ac in dn.GetActiveConnections())
            {
                pbx.DropCall(ac);
                found = true;
            }
            if (!found)
            {
                Console.WriteLine(args[2] + " does not participate in call " + args[1]);
            }
        }
Esempio n. 2
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]))
                {
                    PBXConnection pbx = Utilities.CreatePbxConn();
                    pbx.DropCall(System.Convert.ToInt32(args[1]), args[2]);
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                Console.WriteLine(args[2] + " does not participate in call " + args[1]);
            }
        }