Route specific external calls to DID then all others to a queue

Discussion in 'Call Flow Designer' started by Anthony Kniss, Nov 20, 2017.

Thread Status:
Not open for further replies.
  1. Anthony Kniss

    Joined:
    Oct 16, 2017
    Messages:
    4
    Likes Received:
    0
    So I have been trying to find something similar to this on the forums but either Im just typing the wrong thing or Im in way over my head. What I'm trying to accomplish is that when an extension receives an external call, I want the number to check against a "white list" then if its not on that list, it should then be directed to a call queue. When asking around, I was told that this can be done by making this within Call Flow Designer. Would anyone be able to provide me any information on how I can accomplish this? Thanks!!
    ~Anthony
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,351
    Likes Received:
    108
    Hi @Anthony Kniss,

    You need to create a CFD app, which will be deployed to a special queue that will hold this app. Then, you route all inbound calls to this app (to this queue extension number).

    The app needs to check the caller ID (available in the "session.ani" variable), and then decide if you want to route the call to an extension or to a queue. Then you just transfer the call.

    In order to check the caller ID you can use a database, a web service, or whatever you need.

    Please take a look at the following series of articles, which explain how to validate callers using different data sources:
    https://www.3cx.com/docs/cfd-creating-phone-support-portal-1
    https://www.3cx.com/docs/cfd-creating-phone-support-portal-2
    https://www.3cx.com/docs/cfd-creating-phone-support-portal-3
    https://www.3cx.com/docs/cfd-creating-phone-support-portal-4

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Anthony Kniss likes this.
  3. Anthony Kniss

    Joined:
    Oct 16, 2017
    Messages:
    4
    Likes Received:
    0
    Alright, I think I got this partially ready but I'm still getting an error when compiling it. I have the following for my flow but getting an error that the ValidateDataXMLFile1 doesn't exist. Everything is verbatim from the PhoneSupportPortal example when it comes to validating the session.ani to the xml file that stores the phone number. Am I still missing something maybe prior to this validate component like "assign a variable" maybe or is there a better way to pinpoint these Compile errors (like how can tell where line 138, 99 is located?)
    upload_2017-11-28_11-42-55.png
     
  4. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,351
    Likes Received:
    108
    Hello @Anthony Kniss,

    Please take a look at this guide to understand how to troubleshoot this kind of issues:
    https://www.3cx.com/docs/manual/cfd-troubleshooting/

    I think it's a typo. Your component name is "ValidateDataXMLFile1", but somewhere in your callflow you're referring to it as "ValidateDataXmlFile1" (changes the case). Then, that variable name can't be found. Maybe it's the condition that is using a wrong variable name.

    Kind regards.
    Ernesto.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Anthony Kniss

    Joined:
    Oct 16, 2017
    Messages:
    4
    Likes Received:
    0
    and thats what I thought too like "why does it need that 1 there?" so I did go about removing it so that the names were correct then I get the same error message with the corrected name "ValidateDataXMLFile" does not exist then. I'll try it again here shortly and see if maybe I missed changing the name anywhere.

    Also something else I notice when playing with it, if anyone else is reading these for information, everything seems to be case sensitive so be sure your copy and pasting exactly what your typing to save you some unnecessary troubleshooting, haha.
     
  6. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,351
    Likes Received:
    108
    Yes, variable names are case sensitive, so it's NOT the same:
    ValidateDataXMLFile1
    than
    ValidateDataXmlFile1

    You need to be careful with that.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Anthony Kniss

    Joined:
    Oct 16, 2017
    Messages:
    4
    Likes Received:
    0
    haha, yeah I needed to take my own advice, that was the issue XML vs Xml.... still along the lines of the session.ani variable, does this only bring in the calledID information or is there another variable i would use to see what number the caller initially dialed? For example to further extend this app for my use, I have it currently just directed to 1 DID number then it checks on that XML list if its valid or not then if yes, it gives a true or false result then directs the caller to either an extension or another queue. Let say I wanted to extend this app to be across multiple DID numbers that the caller dials into this call queue then "based on the callerID & what DID they dialed", it would then check a list to see first if they are on the list then directs them to a specific extension (which usually is the same as the DID they initially called) OR would I have to make a new call queue for each DID and just use the same current validate method?
     
  8. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,351
    Likes Received:
    108
    You can use the same CFD app in a single extension to validate calls to any DID. You just need to create the logic to perform this validation...

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