10-22-2014 06:51 PM - edited 03-14-2019 02:01 PM
Hi dears!
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.
10-23-2014 12:40 AM
Hi,
If you have exact requirement as you have mentioned. you can use If condition to check the number as below screen shoot.
Hope this will help you.
10-23-2014 12:40 AM
10-23-2014 12:59 AM
Hey! Strings are supposed to be Strings, not integers! ;-)
10-23-2014 01:40 AM
Hi Gergely,
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 "
10-23-2014 02:01 AM
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 ;-)
G.
10-23-2014 03:42 AM
Hi everyone!
I will try to make it and I will post the results here.
Thanks a lot for you help.
Best regards!!!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide