related with menu?

Comment on Asterisk i extension
Joined: Wed 22 of Oct, 2008

Re: related with menu?

Posted:Thu 23 of Oct, 2008 (17:29 UTC)
Here is a sample menu setup that will prevent a caller from looping indefinately through your system. In this example they will be disconnected after three loops.

exten => s,1,Answer()
exten => s,n,Set(TRIES=0)
exten => s,n,Wait(1)
exten => s,n(playback),Background(filename)
exten => s,n,WaitExten(5)

exten => 1,1,Goto(context,ext1,1)
exten => 2,1,Goto(context,ext2,1)
exten => 3,1,Goto(context,ext3,1)
exten => 9,1,Directory(default,users,e)

exten => *,1,Goto(s,1)

exten => h,1,NoOp(output message)

exten => t,1,Playback(im-sorry)
exten => t,n,Set(TRIES=$[${TRIES}+1]
exten => t,n,GoToIf($[${TRIES}>2]?t,disconnect)
exten => t,n,GoTo(s,playback)
exten => t,n(disconnect),Playback(goodbye)
exten => t,n,Hangup()

exten => i,1,Playback(im-sorry)
exten => i,n,Set(TRIES=$[${TRIES}+1]
exten => i,n,GoToIf($[${TRIES}>2]?t,disconnect)
exten => i,n,GoTo(s,playback)

include => another context   ; allows a caller to immediately dial the extension of a party they know in that context.

Joined: Wed 18 of Feb, 2004

related with menu?

Posted:Mon 20 of Sep, 2004 (00:26 UTC)
maybe the "i" triggers when invalid input only waiting for a menu chooice, see:
Asterisk cmd BackGround
But I'm not an expert..