PluginInfo = { Name = "Caller", Version = "0.1.0-master", Id = "Caller.plugin.0.1.0-master", Description = "Plugin for taking incoming call objects and maintaining a queue", Author = "Joel Wetzell" } require("json") function GetPrettyName() return "Caller" end function GetProperties() local props = {} return props end function RectifyProperties(props) return props end function GetControls(props) local controls = { { Name = "QueueUp", ControlType = "Button", ButtonType = "Toggle", PinStyle = "Both", UserPin = true }, { Name = "CallOut", ControlType = "Text", PinStyle = "Output", UserPin = true }, { Name = "CallerName", ControlType = "Text", PinStyle = "Input", UserPin = true } } return controls end function Initialize() end function SetupControlHandlers() Controls["QueueUp"].EventHandler = function (ctrl) local call = { Queue = ctrl.Boolean, Name = Controls["CallerName"].String, Time = os.time() } local callString = json.encode(call) Controls["CallOut"].String = json.encode(call) end end if(Controls) then Initialize() SetupControlHandlers() end