public AutoDialerProcessor(Telecom.TelecomProviderBase telecomProvider, TelecomScriptInterface tsInterface, string jobID, string callID, string scriptToRun, string answeringMachineScriptToRun, string answeringMachineDetectionSettings, int timeout, System.Collections.Specialized.NameValueCollection scriptVariables, CallButler.Service.Plugin.CallButlerDialerPlugin dialerPlugin) { this.callID = callID; this.jobID = jobID; this.scriptLocation = scriptToRun; this.answeringMachineScriptLocation = answeringMachineScriptToRun; this.answeringMachineDetectionSettings = answeringMachineDetectionSettings; this.scriptVariables = scriptVariables; this.dialerPlugin = dialerPlugin; this.tsInterface = tsInterface; this.telecomProvider = telecomProvider; timeoutTimer = new System.Threading.Timer(new System.Threading.TimerCallback(TimeoutTimerProc), this, timeout * 1000, System.Threading.Timeout.Infinite); }
public AutoDialerProcessor(Telecom.TelecomProviderBase telecomProvider, TelecomScriptInterface tsInterface, string jobID, string callID, string scriptToRun, string answeringMachineScriptToRun, string answeringMachineDetectionSettings, int timeout, System.Collections.Specialized.NameValueCollection scriptVariables, CallButler.Service.Plugin.CallButlerDialerPlugin dialerPlugin) { this.callID = callID; this.jobID = jobID; this.scriptLocation = scriptToRun; this.answeringMachineScriptLocation = answeringMachineScriptToRun; this.answeringMachineDetectionSettings = answeringMachineDetectionSettings; this.scriptVariables = scriptVariables; this.dialerPlugin = dialerPlugin; this.tsInterface = tsInterface; this.telecomProvider = telecomProvider; timeoutTimer = new System.Threading.Timer(new System.Threading.TimerCallback(TimeoutTimerProc), this, timeout * 1000, System.Threading.Timeout.Infinite); }
public bool PlaceOutboundCall(string jobID, string callID, WOSI.CallButler.Data.CallButlerDataset.ProvidersRow provider, string callTo, string fromCallerID, string fromCallerNumber, string scriptToRun, string answeringMachineScriptToRun, string answeringMachineDetectionSettings, System.Collections.Specialized.NameValueCollection scriptVariables, int timeout, CallButler.Service.Plugin.CallButlerDialerPlugin dialerPlugin) { if (File.Exists(scriptToRun)) { int openLine = FindAndHoldOpenLine(); if (openLine != 0) { tsInterfaces[openLine].ScriptProcessor = new AutoDialerProcessor(telecomProvider, tsInterfaces[openLine], jobID, callID, scriptToRun, answeringMachineScriptToRun, answeringMachineDetectionSettings, timeout, scriptVariables, dialerPlugin); // Place our outbound call telecomProvider.Call(openLine, callTo, fromCallerID, fromCallerNumber, false, provider); return(true); } else { if (dialerPlugin != null) { dialerPlugin.OnCallStatus(jobID, callID, CallButler.Service.Plugin.CallButlerDialerPlugin.CallStatus.NoLinesAvailable); } } } else { if (dialerPlugin != null) { dialerPlugin.OnError(jobID, callID, "Could not find the script located at '" + scriptToRun + "'"); } } return(false); }
public bool PlaceOutboundCall(string jobID, string callID, string providerName, string callTo, string fromCallerID, string fromCallerNumber, string scriptToRun, string answeringMachineScriptToRun, string answeringMachineDetectionSettings, System.Collections.Specialized.NameValueCollection scriptVariables, int timeout, CallButler.Service.Plugin.CallButlerDialerPlugin dialerPlugin) { WOSI.CallButler.Data.CallButlerDataset.ProvidersRow[] providers = (WOSI.CallButler.Data.CallButlerDataset.ProvidersRow[])dataProvider.GetProviders(Properties.Settings.Default.CustomerID).Select("Name = '" + providerName + "'"); WOSI.CallButler.Data.CallButlerDataset.ProvidersRow provider = null; if (providers.Length > 0) { provider = providers[0]; } return(PlaceOutboundCall(jobID, callID, provider, callTo, fromCallerID, fromCallerNumber, scriptToRun, answeringMachineScriptToRun, answeringMachineDetectionSettings, scriptVariables, timeout, dialerPlugin)); }
public bool PlaceOutboundCall(string jobID, string callID, Guid providerID, string callTo, string fromCallerID, string fromCallerNumber, string scriptToRun, string answeringMachineScriptToRun, string answeringMachineDetectionSettings, System.Collections.Specialized.NameValueCollection scriptVariables, int timeout, CallButler.Service.Plugin.CallButlerDialerPlugin dialerPlugin) { WOSI.CallButler.Data.CallButlerDataset.ProvidersRow provider = dataProvider.GetProviders(Properties.Settings.Default.CustomerID).FindByProviderID(providerID); return(PlaceOutboundCall(jobID, callID, provider, callTo, fromCallerID, fromCallerNumber, scriptToRun, answeringMachineScriptToRun, answeringMachineDetectionSettings, scriptVariables, timeout, dialerPlugin)); }