Stripping "+1" Prefix from consumer's ANI

Hi everyone,

What is the best way to normalize the incoming caller ID and store it in a variable?

I want to remove/strip the “+1” prefix from the ANI and store the resulting 10-digit number in a custom variable called caller_number.

I tried to use a Set Variables widget with an expression like: substring(consumer.ani, 2) but no success..

Any insights or thoughts would be appreciated.

Hi @Az19 you will want to use a script widget where you can write javascript to perform this function.