Problem with calling CallTriggerCmd.exe from Windows Service

Status
Not open for further replies.

Denisas

Forum User
Joined
Jan 15, 2018
Messages
3
Reaction score
0
Hello everybody,

For local usage we need our FronEnt Web application call CallTriggerCMD.exe to start dialing in 3cx Windows Phone
I've got a problem with calling CallTriggerCMD.exe from Windows service.

.net core Api Self-hosted script has calling standard command line:
C:\ProgramData\3CXPhone for Windows\PhoneApp>CallTriggerCmd.exe -call 231231121

When I'm running application manually this working perfectly and 3cx Windows Phone application is dialing, therefore when I have from Windows Service for example - http://localhost:5555/api/MakeCall/231231121, I'm getting this error:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://localhost/CallTriggerService/e6533f87-9ac6-405f-889b-19eedefc814d that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.IO.PipeException: The pipe endpoint 'net.pipe://localhost/CallTriggerService/e6533f87-9ac6-405f-889b-19eedefc814d' could not be found on your local machine.
--- End of inner exception stack trace ---

Server stack trace:
at System.ServiceModel.Channels.PipeConnectionInitiator.GetPipeName(Uri uri, IPipeTransportFactorySettings transportFactorySettings)
at System.ServiceModel.Channels.NamedPipeConnectionPoolRegistry.NamedPipeConnectionPool.GetPoolKey(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.CommunicationPool`2.TakeConnection(EndpointAddress address, Uri via, TimeSpan timeout, TKey& key)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at TCX.CallTriggerCmd.ICallTriggerService.MakeCall(String destination)
at TCX.CallTriggerCmd.Program.<>c__DisplayClass1_0.<Main>b__1(String destination)
at Mono.Options.Option.Invoke(OptionContext c)
at Mono.Options.OptionSet.Parse(String argument, OptionContext c)
at Mono.Options.OptionSet.Parse(IEnumerable`1 arguments)
at TCX.CallTriggerCmd.Program.Main(String[] args)

What I've tried without success:
1) Run 3cx Windows Phone as administrator
2) Run service as the same User as using 3cx Windows Phone
3) I've checked - no other applications or services using the 5555 port
4) Reinstalled 3cx Windows Phone
5) I've checked Net.Pipe Listener Adapter is running(restarted him)
6) I've checked - 3cx has Pro licence
7) I've even reinstalled Windows

I'm really struggling with this problem, anyone could help me?
 
Let me explain how CallTriggerCmd connects to 3CXPhone for Windows, this will shed some light on the issue:
1) The 3CXPhone for Windows client loads a plugin, named "CallTriggerCmdPlugin". This requires a PRO license. But licensing is not the issue because this is working when you launch the program manually.
2) The "CallTriggerCmdPlugin" plugin creates a Windows named pipe, and listens on it. The name pipe address is "net.pipe://localhost/CallTriggerService/e6533f87-9ac6-405f-889b-19eedefc814d" where "e6533f87-9ac6-405f-889b-19eedefc814d" is a GUID which is stored in the registry, under "HKEY_CURRENT_USER/Software/3CX/CallTriggerCmdUri". This GUID is created the first time the plugin is executed.
3) When you launch the program CallTriggerCmd.exe, it reads the registry to create the proper named pipe and connect to the 3CXPhone for Windows running for the same user account. So, it is important that your service runs with the same user account than 3CXPhone for Windows.
4) It is important that 3CXPhone for Windows is running, otherwise the connection can't be established.

So, a few things to check:
  • Ensure that your service is running with the same credentials than 3CXPhone for Windows.
  • Ensure that 3CXPhone for Windows is running and it's properly configured with an extension settings.
  • In some cases antivirus can block the named pipes connection, however I don't think this is the case because you mentioned that it works fine when you launch the program manually. But if the issue persists, try turning off any antivirus software.
 
Dear Ernesto,

We have tried all your points and with no results. Please see our 7 points that we've tried.
When credential were different we got another error:
(
System.NullReferenceException: Object reference not set to an instance of an object.
at TCX.CallTriggerCmd.Program.Main(String[] args)
)
So I have changed credential for service to same than 3CXPhone for Windows 10 and now we are getting error:
(
System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://localhost/CallTriggerService/e6533f87-9ac6-405f-889b-19eedefc814d that could accept the message
)
I also tried on another computer with Windows Server OS and with Administrator credentials this service is working fine.
We have the problem on Windows 10 OS.

Is it possible to restart CallTriggerCmdPlugin or clean registry of this plugin without reinstalling Windows ?

I'm really struggling with this issue the third day in row and really don't know what direction take to solve it......
Any advice are welcome. Thank you very much in advance!

BR,
Denisas
 
Last edited:
So I have changed credential for service to same than 3CXPhone for Windows 10 and now we are getting error:
(
System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://localhost/CallTriggerService/e6533f87-9ac6-405f-889b-19eedefc814d that could accept the message
)
This is because 3CXPhone is not running. It must be running in order to receive your request... Ensure that 3CXPhone is running for this user when you trigger the call.

Is it possible to restart CallTriggerCmdPlugin or clean registry of this plugin without reinstalling Windows ?
Uninstall 3CXPhone for Windows. Go to the registry (regedit.exe) and remove the value "CallTriggerCmdUri" from "HKEY_CURRENT_USER\Software\3CX".
 
Status
Not open for further replies.

Forum statistics

Threads
112,325
Messages
591,898
Members
165,479
Latest member
Senergia