Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

ANI routing

Using IPCC Express 4.0(4)

I'm creating a script that will collect the area code from every inbound call and use that information to make a routing decision. For example, if the area code is 406, I want to match that with MT; if it's 614, I want to match that with OH. I'm using an xml file for all area codes and state codes. The xml file looks something like this:

<ANIList>

<ANIItem>

<Prefix>406</Prefix>

<StateCode>MT</StateCode>

</ANIItem>

.

.

</ANIList>

I'll have an ANIItem for every area code in the US.

I'll store the ANI as a variable, and I'll want the script to populate the statecode variable based on the information in the xml program. My question is regarding the scripting: How can I get the script to loop through the xml file, checking for a match, and then return the state code. Any suggestions or examples would help.

Thanks,

Robb

2 REPLIES
Hall of Fame Super Silver

Re: ANI routing

Take a look at the Holiday script in this repository http://www.cisco.com/en/US/partner/products/sw/custcosw/ps1846/products_implementation_design_guides_list.html

for an example, it basically does the same thing reading an XML doc.

Chris

New Member

Re: ANI routing

Thanks for the response Chris.

I've used the holiday script and it works well when looking at a single variable - i.e. the holidaydate. I'm hoping to be able to look at the ANIList.xml file and pull a variable based on the data I store in the ANI variable. I've looked at the CRS Scripting and Development .pdf which shows how to use the Get XML Document Step, but I'm having difficulty comparing the ANI to a matching ANI in the xml file, and then pulling the state code matching that ANI out and using to make a routing decision.

Robb

149
Views
0
Helpful
2
Replies
CreatePlease to create content