Author Topic: 4 digit dialing  (Read 6944 times)

epl692

  • Newbie
  • *
  • Posts: 1
    • View Profile
4 digit dialing
« 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

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: 4 digit dialing
« Reply #1 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