cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2795
Views
0
Helpful
4
Replies

Regular Expressions in num-exp

lefbaca01
Level 1
Level 1

Hello All,

I had a problem on my SRST gateway with num-exp insterting a repeating pattern into my 7-digit dialing when in fallback mode.

For a brief example, the 7digit internal dialing is 21621.. or 21622..

The num-exp statement of 'num-exp 2... 2162...' was not allowing me to 7-digit dial directly from one IP phone to another while in fallback mode.

When I dialed 2162154 the 2162 would hit the num-exp and be expended to 2162162.

I have a work around that uses a voice translation-rule, applied to the call-manager-fallback config that will translate a 7-digit dialed string to the 4 digit dialed string which then hits the 4-digit to 7-digit num-exp and it is working fine.

However, I was wondering if there is a way to  use regular expressions in num-exp so that perhaps I can skip the intermediate step of using the translation-rule. Based off my existing translation-rules that are working properly, I figured something like this might work for num-exp:

'num-exp /^2\([12]..$\)/ /2162\1/'

But when I try to issue a num-exp with a regular expression I get the following message.

Incorrect format for Number macro pattern

        regular expression must be of the form  ^((\+)?([0-9#*A-F.]|(\\\*))+(\$)?)$

I have tried a number of different combinations with no success.  I always get the same message.  The regular expression that I tried first was:

'num-exp ^2... 2162...'

This is when I first saw the "Incorrect format..." message and figured that is must be possible.  Is this just a generic warning similar to when you try to use complex regular expressions with the 'translation-rule' command vs. the 'voice translation-rule' command and in reality you cannot use regular expressions in the num-exp command?

Thank you,

Leo

1 Accepted Solution

Accepted Solutions

Chris Deren
Hall of Fame
Hall of Fame