3CX Server Automation

Discussion in 'CRM / Helpdesk / App Integration' started by the136, Feb 24, 2017.

Thread Status:
Not open for further replies.
  1. the136

    Joined:
    Nov 16, 2016
    Messages:
    7
    Likes Received:
    0
    Good Evening folks,

    I am new to 3CX PBX and have some great ideas for getting a lot out of the system. I notice that there is an API, which is great! However, I cannot seem to find (in the 15 minutes I've been looking) any good places to start. A "Hello World" as you will.

    I would really like to be able to click on a phone number and create a call connection. Pretty straightforward - if you are using the Windows Client. I want to be able to create a solution, initially in a CRM, whereby the server itself creates the call to my IP Phone.

    I have a couple of examples of how to work around, but always it comes to the Software Client. I want to use an actual phone.

    Anyone have any pointers? Please be kind.
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,449
    Likes Received:
    115
    Hi @the136,

    If you want to trigger outbound calls, 3CX already provides click to call functionality from Chrome using an extension:
    https://www.3cx.com/blog/releases/click-to-dial-extension/

    If that's not what you're looking for, you can create a CRM plug-in following this guide:
    http://www.3cx.com/blog/releases/crm-integration-diy/

    When you create a plug-in for 3CXPhone, you will have a method MakeCall to trigger your outbound call.

    This is all for the 3CXPhone client. If you want the call connected to a different phone, you can use 3CXPhone is CTI mode (controlling a desk phone). Or another option could be using the 3CX Call Control API (https://www.3cx.com/blog/docs/call-control-api/) on the server side, and launch the call from there. This Call Control API has a method in which you specify the source and the destination of the call. You can say for example "call from extension 100 to number 1234567890".

    Hope the information helps.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. the136

    Joined:
    Nov 16, 2016
    Messages:
    7
    Likes Received:
    0
    Thanks for your reply. I think the only thing that's in the running here is the Call Control API. I looked at this, but last night I discounted it immediately on seeing reference to .NET.

    You see, I'm using 3CX on a Linux Server so (being Linux) I automatically ignore any reference to .NET. However, I have just remembered that 3CX on Linux is actually running the exact same codebase as it does on Windows! So my discounting it was probably premature - I'll have to take some further looking.

    As for the Chrome Plugin, it's a great idea but I don't use Chrome. That said, there are generic plugins for Firefox including MeloSIP Click2Call which does a pretty good job. Really all it needs to do is pass the number to the SIP protocol. I have modified some code (not sure if the original code works in Windows, but I had to modify it to work on Mac) from the 3CX Blogs and produced this for my helpdesk:

    https://thetechie.co.uk/blog/custom-3cx-click-to-call

    Part of my point here is that I don't use Windows and it seems integrations and plugins only work on Windows Softphone. So I'm out of most options when it comes to plugins and integrations. I need to go back to to the server to do anything worthwhile. And seeing as my server is not running Windows either, it makes for fun times!

    But like I said, I remember now that when I was playing with the server earlier in the week I noticed that the whole thing is actually Windows code - warts and all. So there's no reason the API dll's won't work on Linux.

    I'll let you know how I get on.
     
  4. the136

    Joined:
    Nov 16, 2016
    Messages:
    7
    Likes Received:
    0
    So that's a shame.. Looks like the Call Control API isn't going to help me either.

    Which is in contravention of the Installation guidelines

    It seems as though the Call Control API was intended for adding supervisory elements, with the emphasis on being able to cut in on a call and monitor staff. Such a shame.
     
  5. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,449
    Likes Received:
    115
    Hi there,

    You should be able to use the API from the 3CX server. Even on Linux, you can create a .NET CORE program to use the API. Actually, all the 3CX processes are .NET, and they consume the 3CX Call Control API from the same Linux server, so you should not have any problem to do the same. Just get Visual Studio 2015, create a .NET CORE project, add a reference to the Call Control API DLL and you should be ready to go. There are some samples on how to use the API on the 3CX site.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.