cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1904
Views
35
Helpful
15
Replies

Uccx feature ?

f.giordano
Level 1
Level 1

Hi,

I have a question regarding uccx feature.
Our customer would like to implement an IVR with the following criteria:

A PSTN phone calls my customer at number 999 which is a CTI_RP for IVR.
The IVR begins and asked the caller to press an "office code" in order to reach an external PSTN phone. So if the caller enters the DTMF "55" for instance, he's redirected to a PSTN number "YYYYYYYY". If he enters the DTMF "44", he's redirected to a PSTN number "XXXXXXXX" and so on and so on...
My question is: Is there a way to set the value "PSTN number" depending of the DTMF entered bay the caller ? For my customer I need 200 different location (external number) ?

Is it possible to have this kind of behaviour ? What's the design ?

Thank you
Regards

Fabian

1 Accepted Solution

Accepted Solutions

Oops, my bad. This should have said:

"/office_root/office[code=" + YOURVARIABLE + "]/redirect"

If YOURVARIABLE is within the quotes, it will be passed as a part of the literal string. You need to concatinate the string, variable, and the rest of the string together.

View solution in original post

15 Replies 15

Is there any pattern to the PSTN numbers?  You could have a very big IF statement with 200 different options, or if there's a pattern you could do some math and have a function which constructs the PSTN number then dials it.

david

Jonathan Schulenberg
Hall of Fame
Hall of Fame

Sure. The easiest ways would be an XML file in the document repository; or, an ODBC connection to another database server. You can retrieve the value from an XML file using Xpath; or, the database using SQL.

Most excellent ID, specially the DB lookup one.

david

Hi,

Xml file seems the easiest way to test the solution.

Is there any documentation/link explaining how to configure such a xml file ? (or a template)

Thx

Fabian

It's documented, sort of, in the CCX Step Editor Reference. You need to create a valid XML file and then parse it with Xpath.

Example XML:


    

          55

          918005532447

    

    

          44

          918004624726

    

In the script you need to get the document from the repository with a Create XML Document step. Once you've done that, you can then use the Get XML Document Data step with Xpath to pull the variable you want.

To continue the example, the XML Path would be "/office_root/office[code = YOURVARIABLE]/redirect" where YOURVARIABLE is the office code supplied by the caller.

You'll need to do some exception handling if a match is not found.

XML Path Language (Xpath)

Cisco Unified Contact Center Express Scripting and Development Series: Volume 2, Editor Step Reference 7.0(1)

Ok. thx for your post.

I'll try it tomorrow.

One more question regarding the size of the xml file.

If I set 200 different data in the file, will it work without any issue ?

I don't know the right behaviour, but if the script need to scan over the 200 value in the file each time there's a incoming call, it may impact server performance... right ?

Thanks again

That's the purpose of Xpath. The entire is loaded into memory (that's unavoidable); however, the script is only selecting a single value from it. The script is not looping through every possible element looking for a match. Xpath addresses that.

Having said that, you should be concious of the size of this XML file in memory. It will be loaded for every concurrent call in to the JVM. There is no sizing tool for this, you'll just have to keep an eye on it. I would not anticipate this being a problem unless you have cut the server sizing close elsewhere.

Hi again,

Thx for your answer.

However I did some test this morning, and I can't make it work. I follow the CRS editor guide and your advice.

I've posted an attachment (it's a very basic script). If you have a little time to have a look, maybe you would be able to help me (I guess it's just the XML Path which is wrong).

Thx again

Fabian

Hi again,

I did more test with the XML Path, and here is the result:

My variable from the 'get digit' step is a String named "dtmf"

test1:

"/office_root/office[code= dtmf]/redirect" ==> script error during test

test2:

"/office_root/office[code= 'dtmf']/redirect" ==> script error during test

test3:hardcoded a value

"/office_root/office[code= 55]/redirect" ==> Works fine. redirect to the right number

So I guess the syntax [code= dtmf] or [code= 'dtmf'] doesn' t take the value of the variable 'dtmf'.

So is there anything I did wrong ?

Any idea ?

Thx

Fabian

Oops, my bad. This should have said:

"/office_root/office[code=" + YOURVARIABLE + "]/redirect"

If YOURVARIABLE is within the quotes, it will be passed as a part of the literal string. You need to concatinate the string, variable, and the rest of the string together.

Works Perfect

Thx for your time

Fabian

Hi Jonathan,

Thanks for the excellent Post!

Maybe you can help me with one more thing.

Using these example ("/office_root/office[code=" + YOURVARIABLE + "]/redirect") Suppose that i have in XML code1, code2 , code3  tag and  YOURVARIABLE could be in one of these tags.

So my question is how can i do that?  Can i use an OR operator?

"/office_root/office[code1 & code2 & code3  =" + YOURVARIABLE + "]/redirect"

Thanks

Best Regards

MC

I have not tested this scenario; however, according to the syntax rules that I am aware of, you should be able to use a wildcard as follows:

"/office_root/office[*  ='" + YOURVARIABLE +  "']/redirect"

This translates to "find any redirect element that is a child of the office element with any attribute matching YOURVARIABLE.

A few things to note here:

  • You used the word tag; however, the [] brackets are used to identify attributes of an element. Be sure you know your XML syntax and schema here.
  • This presumes that you would never have the same value on more than one fully-qualified tag. For example if you had an attribute code1 that had a value of "foo" on two separate ./office elements.
  • Remember that String-type attributes must include single quotes. Look carefully at my correct example above, there are single quotes in addition to the double quotes used for concatinating the pieces together.

Hi Jonathan,

Thanks for the quick answer. It works but without single quotes  just "/office_root/office[*  = " + YOURVARIABLE +  "]/redirect".

My variable is calling_number that i have defined as a string type. Basically what i'm trying to do is searching these calling  number in xml  costumer element that have 3 atributes GSM PHONE,  PROFESSIONAL PHONE,  OTHER PHONE and with your solution it works.

you said that this  presumes that i will never have two elements costumer (in previous example office) with same atributes values. If these happens it will get the information of first costumer element?

Best Regards

MC.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: