.Net API?

Discussion in '3CX Phone System - General' started by MojoDK, Oct 6, 2010.

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

    Joined:
    Sep 22, 2010
    Messages:
    26
    Likes Received:
    0
    Hi all,

    I need to implement 3CX in our own CRM ssytem.

    I've tried looking at the CRM plugin (http://www.3cx.com/blog/docs/crm-api/), but c# is not my strong side since we use vb.net (the sample project is also broken on that page).

    My question is ... isn't there a simple .Net API I can add to my project or do I really need to go through the Assistant plugin?

    Second question ... is there a vb.net CRM/Assistant sample somewhere? It's sad that it's always c# that are favored. :cry:

    Thanks,
    Mojo 8)
     
  2. abc123

    abc123 Active Member

    Joined:
    Nov 9, 2009
    Messages:
    712
    Likes Received:
    1
    You need to create an interface in .net - they gave you the sample. For information "void <methodname>" is Sub <methodname> in vb.net

    My vb.net is rusty as we are mainly a c# shop so I will help as much as I can.

    So to create that interface you need

    Public Interface IPlugin

    event OnOutboundCallRequest as OutboundCallRequestHandler;

    sub Start();

    sub Stop();

    sub ReloadConfiguration();

    function GetName() as string;

    function GetIcon() as icon;

    function GetConfigurationControl() as PluginConfigurationControl;

    HasToStoreCallInformation as boolean {get; set;}

    function GetContactInformation(string callerNumber) as contact;

    sub ShowContactRecord(Contact contact);

    sub CreateContactRecord(Contact contact);

    sub StoreCallInformation(CallInformation callInformation);

    sub VerifyPluginState();

    end interface
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. abc123

    abc123 Active Member

    Joined:
    Nov 9, 2009
    Messages:
    712
    Likes Received:
    1
    Also the sample project does work, it just doesnt like the upgrade.

    If you unzip the sample then dont open the solution but open the project file instead then it will open correctly.

    How good is your .net programming?

    The sample is very basic c# programming so nothing in there you should not understand if you are experienced vb.

    Some basic tips... vb has functions and subs.... c# just has methods which either return an object or a void (= sub). In vb you usually end the function/sub/property/if statement with and END <function/if etc> in c# we just put { } round the block. And in vb you always state the object type (eg string, integer, classname) using the As statement (eg dim mystring as string) whereas in c# we just write <objecttype> <variablename> (e.g. string mystring;).

    Work through the sample as then ask specific questions when you get stuck and I will help
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. MojoDK

    Joined:
    Sep 22, 2010
    Messages:
    26
    Likes Received:
    0
    Hi Mark,

    Thanks for replying my post.

    Well if I make a plugin and put it in the plugin folder, then I have to make some kind of communication between my plugin and my crm system?

    I would prefer just dropping a .net control on my winform, set the ip of the 3CX (and credentials) and then just listen for events.

    Thanks,

    Mojo
     
  5. abc123

    abc123 Active Member

    Joined:
    Nov 9, 2009
    Messages:
    712
    Likes Received:
    1
    Hi Mojo

    Dropping a .net control on a winform and listening to events is almost the same thing as the plugin from my understanding of how it works.

    What you say you want to do is have the control on your CRM form and listen to the events from the 3cx and handle them. But this is what the plugin is doing. You will implement the interface which handles the events. 3cx is already doing the login, credentials and event listening for you. Then in each event handler they call your plugin function which you have coded to talk to your crm.

    So if you write a plugin class that implements the functions (and it in turn can just raise events) then you can write your windows control to listen to the plugin events you just raised.

    Basic n-tier OO programming.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. piyushvaja

    Joined:
    Sep 16, 2015
    Messages:
    1
    Likes Received:
    0
    Hi,

    Can someone please help me to get Extension Report in Asp.Net C# website?
    I want to generate report in my current website which is build in Asp.Net C# and I want to fetch report from server located in LAN.
    Is there any API or Web Service which I can connect from my .Net site?
    Or let me know how can I get data to dataset directly from .wgx page?
    I have Login name and Password for web report.

    Thanks
    Piyush
     
  7. Hardik Soni

    Joined:
    May 22, 2017
    Messages:
    19
    Likes Received:
    1
    Is there have any plug in to handel incoming call in 3cx system???
     
Thread Status:
Not open for further replies.