CID formating - Match numbers only

Status
Not open for further replies.

whiteym

Gold Partner
Advanced Certified
Joined
Apr 16, 2020
Messages
23
Reaction score
9
I'm sure someone has posted this before but I can't seem to find anything.
I have setup a new phone system for a customer with a trunk I have never used before. When they get calls the provider does not send a leading 0, so the number if Australian is 812341234. Most people are used to a leading 0 or +61, so I made this CID rule (.)(.*) -> 0\1\2.
Now when an an anonymous call comes through it shows up as 0anonymous. I have tried changing the rule to (1-9)(.*) but it didn't work.

Is there an easy way to determine if the first character is a digit? Or do I have to create a rule for each possible first digit?
 
There's no way to define a range in Caller ID reformatting so you would indeed need 10 rules to check for digits from 0 to 9, but considering you would only receive very specific characters as caller ids, such as "anonymous", you could simply match them first and then just have rules to match the rest for the caller ids that contain digits.

So you could have something like this:

1615541093053.png

Hope this helps.
 
There's no way to define a range in Caller ID reformatting so you would indeed need 10 rules to check for digits from 0 to 9, but considering you would only receive very specific characters as caller ids, such as "anonymous", you could simply match them first and then just have rules to match the rest for the caller ids that contain digits.

So you could have something like this:

View attachment 21129

Hope this helps.
Ah, I didn't know you can match strings. The CID guide only shows digits.
Thanks I'll try this out next week.
 
  • Like
Reactions: ChrisC_3CX
Status
Not open for further replies.