Plugin that exposes an HTTP endpoint

Status
Not open for further replies.

Daniel Dumitrache

Joined
Jan 18, 2018
Messages
2
Reaction score
0
Hi,

I'm trying to create a custom plugin that exposes a simple REST service endpoint and a few operations available from there.

The sample code provided here https://www.3cx.com/call-center/crm-integration/ does that using named pipes, although for the specific use case I need it named pipes are not helping.

A slightly modified version of the sample code would look like this:

var binding = new BasicHttpBinding();
var baseAddress = new Uri("http://localhost:5002/CustomCallService");
_serviceHost = new WebServiceHost(this, baseAddress);
_serviceHost.AddServiceEndpoint(typeof(ICallTriggerService), binding, baseAddress);
_serviceHost.Open();

Is there a reason why the http://localhost:5002/CustomCallService URL in this case doesn't return any response?

Thank you.
 
Hello @Daniel Dumitrache,

This is a programming question, not related to the 3CX API. You're trying to communicate between 2 processes using an IPC channel, you will need to deal with that yourself, or ask your question in a programming site like stackoverflow...

Kind regards.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,473
Latest member
NathanMitchell