Exemplo 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");
        }
Exemplo 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);
        }
Exemplo 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);
            }));
        }
Exemplo 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");
        }
Exemplo n.º 5
0
 private static void Mc_UserEvents(object sender, AsterNET.Manager.Event.UserEvent e)
 {
     Console.WriteLine("USER EVENT");
 }
Exemplo n.º 6
0
 private static void Mc_AgentConnect(object sender, AsterNET.Manager.Event.AgentConnectEvent e)
 {
     Console.Write("AGENT CONNECTED");
 }
Exemplo n.º 7
0
 private static void Mc_AgentCalled(object sender, AsterNET.Manager.Event.AgentCalledEvent e)
 {
     Console.Write("AGENT CALLED");
 }
Exemplo n.º 8
0
 private static void Mc_AgentCalled(object sender, AsterNET.Manager.Event.AgentCalledEvent e)
 {
     calledEvents.Add(e);
 }
Exemplo n.º 9
0
 private void ActionClient_OnStasisStartEvent(IAriClient sender, AsterNET.ARI.Models.StasisStartEvent e)
 {
     throw new System.NotImplementedException();
 }
Exemplo 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);
        }
Exemplo 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");
        }
Exemplo 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);
        }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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");
        }