Cisco Support Community
Community Member

CRA 3.5 , IVR Scripting


1). I want to retrive records from the Sql database and that will be stored in variable (may be a array).

How to achieve this either by SQL or JAVA.

2). How to call a java program in IVR script??

Thanks in Advance.

Vaibhav Deshpande


Re: CRA 3.5 , IVR Scripting

you can use the HTTP or the JSP mechanism to send variables from the CRA to an external system.

Also I think there is an ability to work with remotely with Java classes and objects.

Community Member

Re: CRA 3.5 , IVR Scripting

Thank you very much for valuable input. I would be more than glad if you could fetch me an example script for the same.

Community Member

Re: CRA 3.5 , IVR Scripting

This is very straight forward with limitations. You need to have at least CRA enhanced licenses to query databases (Standard won't do it).

You will first need to set up the "Database" on the CRA server (data sources,system DSN). Then you will need to set it up in the CRA application (subsystems,Database). Note: Names must match identically (DSN/database name)

In the script editor, start with:

DB READ and enter the the SQL statment.

Note: Don't have full functionality of SQL (no count is biggest).

Under successful, add DB Get

Note: You will need to have variables for every field you plan to retrieve and every record. The field types must match exactly. It took me a little bit of time for some field types because I had to create them by using java."whatever"."whatever"

Under each successful, you will need to put a new DB Get for the next returned row. There are other, better ways, but I needed to have all data in all rows get returned.

After that, you should have a DB Release.

For the java question, there are various ways to do that. Look in the sample scripts for ideas.

I would recommend upgrading to 4.0 due to the Java supported code changes.


Re: CRA 3.5 , IVR Scripting


How exactly did you implement the java."whatever" (assuming this is what you used to overcome the unsupported data type for nvarchar fields in IPCC 3.x)?

I would love to see a sample of that as I am strugling with this (no java programming experience).

Thanks in advance for your reply,


Community Member

Re: CRA 3.5 , IVR Scripting

Remember, that version 3.5 of IPCC uses Jave version 1.1.8 so only the java types that are supported in this version will work. I am not a Java programmer either and had to look at the datatype in the database to know what to create the variable in CRA. Almost all data types were already in CRA, except for:

Date of birth field in database was:


If you download the help file jdk1.1.8 from the Internet you can view the list of supported types. I haven't worked much with arrays in Java and realized quickly that jdk1.1.8 was real limiting. If you go to version 4.0,you will be on a newer version of java (can't remember which version) and will have more supported data types and functions. It was a little trial and error when trying to pull the data from the database. Kept getting not valid datatype or something like that. I had to keep trying different variables with different datatypes before I hit the correct one. There is probably an easier way, but I am lacking the skills.

I had to take the DOB field from the timestamp type convert it to characters, then convert to a string in the way I wanted it to be viewed (real pain). I created a subscript to do this so I can call it from any new script that I create.

You may want to take a Cisco class CIPX. This class went through what you are trying to accomplish and if you are going to be doing any kind of longer term scripting, would be beneficial.

CreatePlease to create content