Not sure how many people use 3CX for their phone systems, but our company utilizes the system and have recently adopted Pulseway as well. As a result, I have developed a plugin for 3CX Windows Client that opens a ticket as you pick up the phone from an incoming call. I have included the source code for reference if anyone else has a need for it.
Instructions:
Create a new project. Select C# Language and create a new “Windows Class Library” project.
Ensure that the project targets .NET Framework 4.5.1
Add a reference to the library “MyPhoneCRMIntegration.dll” installed with 3CXPhone for Windows (usually C:\ProgramData\3CXPhone for Windows\PhoneApp).
Rename Class1.cs to PulsewayTicketPlugin.cs and replace the code with the following:
usingSystem;usingSystem.IO;namespace_PulsewayTicketPlugin{[MyPhonePlugins.CRMPluginLoader]publicclassPulsewayTicketPlugin{// Initialization of VariablesprivatestaticPulsewayTicketPlugin instance = null;// Holds the instanceprivateMyPhonePlugins.IMyPhoneCallHandler callHandler = null;// Holds the handlerprivatestaticMyPhonePlugins.CallState lastStatus =MyPhonePlugins.CallState.Undefined;// Holds the last relevant phone status// Called upon loading 3CX Client[MyPhonePlugins.CRMPluginInitializer]publicstaticvoidLoader(MyPhonePlugins.IMyPhoneCallHandler callHandler){// Create a new instance of the plugin
instance =newPulsewayTicketPlugin(callHandler);}// Constructor for plugin, to add event handlerprivatePulsewayTicketPlugin(MyPhonePlugins.IMyPhoneCallHandler callHandler){this.callHandler = callHandler;// As the status of the call changes, process the changes
callHandler.OnCallStatusChanged+=newMyPhonePlugins.CallInfoHandler(callHandler_OnCallStatusChanged);}// Processes the status of the callprivatevoid callHandler_OnCallStatusChanged(object sender,MyPhonePlugins.CallStatus callInfo){// Process the current state// - If it is ringing, a call is incoming, so we want to monitor it// - If it has ended, no longer need to monitor it (happens when we end it or someone else picks it up)// - Don't process other cases, not necessaryswitch(callInfo.State){caseMyPhonePlugins.CallState.Ended:{ lastStatus =MyPhonePlugins.CallState.Undefined;break;};caseMyPhonePlugins.CallState.Ringing:{ lastStatus =MyPhonePlugins.CallState.Ringing;break;};default:{break;};}// If the phone was ringing and we picked it up, open a new ticketif(lastStatus ==MyPhonePlugins.CallState.Ringing&& callInfo.State==MyPhonePlugins.CallState.Connected){// Windows will automatically use the default application used to open URL'sSystem.Diagnostics.Process.Start("https://psa.pulseway.com/MSP/TicketEdit.aspx");}}}}
Build the DLL and place it into the 3CX Phone Directory (C:\ProgramData\3CXPhone for Windows\PhoneApp).
Edit the 3CX Phone Configuration file (C:\ProgramData\3CXPhone for Windows\PhoneApp\3CXWin8Phone.user.config) and add the following:
Not sure how many people use 3CX for their phone systems, but our company utilizes the system and have recently adopted Pulseway as well. As a result, I have developed a plugin for 3CX Windows Client that opens a ticket as you pick up the phone from an incoming call. I have included the source code for reference if anyone else has a need for it.
Instructions: