Plugin that exposes an HTTP endpoint

Discussion in 'CRM / Helpdesk / App Integration' started by Daniel Dumitrache, Jan 18, 2018.

Thread Status:
Not open for further replies.
  1. Daniel Dumitrache

    Joined:
    Jan 18, 2018
    Messages:
    2
    Likes Received:
    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/blog/docs/3cxphone-for-windows-api/ 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.
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,354
    Likes Received:
    108
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.