Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[asterisk-users] Subexpression usage in Asterisk Dialplan Re


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





PostPosted: Mon Mar 17, 2008 8:14 pm    Post subject: [asterisk-users] Subexpression usage in Asterisk Dialplan Re Reply with quote

Hi,

I currently have these two lines in my dialplan to extract different parts
out of a variable and I'd like to do it in one line instead. Does anyone
know how to use regular expression subexpressions in the dialplan?
Outputting a comma separated list that can be sent to ARRAY() would be nice
too (tried that, didn't work -- only got the first subexpression).

;extract dialed number
exten => s,n,Set(dialed_num=$[ "${ARG1}" =~ "(.*)\\*" ])

;extract user specified callerid
exten => s,n,Set(callerid_num_custom=$[ "${ARG1}" =~ "\\*(.*)" ])

Mike
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