Customer has UCCX v8.5 Standard license.
How can I get the first 3 digits from Calling number to be able to do a search in xml with area codes?
I have done some reading and finding this statement
SET area_code = calling_number.substring(0, 3)
The problem is this does not work with standard license.
Is there another method that will give me the first 3 digits of the calling number?
Solved! Go to Solution.
The syntax you posted is normally what one would use, but since Java is not available in Standard I suppose this may not work though this surprises me. I don't have any other solution except for perhaps trying some math on it, i.e. calling_number / 10000000 (assuming this is US and all calls come in as 10 digits), if the calling_number is an integer it should work, one thing you may need to verify is to ensure it rounds it down and not up, i.e. 847-888-1234 is 847 not 848.
Thanks for the reply.
So I should convert the calling_number to an integer and then do some math?
Can you provide me with an example syntax?
Your method works perfect up to 9 digits of ANI. As soon as the ANI = 10 digits I get the following error. Do you you why?
Hmm, must be some limitation, you can try converting it first to float or long and then to integer.
I thought I was close! Since I cannot use the integer because of the max range, any other ideas?
did you try long or float per my previous suggestion.
Sent from Cisco Technical Support iPhone App
So, looks like float is the same value with period, so not to get the final area code instead of dividing it by 10000000 simply multiple it by 100.