Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

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

    Jul 9, 2014
    Likes Received:
    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

    Jun 27, 2007
    Likes Received:
    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.