cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
498
Views
3
Helpful
4
Replies

Voice translation rule - BLOCK number with +

ziqex
Level 4
Level 4

Hi,

I want to use voice translation-rule to reject specific number.

This number has format starting with +4917

If I attempt to add it like below:

rule 3 reject /^+4917XYZ/ it is not being accepted

Same with rule

3 reject /+4917XYZ/ it is not being accepted either

Please advise

Thanks

1 Accepted Solution

Accepted Solutions

@ziqex,

The backslash is an escape character in regular expressions, so in order to match a literal plus sign (+), you need to escape it with another backslash. So, the correct syntax to match a string that starts with "+4917" using a regular expression in a Cisco voice translation-rule would be:

 

rule 3 reject /^\+4917/

 

Note that the first backslash escapes the second backslash, which in turn escapes the plus sign.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

4 Replies 4

M02@rt37
VIP
VIP

Hello @ziqex,

In your case, you can use the following command to reject the number starting with +4917:

 

rule 3 reject /^\+4917/

 

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Is there any difference between rule 3 reject /^\+4917/ and rule 3 reject /^\\+4917/?

Thanks

@ziqex,

The backslash is an escape character in regular expressions, so in order to match a literal plus sign (+), you need to escape it with another backslash. So, the correct syntax to match a string that starts with "+4917" using a regular expression in a Cisco voice translation-rule would be:

 

rule 3 reject /^\+4917/

 

Note that the first backslash escapes the second backslash, which in turn escapes the plus sign.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

You need to escape special characters, like a plus, in the match part of the rule. To do that add a \ in-front of the character, ie \+.



Response Signature