cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3011
Views
10
Helpful
14
Replies

I want to dial 3,4 and 5 digit extension in uccx 8.5

nithinprasad89
Level 1
Level 1

Hello ,

I have developed a script in which i want to dial 3, 4 and 5 digit extensions and other options like 1 and 2. The script is not playing the welcome prompt and no trigger when i dial the number associated with the application. When i try debugging it showing error as

"Java extensions are not licensed to support method invocations (line:   1, col: 1); nested exception is:   com.cisco.expression:ExpressionLicenseViolationException:  java   extensions are not licensed to support mething invocations (ine: 1,  col:  1)". Below is the attached script and i also attached the screen shot of the error which am getting when i debug..

1 Accepted Solution

Accepted Solutions

If you are happy with your results, you should mark this post as answered so others know you resolved your issue.

Additionally, I took a look at your script and I have a few suggestions for you...

1. Using multiple nested If steps instead of a single Switch step

You used:

If (strExtension == "1")

     True

          Goto Help

     False

          If (strExtension == "2")

               True

                    Goto English

               False

                    Goto EXTENSION_XFER

You should have used:

Switch String (strExtension)

     1 - Help

          Goto Help

     2 - English

          Goto English

     Default

          Goto EXTENSION_XFER

The reason: It's cleaner to read and it only costs you one step in all cases, whereas two nested If steps costs you one step in the best case scenario, and two steps in the worst case scenario.  Just imagine if you have five menu choices; that's the cost of five steps in the worst case scenario.

Here's an example comparison using five choices:

If (CED == "1")

     True

          Goto Option One

     False

          If (CED == "2")

               True

                    Goto Option Two

               False

                    If (CED == "3")

                         True

                              Goto Option Three

                         False

                              If (CED == "4")

                                   True

                                        Goto Option Four

                                   False

                                        If (CED == "5")

                                             True

                                                  Goto Option Five

                                             False

                                                  Goto Option Default

Switch String (CED)

     Option 1

          Goto Option One

     Option 2

          Goto Option Two

     Option 3

          Goto Option Three

     Option 4

          Goto Option Four

     Option 5

          Goto Option Five

     Default

          Goto Option Default

And if the Default choice is needed (worst case scenario), then the Nested If method would need to execute five steps to get there, whereas the Switch step executes only one step.

2. Duplicating logic

You used:

strExtension = Get Digit String (--Triggering Contact--)

     Successful

          Goto EXTENSION_XFER

     Timeout

          If (strExtension == "1")

               True

                    Goto Help

               False

                    If (strExtension == "2")

                         True

                              Goto English

                         False

                              Goto EXTENSION_XFER

     Unsuccessful

          If (strExtension == "1")

               True

                    Goto Help

               False

                    If (strExtension == "2")

                         True

                              Goto English

                         False

                              Goto EXTENSION_XFER

You should have used:

strExtension = Get Digit String (--Triggering Contact--)

     Successful

          Goto EXTENSION_XFER

     Timeout

          Validate Extension:

          If (strExtension == "1")

               True

                    Goto Help

               False

                    If (strExtension == "2")

                         True

                              Goto English

                         False

                              Goto EXTENSION_XFER

     Unsuccessful

          Goto Validate Extension

The reason: It's lighter weight (less memory usage) and if you needed to modify your menu choices, you only have to do it once, instead of twice.

3. Repeat counter is not being executed

You have:

strExtension = Get Digit String (--Triggering Contact--)

     Successful

          ...control moves to another section of the script...

     Timeout

          ...control moves to another section of the script...

     Unsuccessful

          ...control moves to another section of the script...

Increment iRepeatCounter

If (iRepeatCounter < 3)

     True

          Goto ENTER_EXTENSION

     False

          Goto CLOSE

Now, since you are basically attempting a transfer on anything other than a "1" or a "2", then you really need to move this logic to the Call Redirect section or just remove it all together.

This is also happening below the English section as well.  However, you have duplicated the iRepeatCounter conditional check within the English section also, so it should be working as you expected there.  Just not above.

I hope that helps.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

View solution in original post

14 Replies 14

Gergely Szabo
VIP Alumni
VIP Alumni

Hi,

can you give us a screenshot of the script?

G.

What license level and build are you running? I wasn't aware that the non-Premium license is blocking common method calls; when I asked it was only blocking custom Java classes. In fact, I could swear that I have used the .length() method on an Enhanced install before... now if only I could remember which one. Hmm.

Gergely- Here you are:

Please remember to rate helpful responses and identify helpful or correct answers.

Hi,

thanks, Jonathan. Note to self: need to install the latest versions of UCCX/UCCE in my lab.

I opened the "Cisco Unified Contact Center Express Expression Language Reference Guide, Release 8.5(1) Cisco Unified Contact Center Express Scripting and Development Series: Volume 3 Nov 2010" and found this:

• In Unified IP IVR, Unified CCX Enhanced, and Unified Contact CCX Premium, you can enter both

simple and complex expressions.

However, in Unified CCX Standard, you can enter only simple expressions unless you also have a

Java license. You automatically have a Java license with the other four Cisco Unified CCX products.

• A complex expression is one surrounded by braces and having more than one statement, is specific

to the Java language, and requires that you have a Java license. If your script contains a complex

expression and you do not have a Java license, then when you load that script in the Cisco Unified

CCX engine, the script is declared invalid and you will not be able to run it.

I can't see any curly braces, so this script is supposed to work with UCCX Standard as well.

Unless we are facing a strange bug (?) (or feature (?)) throwing that com.cisco.expression:ExpressionLicenseViolationException

Or, the documentation might need a review.

Alternatively, I might be looking at the wrong document.

Nithin, can you please tell us whether you got that script from a different UCCX instance, I mean, this script had not been created using the server you are trying to debug with?

Thanks

G.

Nice catch! I wonder if it meant to say parantheses instead of braces? Alternatively, maybe it views the OR operation as the "more than one statement"?

Nithin- If you are running standard:

  1. I'll send you a sympathy card.
  2. Try breaking your evaluation into separate pieces to see if you can bypass the license enforcement:

Set intExtensionLength = strExtension.length()

If intExtensionLength == extension_length

     True

     False

          Set intExtensionLength = strExtension1.length()

          If intExtensionLength == extension_length

               True

               False

@Jonathan  still its not working after breaking the if conditions into pieces.Its showing the same error when i debug.

@Gergely-Yeah i have not developed the script in the UCCX editor 8.5 which am trying to debug. I mean i have developed the script in the UCCX 8.0 version and deployed in UCCX 8.5 . For 4 digit extension i have developed the script in 8.0 and it was working fine in 8.5 .

Hi,

can you log on to the UCCX web admin interface and check the license type? Go System > Licenses > Display licenses. We are looking for any of the following expressions: "Standard", "Enhanced" or "Premium".

Thanks.

G.

Hi Gergely,

Its showing "Standard" in display licenses.

Hi,

then I am afraid it's the end of the road. Apparently, String.length() is a complex expression - even though the documentation is a bit fuzzy on this.

G.

I think standard can only access the Cisco public constructors, properties and methods and not directly access any of the Java ones.  However, I don't have UCCX Standard to validate that on at the moment.  I might have to install the 30 day demo to try out a few things.

Examples with Date objects

JavaCisco
Date today = new Date();today = D[now]
month = today.getMonth()month = today.month
date = today.getDate()date = today.dom
year = today.getYear()year = today.year *
date1.after(date2)date1 > date2
date1.before(date2)date1 < date2

*Be careful as Cisco's .year property returns a different value than what is returned by the Java .getYear() method.  This will hurt you if you mix the two in a single script without normalizing the data before use.

How do you determine what is Cisco versus Java?  I'm not totally sure.  I'll need to read up on Java object introspection to see if we can expose the object.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

You could use the Switch step first to see if the input is a single digit match for Help or English, and then for the default branch just attempt the transfer with whatever input was given.  If they enter in a valid extension, whether 3, 4, or 5 digits, it's going to work, and if not, you simply say that was an invalid entry, please try again.

Looks like this:

Main Menu:

CED = Get Digit String (--Triggering Contact--)

     Successful

          Switch String (CED)

               1 - Help
                    Goto Help

               2 - English

                    Goto English

               Default

                    Call Redirect (--Triggering Contact-- to CED)

                         Successful

                              Set Contact Info (--Triggering Contact--, handled)

                              End

                         Busy

                              Play Prompt (--Triggering Contact--, P[ext_busy])

                         Invalid

                              Play Prompt (--Triggering Contact--, P[invalid_entry])

                         Unsuccessful

                              Play Prompt (--Triggering Contact--, P[unknown_error])

     Timeout

          Play Prompt (--Triggering Contact--, P[no_input])

     Unsuccessful

          Play Prompt (--Triggering Contact--, P[invalid_entry])

Play Prompt (--Triggering Contact--, P[try_again])

Goto Main Menu

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Could you try this to see if it works for determining an extension length in UCCX Standard?

Variables

String CED = ""
String transfer_to = ""
int i = 0

Script

Main Menu:

CED = Get Digit String (--Triggering Contact--)

     Successful

          Main Menu Validation:

          Switch String (CED)

               1 - Help

                    Goto Help

               2 - English

                    Goto English

               Default

                    Set i = CED

                    If ((i >= 100 && i <= 99999))

                         True

                              Set transfer_to = CED

                              Goto Extension Transfer

                         False

                    Goto Main Menu

     Timeout

          Goto Main Menu Validation

     Unsuccessful

          End

Extension Transfer:

Call Redirect (--Triggering Contact-- to transfer_to)

     Successful

          End

     ...

Help:

...

English:

...

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Hello Guys,

Finally I got the solution for the script and now its working fine for 3,4,5 digits extension transfer. Thanks to everyone for there timely response. I have attched the working script below.

If you are happy with your results, you should mark this post as answered so others know you resolved your issue.

Additionally, I took a look at your script and I have a few suggestions for you...

1. Using multiple nested If steps instead of a single Switch step

You used:

If (strExtension == "1")

     True

          Goto Help

     False

          If (strExtension == "2")

               True

                    Goto English

               False

                    Goto EXTENSION_XFER

You should have used:

Switch String (strExtension)

     1 - Help

          Goto Help

     2 - English

          Goto English

     Default

          Goto EXTENSION_XFER

The reason: It's cleaner to read and it only costs you one step in all cases, whereas two nested If steps costs you one step in the best case scenario, and two steps in the worst case scenario.  Just imagine if you have five menu choices; that's the cost of five steps in the worst case scenario.

Here's an example comparison using five choices:

If (CED == "1")

     True

          Goto Option One

     False

          If (CED == "2")

               True

                    Goto Option Two

               False

                    If (CED == "3")

                         True

                              Goto Option Three

                         False

                              If (CED == "4")

                                   True

                                        Goto Option Four

                                   False

                                        If (CED == "5")

                                             True

                                                  Goto Option Five

                                             False

                                                  Goto Option Default

Switch String (CED)

     Option 1

          Goto Option One

     Option 2

          Goto Option Two

     Option 3

          Goto Option Three

     Option 4

          Goto Option Four

     Option 5

          Goto Option Five

     Default

          Goto Option Default

And if the Default choice is needed (worst case scenario), then the Nested If method would need to execute five steps to get there, whereas the Switch step executes only one step.

2. Duplicating logic

You used:

strExtension = Get Digit String (--Triggering Contact--)

     Successful

          Goto EXTENSION_XFER

     Timeout

          If (strExtension == "1")

               True

                    Goto Help

               False

                    If (strExtension == "2")

                         True

                              Goto English

                         False

                              Goto EXTENSION_XFER

     Unsuccessful

          If (strExtension == "1")

               True

                    Goto Help

               False

                    If (strExtension == "2")

                         True

                              Goto English

                         False

                              Goto EXTENSION_XFER

You should have used:

strExtension = Get Digit String (--Triggering Contact--)

     Successful

          Goto EXTENSION_XFER

     Timeout

          Validate Extension:

          If (strExtension == "1")

               True

                    Goto Help

               False

                    If (strExtension == "2")

                         True

                              Goto English

                         False

                              Goto EXTENSION_XFER

     Unsuccessful

          Goto Validate Extension

The reason: It's lighter weight (less memory usage) and if you needed to modify your menu choices, you only have to do it once, instead of twice.

3. Repeat counter is not being executed

You have:

strExtension = Get Digit String (--Triggering Contact--)

     Successful

          ...control moves to another section of the script...

     Timeout

          ...control moves to another section of the script...

     Unsuccessful

          ...control moves to another section of the script...

Increment iRepeatCounter

If (iRepeatCounter < 3)

     True

          Goto ENTER_EXTENSION

     False

          Goto CLOSE

Now, since you are basically attempting a transfer on anything other than a "1" or a "2", then you really need to move this logic to the Call Redirect section or just remove it all together.

This is also happening below the English section as well.  However, you have duplicated the iRepeatCounter conditional check within the English section also, so it should be working as you expected there.  Just not above.

I hope that helps.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.