[Freeswitch-users] Regexp question

Michael Collins msc at freeswitch.org
Fri Mar 22 06:25:45 MSK 2013


This regex looks perfectly fine to me. Also, it works fine in fs_cli:
freeswitch at default> regex 123|^\+?(12243336164\|12025551212)$
false
freeswitch at default> regex 12243336164|^\+?(12243336164\|12025551212)$
true
freeswitch at default> regex +12243336164|^\+?(12243336164\|12025551212)$
true

Note that when you must escape the | character in your patterns when you
use the regex command because regex uses | as a delimiter.

Try those commands in your fs_cli and see what happens.
-MC

On Thu, Mar 21, 2013 at 3:19 PM, Steven Schoch <
schoch+freeswitch.org at xwin32.com> wrote:

> I'm getting this error:
> 2013-03-21 09:52:46.921136 [ERR] switch_regex.c:101 COMPILE ERROR: 1
> [nothing to repeat][^+12243336164$]
>
> It comes from this condition:
>     <condition field="caller_id_number" expression="^\+?(12243336164|
> 12025551212)$">
>
> (The corresponding action routes the call directly to my extension, but
> that's not important.)
>
> The reason I have "\+?" is I didn't know if the plus sign was included in
> the caller-ID.  I have since learned that it is, so I can remove the "?",
> but I still want to know what I did wrong.
>
> --
> Steve
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130321/7216c812/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list