cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1175
Views
5
Helpful
2
Replies

UCCX scripting issue

tkuehner1
Level 1
Level 1

We are having an issue with numbers calling in to our script as anonymous are not being routed.  I debugged the script and found its failing at the part below:

 

UCCX snippet.png

 

We are using E.164 numbers so this is essentially stripping the +1 and forward the other 10 digits through.

 

Our customer wants to also be able to dial these numbers anonymously so I am wondering how in the script we can do that.  Is it something like adding a check variable null and send it through?  Is there a way to attach the script here?  It is saying its not a valid extension.  Thanks.

1 Accepted Solution

Accepted Solutions

Mark Swanson
Level 4
Level 4

Yeah because your Set Step;

callingNumber = callingNumber.substring(2, 12)

Must contain 12 characters. The word 'anonymous' only has 9 characters. If you want to strip the first 2 digits/characters from the string, then your Set Step would look like this;

callingNumber = callingNumber.substring(2)

However, this wouldn't prevent the script from stripping the first 2 digits/characters from 'anonymous' either. In this case, the callingNumber would be 'onymous'. To avoid this, simply add an IF Statement (or Switch Statement) before the Set Step. Depending on the outcome of the IF/Switch Statement, you would then specify this step and everything else wouldn't be strip. Your IF/Switch Statement would look like this;

IF (callingNumber == "anonymous")

Or, like this;

IF (callingNumber.length() < 12)

Honestly, there's probably a dozen ways to resolve this particular problem. You should check CUIC Reporting for a history of calling numbers and account for those as well... for example, "unknown". Good Luck!

 

View solution in original post

2 Replies 2

Mark Swanson
Level 4
Level 4

Yeah because your Set Step;

callingNumber = callingNumber.substring(2, 12)

Must contain 12 characters. The word 'anonymous' only has 9 characters. If you want to strip the first 2 digits/characters from the string, then your Set Step would look like this;

callingNumber = callingNumber.substring(2)

However, this wouldn't prevent the script from stripping the first 2 digits/characters from 'anonymous' either. In this case, the callingNumber would be 'onymous'. To avoid this, simply add an IF Statement (or Switch Statement) before the Set Step. Depending on the outcome of the IF/Switch Statement, you would then specify this step and everything else wouldn't be strip. Your IF/Switch Statement would look like this;

IF (callingNumber == "anonymous")

Or, like this;

IF (callingNumber.length() < 12)

Honestly, there's probably a dozen ways to resolve this particular problem. You should check CUIC Reporting for a history of calling numbers and account for those as well... for example, "unknown". Good Luck!

 

Thank you this worked for me.