I have a question about an option in my custumer´s script.
The caller have the option to call an extension typing the extension´s number.
There is the possibility to block some extension in the script?
For example: The caller is able to transfer to exensions 8000 to 8999 but he can´t transfer to extensions 1000 to 7999 and 9000 to 9999.
Can i use wildcard in the IF option after Get Digit String to compare the extension´s numbers?
Solved! Go to Solution.
Get digit stingnode will collect the number as string but we cant below condition on stings , so converted to integer and putting the condition.
"if 7999< numberint && numberint<8999 "
I know. But it's not recommended to do such type shuffling. Strings should remain Strings, Dates should remain Dates, integers should remain integers. I would agree that the solution presented by you works without doubt - and I endorsed it as you see - but it's "not nice".
A better solution would be to use the matches(String regex) method on the String variable containing the collected digits. But again, you could argue that casting to integer would still require less CPU overhead than doing the regex matching ;-)