Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Function REGEX


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
rafaelsnsa at gmail.com
Guest





PostPosted: Mon Mar 31, 2014 10:22 am    Post subject: [asterisk-users] Function REGEX Reply with quote

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
[url=http://br.linkedin.com/pub/rafael-saraiva/52/aab/230][/url]
Back to top
EWieling at nyigc.com
Guest





PostPosted: Mon Mar 31, 2014 10:30 am    Post subject: [asterisk-users] Function REGEX Reply with quote

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@lists.digium.com [mailto:asterisk-users-bounces@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
Back to top
rafaelsnsa at gmail.com
Guest





PostPosted: Mon Mar 31, 2014 1:13 pm    Post subject: [asterisk-users] Function REGEX Reply with quote

All working fine.
Thank you for your help.



Att,Rafael dos Santos Saraiva
[/url]






2014-03-31 12:29 GMT-03:00 Eric Wieling <EWieling@nyigc.com (
EWieling@nyigc.com)>:
Quote:
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@lists.digium.com (asterisk-users-bounces@lists.digium.com) [mailto:asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@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
 <[url=http://br.linkedin.com/pub/rafael-saraiva/52/aab/230]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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services