Yate Community Forum

General Category => Yate users hangout place => Topic started by: epl692 on September 12, 2017, 11:09:41 PM

Title: 4 digit dialing
Post by: epl692 on September 12, 2017, 11:09:41 PM
I'm trying to setup a regex match for a 4 digit dialed number, and was trying to use
([0-9]{4})
entered into the config as
^([0-9]{4})=goto to_target
and am trying to figure out why it's not working. I'm new to yate, so It might just be a simple error.

Thanks!
epl692
Title: Re: 4 digit dialing
Post by: marian on September 13, 2017, 12:34:50 AM
You must escape chars used by regexp:

^\([0-9]\{4\}=goto ....

Note that this regexp will match any target starting with 4 digits. If you to match exactly 4 digits you must add a $ char at the end