[asterisk-users] Function REGEX
Rafael dos Santos Saraiva
rafaelsnsa at gmail.com
Mon Mar 31 13:13:04 CDT 2014
All working fine.
Thank you for your help.
Att,
*Rafael dos Santos Saraiva*
<http://br.linkedin.com/pub/rafael-saraiva/52/aab/230>
2014-03-31 12:29 GMT-03:00 Eric Wieling <EWieling at nyigc.com>:
> Here is an example from one of my production dialplans
>
> same =>
> n,ExecIf(${REGEX("^1205|^1256|^1850|^1718|^1212|^1917|^1347|^1646|^1929"
> ${CALLERID(num)})}]?Hangup)
>
> Assuming you meant 0-9 and not the literal X (which means nothing special
> in regular expressions):
>
> same => n,ExecIf(${REGEX("^[0-9]5123$" ${EXTEN})}]?Hangup)
>
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com [mailto:
> asterisk-users-bounces at lists.digium.com] On Behalf Of Rafael dos Santos
> Saraiva
> Sent: Monday, March 31, 2014 11:23 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] Function REGEX
>
> Hi
>
> I need help to use the function REGEX. My question is if is possible test
> a expression as [X123 == 5123] ( If an extension corresponding to a
> previously defined regular expression). I saw various examples about this
> function, but nothing as the my needs. I do not understanding exactly how
> to works this function.
>
> Thank's
>
> Att,
> Rafael dos Santos Saraiva
> <http://br.linkedin.com/pub/rafael-saraiva/52/aab/230>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140331/a56a8d7f/attachment.html>
More information about the asterisk-users
mailing list