On Thu, Mar 21, 2013 at 8:25 PM, Michael Collins <msc@freeswitch.org> wrote:
This regex looks perfectly fine to me. Also, it works fine in fs_cli:
freeswitch@default> regex 123|^\+?(12243336164\|12025551212)$

My bad.  It turns out I had the error pattern in a different file, which had this incorrect line:
    <condition field="caller_id_number" expression="^+12243336164$">
In that case, the + was not escaped, so it tried to repeat the start, which it can't.
Condition deleted, problem solved.  Sorry to trouble you.

On Thu, Mar 21, 2013 at 9:38 PM, SS <8f27e956@gmail.com> wrote:
Is the problem not that you wrote,
field="caller_id_number"

and shouldn't it be,
field="${caller_id_number}"

It probably would work either way.  I just looked at the source, in mod_dialplan_xml.c, line 354, and found that if the field contains a dollar sign, then it is expanded and that is used to match the expression.  However, if it does not contain a dollar sign, then it fetches the data from a variable of that name.

That means that you can't put the name of a field in a channel variable and use that in the field parameter as a way of doing double-indirection (which would be a bad idea anyway).

-- 
Steve