<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>Hi
Christian,</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2>Increase a variable in the menu loop, or exactly in the "t" and "i"
extensions like this :</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> s,1,Wait(3)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> s,n,Answer()</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> s,n,Set(LoopStep=1)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> s,n,Set(TIMEOUT(digit)=3) <BR>exten =>
s,n,Set(TIMEOUT(response)=10)<BR></FONT></SPAN><SPAN
class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten =>
s,n,Wait(1)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> s,n(menurestart),Background(your_announce)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> s,n,WaitExten(5)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> 1,1,GoTo(your_menu_context,1,1)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> 2,1,GoTo(your_menu_context,2,1)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> 3,1,GoTo(your_menu_context,3,1)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,1,Playback(im-sorry)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n,Set(LoopStep=$[${LoopStep} + 1])</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n,GoToIf($[${LoopStep} > 3]?disconnect)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n,GoTo(s,menurestart)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n(disconnect),Hangup()</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> i,1,Playback(im-sorry)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n,Set(LoopStep=$[${LoopStep} + 1])</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n,GoToIf($[${LoopStep} > 3]?disconnect)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n,GoTo(s,menurestart)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> t,n(disconnect),Hangup()</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>exten
=> h,1,NoOp(the caller has hung up)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>I hope
that can help and to have not introduced mistakes ;-)</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff size=2>Best
Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2>Francois BERGERET,</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2>France.</FONT></SPAN></DIV>
<DIV><SPAN class=732163117-01052007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left><FONT face=Tahoma
size=2>-----Message d'origine-----<BR><B>De :</B>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <B>De la part de</B>
Christian<BR><B>Envoyé :</B> mardi 1 mai 2007 18:18<BR><B>À :</B>
asterisk-users@lists.digium.com<BR><B>Objet :</B> [asterisk-users] How do
I do this in Asterisk?<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2>I have created a menu from which the caller can
select several options such as being transfered to our phones and my mobile
phone, meetme, etc. If the caller press an invalid option i have set it to
play a message like invalid choice please try again. If the caller make three
invalid choices i want the call to be disconnected. what is the best way of
doing that?</FONT></DIV>
<DIV><FONT face=Arial size=2>And finally i have set up an extention to which
it is possible to record a message but i then want to be able to specify what
number the message should be plaied for after recording is finished. Many
thanks for all your help,</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2>Christian<SPAN
class=732163117-01052007><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV></BLOCKQUOTE></BODY></HTML>