Regular expression in destination is not working

Petr

New Member
Oct 27, 2026
1
0
0
54
I have a dial prefix range 2242245xx (00–99); when I enter it into the destination as the regular expression `^242245\d{2}$`, When an incoming call rings, a "404 Not Found" error appears in the log.
FusionPBX version 5.5.13, FreeSWITCH verze 1.11.2, The provider sends a 9-digit number.
Does anyone have experience with how to enter a range of numbers?
 
Last edited:
I have a dial prefix range 2242245xx (00–99); when I enter it into the destination as the regular expression `^242245\d{2}$`, When an incoming call rings, a "404 Not Found" error appears in the log.
FusionPBX version 5.5.13, FreeSWITCH version 1.11.2, The provider sends a 9-digit number.
Does anyone have experience with how to enter a range of numbers?
Assuming you have 2-digit extensions that will match the last two digits of the inbound DID number, Grok AI offers this dial plan information. It looks like you are missing a set of parenthesis in the expression.
one inbound route with a regex capture is the cleanest way in FusionPBX 5.5.13

Recommended setup​

  1. Go to Dialplan → Destinations (or Inbound Routes if you prefer to edit the generated route).
  2. Create (or edit) a single inbound destination/route with these settings:
FieldValue
TypeInbound
Destination / Number2242245xx (or just leave blank / use a descriptive name)
Contextpublic
OrderSomething low (e.g. 50–100) so it matches before other routes


  1. Edit the resulting Inbound Route dial plan and set:
Condition
  • Field: destination_number (or ${sip_req_user} / ${sip_to_user} if your provider puts the DID there)
  • Expression: ^2242245(\d{2})$
Action
  • Application: transfer
  • Data: $1 XML ${domain_name}
(Replace ${domain_name} with your actual domain if the variable doesn’t expand, e.g. 10 XML example.com.)

What this does​

  • Matches any 9-digit DID that starts with 2242245.
  • Captures the last 2 digits into $1.
  • Transfers the call to that 2-digit extension in the domain context (where your local extensions live).
Example:
  • Incoming DID 224224512 → rings extension 12
  • Incoming DID 224224545 → rings extension 45