Ejemplo n.º 1
0
 public override string OnStartScript(CallButlerScriptContext scriptContext)
 {
     return Properties.Resources.Conference_Bridge_Script;
 }
Ejemplo n.º 2
0
 public override string OnStartScript(CallButlerScriptContext scriptContext)
 {
     return Properties.Resources.ExternalDialtoneModuleScript;
 }
Ejemplo n.º 3
0
        public override void OnExternalAction(CallButlerScriptContext scriptContext, string command, string commandData)
        {
            if (command == "JoinConference")
            {
                int participants = 0;

                if (conferences.ContainsKey(commandData))
                {
                    participants = conferences[commandData].Count;
                }
                else
                {
                    conferences[commandData] = new List<CallButlerScriptContext>();
                }

                conferences[commandData].Add(scriptContext);

                scriptContext.SetScriptVariable("NumberInConference", participants.ToString());
            }
            else if (command == "PersonJoining")
            {
                if (conferences.ContainsKey(commandData))
                {
                    // Loop through the conferences and play our joining sound
                    List<CallButlerScriptContext> participants = conferences[commandData];

                    for (int index = 0; index < participants.Count; index++)
                    {
                        participants[index].SignalExternalScriptEvent("PersonJoining");
                    }
                }
            }
            else if (command == "LeaveConference")
            {
                if (conferences.ContainsKey(commandData))
                {
                    if (conferences[commandData].Contains(scriptContext))
                    {
                        conferences[commandData].Remove(scriptContext);

                        // Loop through the conferences and play our leaving sound
                        List<CallButlerScriptContext> participants = conferences[commandData];

                        for (int index = 0; index < participants.Count; index++)
                        {
                            participants[index].SignalExternalScriptEvent("PersonLeaving");
                        }
                    }

                    if (conferences[commandData].Count == 0)
                    {
                        conferences[commandData].Clear();

                        conferences.Remove(commandData);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public override void OnExternalAction(CallButlerScriptContext scriptContext, string command, string commandData)
        {
            if (command == "ValidatePasscode")
            {
                // Check on the passcode
                foreach (string passcode in Properties.Settings.Default.Passcodes)
                {
                    if (passcode == commandData)
                        scriptContext.SignalExternalScriptEvent("ValidPasscode");
                }

                scriptContext.SignalExternalScriptEvent("InvalidPasscode");
            }
        }
Ejemplo n.º 5
0
 public virtual void OnExternalAction(CallButlerScriptContext scriptContext, string command, string commandData)
 {
 }
Ejemplo n.º 6
0
 public virtual string OnStartScript(CallButlerScriptContext scriptContext)
 {
     return(null);
 }
 public virtual string OnStartScript(CallButlerScriptContext scriptContext)
 {
     return null;
 }
 public virtual void OnExternalAction(CallButlerScriptContext scriptContext, string command, string commandData)
 {
 }