Esempio n. 1
0
        private static void Mc_AgentConnect(object sender, AsterNET.Manager.Event.AgentConnectEvent e)
        {
            string username = "";
            string url = "/FindClients/068";// + e.A

            SignalRProxySingleton.CurrentInstance.Invoke("SendFrameRequest", "", " /FindClients/068");
        }
Esempio n. 2
0
        static void ari_OnStasisStartEvent(object sender, AsterNET.ARI.Models.StasisStartEvent e)
        {
            Console.WriteLine("Channel {0} has entered the application", e.Channel.Id);
            _ari.Channels.Ring(e.Channel.Id);
            Thread.Sleep(2000);     // wait 2 seconds
            Console.WriteLine("Answering channel {0}", e.Channel.Id);

            _ari.Channels.Answer(e.Channel.Id);
            _ari.Channels.StartSilence(e.Channel.Id);
            Thread.Sleep(4000);     // wait 4 seconds

            Console.WriteLine("hanging up channel {0}", e.Channel.Id);
            _ari.Channels.Hangup(e.Channel.Id);
        }
Esempio n. 3
0
        private void Conn_UserEvents(object sender, AsterNET.Manager.Event.UserEvent e)
        {
            string signalr_url = ConfigurationManager.AppSettings["HubUrl"];
            string signalr_hub_name = ConfigurationManager.AppSettings["HubName"];
            HubConnection conn = new HubConnection(signalr_url);
            IHubProxy pr = conn.CreateHubProxy(signalr_hub_name);
            conn.Start().GetAwaiter().GetResult();

            pr.Invoke("TestSignalR", e.ToString());

            pr.On("test_1par_string", new Action<string>((test_text) =>
            {
                System.Diagnostics.Debug.Write(test_text);
            }));
        }
Esempio n. 4
0
        static void c_OnStasisEndEvent(object sender, AsterNET.ARI.Models.StasisEndEvent e)
        {
            // remove from bridge
            ActionClient.Bridges.RemoveChannel(SimpleBridge.Id, e.Channel.Id);

            // hangup
            ActionClient.Channels.Hangup(e.Channel.Id, "normal");
        }
Esempio n. 5
0
 private static void Mc_UserEvents(object sender, AsterNET.Manager.Event.UserEvent e)
 {
     Console.WriteLine("USER EVENT");
 }
Esempio n. 6
0
 private static void Mc_AgentConnect(object sender, AsterNET.Manager.Event.AgentConnectEvent e)
 {
     Console.Write("AGENT CONNECTED");
 }
Esempio n. 7
0
 private static void Mc_AgentCalled(object sender, AsterNET.Manager.Event.AgentCalledEvent e)
 {
     Console.Write("AGENT CALLED");
 }
Esempio n. 8
0
 private static void Mc_AgentCalled(object sender, AsterNET.Manager.Event.AgentCalledEvent e)
 {
     calledEvents.Add(e);
 }
Esempio n. 9
0
 private void ActionClient_OnStasisStartEvent(IAriClient sender, AsterNET.ARI.Models.StasisStartEvent e)
 {
     throw new System.NotImplementedException();
 }
Esempio n. 10
0
        static void c_OnStasisStartEvent(object sender, AsterNET.ARI.Models.StasisStartEvent e)
        {
            // answer channel
            actionClient.Channels.Answer(e.Channel.Id);

            GetRecording(e.Channel);
        }
Esempio n. 11
0
        static void c_OnStasisEndEvent(object sender, AsterNET.ARI.Models.StasisEndEvent e)
        {
            // Delete recording
            actionClient.Recordings.DeleteStored("temp-recording");

            // hangup
            actionClient.Channels.Hangup(e.Channel.Id, "normal");
        }
Esempio n. 12
0
        static void ActionClientOnRecordingFinishedEvent(object sender, AsterNET.ARI.Models.RecordingFinishedEvent e)
        {
            if (e.Recording.Name != recording.Recording.Name) return;

            PlaybackRecording(recording.Channel);

            GetRecording(recording.Channel);
        }
Esempio n. 13
0
 static void ari_OnStasisEndEvent(object sender, AsterNET.ARI.Models.StasisEndEvent e)
 {
     Console.WriteLine("Channel {0} just left our application", e.Channel.Id);
 }
Esempio n. 14
0
 static void ari_OnChannelStateChangeEvent(object sender, AsterNET.ARI.Models.ChannelStateChangeEvent e)
 {
     Console.WriteLine("Channel {0} is now {1}", e.Channel.Id, e.Channel.State);
 }
Esempio n. 15
-1
        static void c_OnStasisStartEvent(object sender, AsterNET.ARI.Models.StasisStartEvent e)
        {
            // answer channel
            ActionClient.Channels.Answer(e.Channel.Id);

            // add to bridge
            ActionClient.Bridges.AddChannel(SimpleBridge.Id, e.Channel.Id, "member");
        }