- Joined
- Nov 7, 2019
- Messages
- 1
- Reaction score
- 1
Hello,
I'm trying to use the CallTriggerCmdPlugin sample project to make a call from an ERP system and listen for incoming/outgoing call notifications so I can get the other party's number and whether it is incoming/outgoing. I don't need the notification coming up in the Web Client so I haven't gone the route of creating a CRM template. I simply need my ERP to be able to make calls via the 3CXPhone for Windows app and listen for call information so I can create a popup in my ERP and record the call using the ERP's own functionality. I am able to successfully make a call but I am having difficulties listening for call information. In the sample project the code below initializes the service to listen for calls and give back this information, but the sample project does not use the loader/unloader methods anywhere. There is no class in this sample project that implements IMyPhoneCallHandler so the class can be instantiated and that instance passed to Loader(MyPhonePlugins.IMyPhoneCallHandler callHandler). I'm just wondering am I missing something or is it expected that the user needs to write the implementation of IMyPhoneCallHandler themselves?
namespace TCX.CallTriggerCmd
{
[MyPhonePlugins.CRMPluginLoader]
public class CallTriggerCmdPluginLoader
{
private static object lockObj = new object();
private static CallTriggerCmdPlugin instance = null;
[MyPhonePlugins.CRMPluginInitializer]
public static void Loader(MyPhonePlugins.IMyPhoneCallHandler callHandler)
{
lock (lockObj)
{
instance = new CallTriggerCmdPlugin(callHandler);
instance.StartServiceAsync();
}
}
[MyPhonePlugins.CRMPluginDispose]
public static void Unloader()
{
lock(lockObj)
{
if ( instance != null )
{
instance.Dispose();
instance = null;
}
}
}
}
}
I'm trying to use the CallTriggerCmdPlugin sample project to make a call from an ERP system and listen for incoming/outgoing call notifications so I can get the other party's number and whether it is incoming/outgoing. I don't need the notification coming up in the Web Client so I haven't gone the route of creating a CRM template. I simply need my ERP to be able to make calls via the 3CXPhone for Windows app and listen for call information so I can create a popup in my ERP and record the call using the ERP's own functionality. I am able to successfully make a call but I am having difficulties listening for call information. In the sample project the code below initializes the service to listen for calls and give back this information, but the sample project does not use the loader/unloader methods anywhere. There is no class in this sample project that implements IMyPhoneCallHandler so the class can be instantiated and that instance passed to Loader(MyPhonePlugins.IMyPhoneCallHandler callHandler). I'm just wondering am I missing something or is it expected that the user needs to write the implementation of IMyPhoneCallHandler themselves?
namespace TCX.CallTriggerCmd
{
[MyPhonePlugins.CRMPluginLoader]
public class CallTriggerCmdPluginLoader
{
private static object lockObj = new object();
private static CallTriggerCmdPlugin instance = null;
[MyPhonePlugins.CRMPluginInitializer]
public static void Loader(MyPhonePlugins.IMyPhoneCallHandler callHandler)
{
lock (lockObj)
{
instance = new CallTriggerCmdPlugin(callHandler);
instance.StartServiceAsync();
}
}
[MyPhonePlugins.CRMPluginDispose]
public static void Unloader()
{
lock(lockObj)
{
if ( instance != null )
{
instance.Dispose();
instance = null;
}
}
}
}
}