[Freeswitch-users] Regexp question
Steven Schoch
schoch+freeswitch.org at xwin32.com
Fri Mar 22 20:09:51 MSK 2013
On Thu, Mar 21, 2013 at 8:25 PM, Michael Collins <msc at freeswitch.org> wrote:
> This regex looks perfectly fine to me. Also, it works fine in fs_cli:
> freeswitch at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130322/01d70818/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list