similar to: match a set of numbers in GoToIf against a variable

Displaying 20 results from an estimated 6000 matches similar to: "match a set of numbers in GoToIf against a variable"

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.
2005 Sep 10
2
GotoIf Syntax to match first digits
how does a GotoIf-challenge look like to match e.g. only the first two digits? i want to strip the first two digits from an incoming pstn-call and add a zero instead so when i forward a call to a mobile the called party gets the correct number of the caller. at the moment, incoming calls from the austrian pstn are recognized as e.g. 43650123123 by asterisk, when i forward the call e.g. to a
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
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
2003 Oct 23
0
GotoIf Problems
I have the following in my extensions.conf: exten => 21,1,NoOp(${CALLERIDNUM}) exten => 21,2,GotoIf($[${CALLERIDNUM} = ""]?21|4:21|9) exten => 21,4,Playback(/etc/asterisk/interactive-services/no-callerid) exten => 21,5,Wait(1) exten => 21,6,Playback(/etc/asterisk/interactive-services/no-callerid) exten => 21,7,Wait(1) exten => 21,8,Goto(10,4) exten =>
2006 Apr 07
1
regexp in gotoif
Hello! this is a short one: in a gotoif-statement i would like to match a variable to a number, where the number could have digits from 2-6. asterisk only seems to be capable to match such a digit-range when used in the extension, but not in a regexp, at least the following query doesn't work: exten => _X.,1,GotoIf($[${EXTEN} : 234[2-6]]?jump:) obviously asterisk has a problem with
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 =>
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]
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 =>
2004 Aug 27
0
regex and gotoif question
Hi all, Did anyone manage to make the GotoIf command work with regular expression ? I would like to make the following thing: ${DTMSeq} contains a menu choice. Only 1, 2 and 3 are allowed menu choices. If DTMFSeq contains 1 or 2 or 3 => OK, Goto 4 else Goto 2 I've tried the follwoing syntax but it is alway going to 2 whatever the value of DTMFSeq: exten =>
2006 Jun 27
2
SV: Error in config sample for GoToIf?
Hello As far as ive understood, you can just write Exten => s,n,GotoIf([${AVAILSTATUS} = 1]?autoanswer:fail) ${AVAILSTATUS} would return 1, and "${AVAILSTATUS}" would return "1" Jon -----Oprindelig meddelelse----- Fra: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] P? vegne af Brian Capouch Sendt: 27. juni 2006 09:10 Til:
2006 Feb 08
2
SV: GotoIf number exists in file. How can i do this?
Oh. So how can I do this? If I write something in PHP, how do I make it output to an Asterisk variabel? I need to set a variable in asterisk to TRUE or FALSE based on the result of the PHP-script. ________________________________ Fra: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] P? vegne av Morgan Gilroy Sendt: 8. februar 2006 15:28 Til:
2004 Jan 02
1
Asterisk Gotoif / last called
Hi guys Ive been trying to get this to work for ages now, basicaly im trying to do if ${woteva} = "" (nothing), or its none existenant then do label 1, else label 2. for my last called function, so it will play a different message if theres no last call in the system or it was anonymous. ive tried exten => 1000,1,GotoIf($[${last-call${CALLERIDNUM}} = ""]?4:5) and heaps of
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)}"
2008 Jul 29
5
Callerid Woes
I am trying to setup one time caller id block on my system(activated when an incoming call matches *811XXXXXXXXXX), and I have had little to no luck. Could you take a look at my context/macro definition and help me figure out what I am missing? Here is my context for my dialplan: include=default plancomment=user-default
2010 Dec 29
2
GotoIf CALLERID(num)
I'm testing GotoIf($["${CALLERID(num) but I'm missing something as it is not working: [office-open] exten => s,1,Wait(1) exten => s,2,Answer() ; for Caller ID is 471-5665, always signal congestion: exten => s,3,GotoIf($["${CALLERID(num)}" = "4715665"]?4:6) exten => s,4,Playtones(congestion) exten => s,5,Congestion(5) exten =>
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