How do I pull other 3cX variable data ?

Discussion in 'Call Flow Designer' started by insightbill, Dec 24, 2017.

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

    Joined:
    Jul 9, 2014
    Messages:
    2
    Likes Received:
    0
    I would like to take the session.ani and grab information from that extension. For example First Name, Last Name etc. Can you provide an example of how I can use the session.ani to "read" and create other variables from the extension that is calling the CFD ?
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,361
    Likes Received:
    109
    Hello @insightbill,

    In order to do that, you need to use the 3CX Call Control API, from a Launch External Script component.

    Please note that this API can be changed at any time by 3CX without further notice, so in case of upgrading 3CX your app might stop working. Therefore, you should test the app carefully with every new version of 3CX before upgrading, to ensure that it works as expected.

    Said this, what you need to do is the following:
    1) Create a text file with extension "cs" and add the C# code to call the Call Control API.
    2) You can get the Extension object using the following code:
    Extension ext = PhoneSystem.Root.GetDNByNumber(extension) as Extension;
    if (ext != null)
    {
    // Add your code here...
    }

    3) Call that script using a Launch External Script component, and pass the variable "session.ani" as parameter.

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