Example #1
1
        static void Main(string[] args)
        {
            try
            {
                endPoint = new StasisEndpoint("ipaddress", 8088, "username", "password");

                // Create a message actionClient to receive events on
                actionClient = new AriClient(endPoint, "playrec_test");

                actionClient.OnStasisStartEvent += c_OnStasisStartEvent;
                actionClient.OnStasisEndEvent += c_OnStasisEndEvent;
                actionClient.OnRecordingFinishedEvent += ActionClientOnRecordingFinishedEvent;

                actionClient.Connect();

                bool done = false;
                while (!done)
                {
                    var lastKey = Console.ReadKey();
                    switch (lastKey.KeyChar.ToString())
                    {
                        case "*":
                            done = true;
                            break;
                    }
                }

                actionClient.Disconnect();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                Console.ReadKey();
            }
        }
Example #2
0
        public void DoWork()
        {
            ActionClient = new AriClient(new StasisEndpoint("10.100.3.44", 8088, "asterisk", "heslox"), "wcf-service");

            ActionClient.OnStasisStartEvent += ActionClient_OnStasisStartEvent;
            ActionClient.OnStasisEndEvent += ActionClient_OnStasisEndEvent;

            ActionClient.Connect();
        }