Area Code Routing

I am looking for an example of area code based routing via an XML file check to a specific CSQ.

The application is not all that crazy basically if area code = 303 route to the Colorado CSQ.

Does anyone have an example of this?  

 

Version UCCx 7.0 Premium - but its so simple I dont want to use a DB - XML preferred.

 

Thank You,

 

Area Code Routing

@cromion

Keeping in mind the resources used by CCX when executing the XML file during runtime for every call be sure that you are taking into consideration the number of area codes you're looking up and your call volume because heavy CPU utlization can disrupt your CCX resources thus impact your system.

Here's one syntax example I've used in the past.  Very basic

<?xml version="1.0" encoding="ISO-8859-1"?>

<ANIList>

<ANIItem1>
       <Prefix>907</Prefix>
       <StateCode>AK</StateCode>
       <CallCenter>PhoenixCSQ</CallCenter>

<ANIList/>

 

Hope this helps.

area code routing

I am trying to do the same.  We are actually getting a host of phishing calls from area code 777.  I know how to use an XML file, but adding a line for every number combination would be horrilble.  Is there a way to querey the area code?  An "if calling number begins with" kind of an idea.

area code routing

@Ahochau,

I'm assuming your question is what query to use within the script based on the returned XML data which should be stored in whatever variable created to store that XML data to.  If so, you can use the IF step to accomplish this.  For example, IF variable (AREA_CODE) begins with 777, then play message and then disconnect caller.  Does that help you?

@jawilson1

But how do I get just the area code from the contact information?  If I pull the ANI I am going to get all the digits, and from there I would have to pull just the first 3.  Sounds like it would take a lot of steps.

I'm thinking I could get ANI set to sCallingNumber then do an IF sCallingNumber >= 7770000000 <= 7779999999 then do my action, I was just hoping it was possible to pull the ANI and do a begins with.  In the past I have done the if >= and then if true have a second IF for the <=.  However it would be much cleaner to just have one statement if possible.  

Given the example above, is either of the following possible? (s=String, i=Integer)

IF sCallingNumber >= "7770000000" AND sCallingNumber <= "7779999999"
   True
    - Action A
   False
    - Action B

IF iANI BEGINS "777"
   True
    - Action A
   False
    - Action B

 

 

@jawilson1

Sorry the delay in responding.  You can parse out the 10 digit number.

If using the Get Contact Info step, you've defined the Calling Number variable you can do the following:

 

1) Calling Number variable name = str_CallingNumber

2) new area code variable = str_New_AreaCode

3) Use SET step like this:  Set str_New_AreaCode = str_CallingNumber.substring(0,3)

4) Then using the IF step compare the new variable or use a Switch step where the switch value is the new variable (777). 

 

What the .substring is doing is returning a new string (first 3 digits in example above) that is a substring of this string.

 

Hope this helps

Recommended Reading: