protected override void OnExternalCommand(string command, string commandData, string eventToken, TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider) { // Parse out our external event action if (Enum.IsDefined(typeof(OutboundCalleeScriptProcessor.OutboundCallExternalCommands), command)) { OutboundCalleeScriptProcessor.OutboundCallExternalCommands externalCommand = WOSI.Utilities.EnumUtils <OutboundCalleeScriptProcessor.OutboundCallExternalCommands> .Parse(command); switch (externalCommand) { case OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_CallEnded: ProcessEndCall(telecomProvider); break; case OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_HoldCaller: // Remove this call from the conference tsInterface.ProcessOnHold(conferenceID, true); // Tell the other caller to play hold music outboundTsInterface.IMLInterpreter.SignalExternalEvent(OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_HoldCaller.ToString()); break; case OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_UnholdCaller: // Add this caller back into the conference tsInterface.ProcessOnHold(conferenceID, false); // Tell the other caller to stop hold music outboundTsInterface.IMLInterpreter.SignalExternalEvent(OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_UnholdCaller.ToString()); break; case OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_TransferCaller: TransferCaller(telecomProvider, commandData); break; } } tsInterface.IMLInterpreter.SignalEventCallback(eventToken); }
protected override void OnLinkedExternalCommand(string command, string commandData, string eventToken, TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider) { // Parse out our external event action if (Enum.IsDefined(typeof(OutboundCalleeScriptProcessor.OutboundCallExternalCommands), command)) { OutboundCalleeScriptProcessor.OutboundCallExternalCommands externalCommand = WOSI.Utilities.EnumUtils <OutboundCalleeScriptProcessor.OutboundCallExternalCommands> .Parse(command); switch (externalCommand) { case OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_CallFailed: { this.thisTsInterface.IMLInterpreter.SignalCallFailure(); break; } case OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_CallConnected: { // Conference the two callers conferenceID = telecomProvider.ConferenceLines(this.thisTsInterface.LineNumber, tsInterface.LineNumber); this.thisTsInterface.IMLInterpreter.SignalExternalEvent(OutboundCallExternalEvents.CALLBUTLERINTERNAL_ConferenceStarted.ToString()); break; } case OutboundCalleeScriptProcessor.OutboundCallExternalCommands.CALLBUTLERINTERNAL_CallEnded: { ProcessEndCall(telecomProvider); break; } } } //tsInterface.IMLInterpreter.SignalEventCallback(eventToken); }