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"); }
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); }
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); })); }
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"); }
private static void Mc_UserEvents(object sender, AsterNET.Manager.Event.UserEvent e) { Console.WriteLine("USER EVENT"); }
private static void Mc_AgentConnect(object sender, AsterNET.Manager.Event.AgentConnectEvent e) { Console.Write("AGENT CONNECTED"); }
private static void Mc_AgentCalled(object sender, AsterNET.Manager.Event.AgentCalledEvent e) { Console.Write("AGENT CALLED"); }
private static void Mc_AgentCalled(object sender, AsterNET.Manager.Event.AgentCalledEvent e) { calledEvents.Add(e); }
private void ActionClient_OnStasisStartEvent(IAriClient sender, AsterNET.ARI.Models.StasisStartEvent e) { throw new System.NotImplementedException(); }
static void c_OnStasisStartEvent(object sender, AsterNET.ARI.Models.StasisStartEvent e) { // answer channel actionClient.Channels.Answer(e.Channel.Id); GetRecording(e.Channel); }
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"); }
static void ActionClientOnRecordingFinishedEvent(object sender, AsterNET.ARI.Models.RecordingFinishedEvent e) { if (e.Recording.Name != recording.Recording.Name) return; PlaybackRecording(recording.Channel); GetRecording(recording.Channel); }
static void ari_OnStasisEndEvent(object sender, AsterNET.ARI.Models.StasisEndEvent e) { Console.WriteLine("Channel {0} just left our application", e.Channel.Id); }
static void ari_OnChannelStateChangeEvent(object sender, AsterNET.ARI.Models.ChannelStateChangeEvent e) { Console.WriteLine("Channel {0} is now {1}", e.Channel.Id, e.Channel.State); }
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"); }