<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY>
As far as I (don't:-) understand asterisk sources, extensions 't' and 'i' can be used in _context_ only, but not in macro. Application voicemail has a special handling for 'a' extension to allow it in macro.<BR>
<BR>
On Thu, 2005-11-03 at 16:32 -0800, John Biundo wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Does anybody know how to code invalid and timeout handlers in ael macros?</FONT>

<FONT COLOR="#000000">I tried the following, but no luck.</FONT>

<FONT COLOR="#000000">=========</FONT>
<FONT COLOR="#000000">macro call-screen() {</FONT>
<FONT COLOR="#000000">        NoOp(Macro call-screen);</FONT>
<FONT COLOR="#000000">        Background(privacy-screening-unidentified-calls);</FONT>
<FONT COLOR="#000000">tryagain:</FONT>
<FONT COLOR="#000000">        Playback(pls-rcrd-name-at-tone);</FONT>
<FONT COLOR="#000000">        Set(SCREEN_FILE=/tmp/screen-${EPOCH});</FONT>
<FONT COLOR="#000000">        Record(${SCREEN_FILE}.wav,6,25);</FONT>
<FONT COLOR="#000000">        catch i {</FONT>
<FONT COLOR="#000000">                NoOp(invalid?);</FONT>
<FONT COLOR="#000000">                goto tryagain;</FONT>
<FONT COLOR="#000000">        }</FONT>
<FONT COLOR="#000000">        catch t {</FONT>
<FONT COLOR="#000000">                NoOp(timeout?);</FONT>
<FONT COLOR="#000000">                goto tryagain;</FONT>
<FONT COLOR="#000000">        }</FONT>
<FONT COLOR="#000000">};</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">--Bandwidth and Colocation sponsored by Easynews.com --</FONT>

<FONT COLOR="#000000">Asterisk-Users mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</A></FONT>
<FONT COLOR="#000000"><A HREF="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A></FONT>
<FONT COLOR="#000000">To UNSUBSCRIBE or update options visit:</FONT>
<FONT COLOR="#000000">   <A HREF="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A></FONT>

</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>