[Asterisk-Users] 3 goes and your out

C F shmaltz at gmail.com
Sat May 28 20:00:42 MST 2005


Yeah sure (this is what I use):
[closed]

exten => s,1,SetVar(CNT=0) ;set the counter variable
exten => s,2,Goto(s-toolong,1)

........some code here.........
;here we have the timeout extension that makes sure we incerement and
test the counter
exten => t,1,Goto(s,2)
;this is the extension responsible for the increment, test, and hangup.
exten => s-toolong,1,Noop("")
exten => s-toolong,2,SetVar(TCNT=${CNT})
exten => s-toolong,3,SetVar(CNT=$[1 + ${TCNT}])
exten => s-toolong,4,GotoIf($[${CNT} > 3]?20) ;if it's 4 than the
caller heard this IVR at least 3 times already, so just get lost.
exten => s-toolong,5,Goto(s,3);if you made it here than this caller
has not heard it for 3 times yet
exten => s-toolong,20,Playback(goodbye)
exten => s-toolong,21,Hangup


On 5/28/05, asterisk at marnock.net <asterisk at marnock.net> wrote:
> Is it possible to give a caller three goes at an extension number then
> hangup?
> 
> 
> 
> exten => s,1,Zapateller(answer|nocallerid)
> exten => s,2,PrivacyManager
> exten => s,3,Ringing(1)
> exten => s,4,NoOp(${CALLERID})
> exten => s,5,SetMusicOnHold(random)
> exten => s,6,Background(silence/1)
> exten => s,7,Background(thank-you-for-calling)
> exten => s,8,Background(silence/1)
> exten => s,9,Background(if-u-know-ext-dial)
> exten => s,10,Background(silence/10)
> exten => s,11,Playback(goodbye)
> exten => s,12,Hangup()
> 
> exten => i,1,Answer
> exten => i,2,Playback(pbx-invalid)
> exten => i,3,Background(silence/1)
> exten => i,4,Goto(s,9)                                <--- add some kind of
> counter here ???
> 
> exten => 2201,1,Dial(SIP/2201,10)
> exten => 2201,2,Voicemail(u2201)
> exten => 2201,3,Playback(goodbye)
> exten => 2201,4,Hangup()
> 
> Thanks in advance
> 
> Phil.
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list