How to pass ICM variables from ICM script to CVP Studio script and back

Unanswered Question

CVP Call Server 4.0.1 SR1

CVP VxML Server 4.0.1 SR1

ICM 7.2.5

Comprehensive Call Flow

I have created a ToExtVxML and FromExtVXML ECC array variables. In the ICM Script I have Set Variable ToExtVxML[0] to application="vxml_app" and also Set Variable ToExtVxML[1]=Call.CallingLineID using Formula Editor.

And then I Run External Script GS,Server,V to call a Studio created VxML script. In the VxML Script I have put a Sub Dialog Start. But I do not know the following:

1. How do I map the ToExtVxML[1] variable value to a VxMl Element or Session Data variable like 'clid'?

2. Then after that how to use that particular Element/Session Data Variable in a SQL Script using Database node like Select * from cudata where number='$clid' or what?

3. Then how do I map the values/fields returned from the query to VxMl Element or Session Data variables?

4. Then how do I map those variables to FromExtVXML array so that I can use those field values in ICM for further script logic?

Kindly assist.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)

You need to be more explicit. You probably actually have ToExtVxML[1] set to "clid=Call.CallingLineID" using the formula editor. When this hits Audium it will automatically create a session variable called "clid" and fill in the data. Make sure you have it as a name=value pair.

Just add a line in "Add to Log" in your first node and use substitution on the Session variable "clid" and dump the value - check your activity log. It will be there.

Now it's a session variable - you can use it.

I hate the Database element, but I believe it automatically creates variables with column names off the DB element matching your schema and fills in the values.

Pass the data back to ICM in FromExtVXML[] using substitution.

You need to walk before you run - write a simple application and figure out how substitution works. Learn how to create session variables and assign element values through substitution.

You should check the manual - ani and dnis are standard fields.



Chad Stachowicz Sat, 07/05/2008 - 18:50
User Badges:
  • Silver, 250 points or more

So I am setting my sub_dialog_return FromExtVXML's on the return node, and in ICM they are blank, or at least I think they are blank... I then am doing a set to transfer the variable over to another variable and then presenting the data on CAD to test. Everything else seems to work fine, is there something silly I am missing in CVP?



Chad Stachowicz Sat, 07/05/2008 - 19:04
User Badges:
  • Silver, 250 points or more

Actually Caller Input is passing back just fine, only FromExtVXML isn't passing back alright, any ideas?


Thanks Geoff

Now I can pass a variable from ICM to CVP. Actually I was using ToExtVXML[1] instead of [0], as I have set VxMLParams to N, I had to concantenate both application and clid vars in [0] position only.

I have written a SQL Query like Select language from Cu_Db where contact_number = Session.Data.clid

I pass through the node all fine but when try to match the valure returned i.e. value of column language I querried, it does not match to anything. I have added a log enrty for this field. I see no error in the error log but this warning in the activity log is coming up: 'A substitution representing Element data from element "get_database" and variable named "clid" referred to non-existent information. An empty string was substituted instead.'

Also, is there a log on CVP that will show the value returned from the database query?

thanks -kartik

got it working

my query was: select language from cu_db where clid=data.session.clid

I changed it to

select LANGUAGE from cu_db where clid=data.session.clid

and made sure that the logging enabled for the Database node is also in CAPS like LANGUAGE Data.Element.get_from_db.LANGUAGE

and it worked, and I stopped seeing the warning in the activity log and started seeing the data returned itself.

But I still see the Warning when the Query does NOT return a single row and this is normal.

thanks & regards-kartik

Kartik writes:

>Actually I was using ToExtVXML[1] instead of [0], as I have set VxMLParams to N, I had to concantenate both application and clid vars in [0] position only.

Once you define "user.microapp.UseVXMLParams" to "N" you are set up to pass data through the user.microapp.ToExtVXML array. That means you can use any of the array elements that you have created.

Assuming you have created this ECC variable with the recommended default of 5 x 40, then you can certainly pass data in ToExtVXML[1].

Please check the number of elements you have created.

You can concatenate different name=value pairs with a semi-colon separator, making sure you don't exceed the capacity of the element. Or you can put separate name=value pairs in different array elements. Both methods will work.




This Discussion