Esempio n. 1
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. 2
0
        private static void c_OnStasisStartEvent(object sender, StasisStartEvent e)
        {
            if (e.Application != AppConfig.AppName) return;
            var failed = true;
            if (e.Args.Count == 0)
                Client.Channels.SetChannelVar(e.Channel.Id, "CONFEXIT", "NOTFOUND");

            var confId = e.Args[0];
            var conf = Conference.Conferences.SingleOrDefault(x => x.ConferenceName == confId);
            if (conf == null)
                Client.Channels.SetChannelVar(e.Channel.Id, "CONFEXIT", "NOTFOUND");
            else
                if (!conf.AddUser(e.Channel))
                    Client.Channels.SetChannelVar(e.Channel.Id, "CONFEXIT", "CANTJOIN");
                else
                {
                    Debug.Print("Added channel {0} to {1}", e.Channel.Id, confId);
                    failed = false;
                }

            if(failed)
                Client.Channels.ContinueInDialplan(e.Channel.Id,
                    e.Channel.Dialplan.Context,
                    e.Channel.Dialplan.Exten,
                    (int)e.Channel.Dialplan.Priority++);
        }
Esempio n. 3
0
        private static void c_OnStasisStartEvent(IAriClient sender, StasisStartEvent e)
        {
			// Answer the channel
			sender.Channels.Answer(e.Channel.Id);

			// Play an announcement
			sender.Channels.Play(e.Channel.Id, "sound:hello-world");
        }
Esempio n. 4
0
        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");
        }