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>