similar to: regexp in gotoif

Displaying 20 results from an estimated 10000 matches similar to: "regexp in gotoif"

2008 Jul 18
5
GotoIf Problem
Everybody, I have a fall though context that, among other things, tests to see if someone it trying to pick up a non-existent parked call (Defined from 90 to 99). I have the following: [not-in-service] exten => _X.,1,Wait(1) exten => _X.,n,ResetCDR() ; ************************************************** ; Check to see if the mis-dialed number was a parking ; slot. If so, jump to the
2012 Nov 09
2
Creating yyyymm regexp strings on the fly for aggregation.
Folks, This question is somewhat related to a previous posting of mine. I just can't seem to create a generic solution. Here is a function that I found searching around the internet: splitIt <- function(x, n) {split(x, sort(rank(x) %% n))} I use it like so: > splitIt(1:12, 2) $`0` [1] 1 2 3 4 5 6 $`1` [1] 7 8 9 10 11 12 Or > splitIt(1:12, 4) $`0` [1] 1 2 3 $`1` [1] 4 5 6
2006 May 16
1
regexp
Hi, I'm trying to match a few of numbers in a GotoIf; numbers are not starting with but contain some strings: GotoIf($["${CALLERIDNUM}" =~ "984836|984899|498993|644110"]?8:11) Expression result is always '0'. Where am I wrong? Domenico Viggiani
2010 Apr 19
3
stupid regexp question
Hello, I have a stupid regexp question. I have a large data frame of strings. I would like to convert all occurences of : "W.m^{-2}" to "W/m2" I make the following test : gsub(glob2rx("W.m^{-2}"), "W/m2", "W.m^{-2}") but it does not seem to work. I don't know how to do it otherwise as I could never learn how to deal with the special
2009 Oct 02
3
help with regexp mass substitution
Hello * i have to rename a lot of variables, and, given that they have regular name constructs, I would like to use regexps. Here's a dump of my head(names(df)) varnames <- c("id.quest", "txt.1.3", "col1.1.3", "col2.1.3", "col3.1.3", "col4.1.3", "col5.1.3", "txt.2.3", "col1.2.3",
2007 Jul 13
1
Regexp Question - Merb::Router
Hi, I''m looking through the Merb::Routing code and I''ve found a regexp that I can''t figure out how it works. Merb::Router::SECTION_REGEXP #=> /(?::([a-z*_]+))/ It takes a route definition string, like "/products/:model/:id" and extracts the "model" string on the first pass, and later the "id" string. Can anyone shed some light on
2010 Nov 03
1
Gotoif changed in 1.8?
Hi Gang, I'm testing 1.8.0 on one of my machines and this snippet "chokes" on line 7 (works fine with 1.4.30) [tb-account-balance] exten => s,1,Set(BALCOUNT=0) exten => s,n,NoOp(Verbose(acct ${digitacc} pwd ${digitpwd} )) exten => s,n(runagi),Set(TEST_RETURN="NONE") exten =>
2009 Jul 15
1
ResetCDR after GotoIf doesn't set dst correctly, Is this a bug?
(Both on Asterisk 1.2 and 1.4) I was struggling to find out why my CDR was recording dst = h after a call hangup. It was working fine until I added a GotoIf statement before ResetCDR to calculate some value for userfield column. Today I tested and found out that if ResetCDR is put after GotoIf (or after if in AEL), it doesn't record correct value in dst column, and isntead puts 'h'
2005 Jan 06
1
Gotoif question
Is there a way to combine these lines into one? exten => s,2,GotoIf($["${CALLERIDNUM:0:3}" = "800"]?s|108) exten => s,3,GotoIf($["${CALLERIDNUM:0:3}" = "866"]?s|108) exten => s,4,GotoIf($["${CALLERIDNUM:0:3}" = "877"]?s|108) exten => s,5,GotoIf($["${CALLERIDNUM:0:3}" = "888"]?s|108) Thanks --John
2010 Feb 04
3
Gotoif Question
Hi Gang, I'm working on a lumenvox app and am having "fun" with the Gotoif's on speech/DTMF recognition. If you're using DTMF to enter a number instead of speech to enter a numeric value, the engine will often return a "confidence score" of 1000 instead of 1-999. Therefore this Gotoif fails: exten => s,n,GotoIf($["${SPEECH_SCORE(0)}"
2003 Dec 30
2
regexp problem on R 1.7.0
Hi, Am I missing something in using regexps in R? Below, 'egrep' means invokation of the command from the shell prompt. # I have > as.character(block.dist.vals) [1] "1e+06" "2e+06" "5e+06" # that I wish to convert to: "1" "2" "5" # OK (R and egrep) > sub( "e.+06", "", as.character(block.dist.vals) )
2008 Apr 15
1
gotoif syntax error
Asterisk is reporting the following error: [Apr 15 16:58:32] WARNING[14759] ast_expr2.fl: ast_yyerror(): syntax error: syntax error, unexpected ':', expecting $end; Input: : Always ^ here is the dialplan: exten => OUT,1,Gotoif($[$["${DB(AMPUSER/${ARG1}/recording)}" : "out=([^|]+)"] = Always]?r,1) exten =>
2005 Mar 08
2
GotoIf with Authenticate
Quick question...Im authenticate all exten except this one(2006). If I call from ext 2006 I still have to authenticate. If I call form any other ext I have to authenticate. Any suggestions? Thanks extex => s,1,GotoIf($[${EXTEN} = "2006"]?3) exten => s,2,Authenticate(731) exten => s,3,GotoIf($[foo${ECID${CALLERIDNUM}} = foo]?4) exten =>
2013 May 23
1
GotoIf function
Hi, Actually i would like to get the input from the user and he should not try more than 3 times, he can try more than 3 times, if yes it will get routed to the next priority and if not it goes to the loopback again from the beginning. And following is the one I created, I just want to know whether this will validate the input and will allow for 3 times.... exten =>
2007 May 30
3
Dial plan inquiry using GotoIf()
Hi all, I'm looking for some rudimentary insight on GotoIf() which seems to be failing on me in my dial plan. All I basically wish to do is block a particular caller. Sounds easy enough, but my ternary operator/plan currently is not properly being implemented. Can anyone spot where I'm being a momo? All extensions get forwarded to the following macro: [macro-forward] ; arg1 = phone
2009 Sep 22
2
Problem with dialplan -> gotoif ?
Hi This is the output from show dialplan dial-sipmnf-sippt-pstn [ Context 'dial-sipmnf-sippt-pstn' created by 'pbx_config' ] 's' => 1. Verbose(1,Dialing ${ARG1} on mnf pt pstn) [pbx_config] 2. Dial(SIP/${ARG1}@${SIPMNF},${ARG2},${OUTBDIAL}) [pbx_config] 3. Set(GLOBAL(FOUNDME)=${DIALSTATUS}) [pbx_config]
2005 Oct 14
1
match a set of numbers in GoToIf against a variable
Hello all, Okay when you are done laughing at the simplicity of this question could someone show me please what I have wrong in the following statement? GoToIf($[${numdial} != [1-9] ]?15:3); What this is supposed to do is if numdial is not a single digit from 1 to 9 inclusive goto 15, if it is a singledigit from 1 to 9 inclusive goto 3. Should be pretty simple but not working for me, always
2007 Mar 13
3
How to match wild card inside a GoToIf?
How can I match wildcards inside a GoToIf? I have something like this, but it doesn't work: [default] exten => _2XXXXXXXX,1,Macro(outcall,${EXTEN}) [macro-outcall] exten => s,1,GotoIf($["${ARG1}" = "220408XXX"]?2:3) exten => s,2,Hangup Any ideas? Regards, Ricardo.
2008 Jan 07
1
GotoIf() help
Greetings all, I'm not real good with dial plan programming and need some help. I've looked at the 2nd edition of the Asterisk book about GotoIf() and have a basic idea what I need to do but not sure about the correct way or the best way, to set it up. I need to branch based on whether the dialed number is long distance (international or not) or not. I have branch offices on SIP and IAX
2007 Aug 19
4
GotoIf not working with ${EXTEN} for me in 1.4.8
I am using GotoIf all over the place in 1.4.8 but for some reason, the following in my dial plan: ############################################################# exten => _1NXXNXXXXXX,1,GotoIf([${EXTEN} = "15554441212"]?100) exten => _1NXXNXXXXXX,n,Dial(SIP/provider1/${EXTEN},60) exten => _1NXXNXXXXXX,n,Dial(SIP/provider2/${EXTEN},60) exten => _1NXXNXXXXXX,n,Hangup exten =>