<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">Thanks for the suggestion.</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">@Stiles - Look like this may work. Will try this. Thanks.</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="background-color:rgb(255,255,255)"><font style="font-family:georgia,serif" face="garamond,serif"><font size="4"><font size="4"><font face="verdana,sans-serif"><font>Anurag Rana <br><font size="1"><span style="color:rgb(56,118,29)"><a href="http://newbie42.blogspot.in/" target="_blank">http://newbie42.blogspot.in/</a></span><br></font><br></font><br></font></font></font></font></span><div><span style="background-color:rgb(255,255,255)"><font style="font-family:georgia,serif" face="garamond,serif"><br></font></span></div></div></div>
<br><div class="gmail_quote">On Mon, Sep 8, 2014 at 1:42 PM, A J Stiles <span dir="ltr"><<a href="mailto:asterisk_list@earthshod.co.uk" target="_blank">asterisk_list@earthshod.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sunday 07 Sep 2014, Anurag Rana wrote:<br>
> Hi,<br>
><br>
> I created a dummy dialplan  where I ask the user to enter the age.<br>
><br>
> [macro-age]<br>
> exten => s,1,Background(my/age)      ;;Play recorded message to enter age<br>
> exten => s,n,WaitExten(10)<br>
> exten => _XX,1,Set(AGE=${EXTEN})    ;; this line is not executing, instead<br>
> dialplan is terminating with error given below.<br>
> exten => s,n,NoOp(${AGE})<br>
> exten => s,n,GotoIf($[${LEN(${AGE})} > 0]?notEmpty)<br>
> exten => s,n,Goto(s,1)<br>
> exten => s(notEmpty),n,Background(my/thank-you)<br>
> exten => s,n,Wait(1)<br>
><br>
><br>
> When I receive call and tries to enter the digits (86 lets say), it only<br>
> accept just first digit and terminates even before considering second<br>
> digit. Error message :<br>
>  WARNING[5726][C-0000000a]: pbx.c:6696 __ast_pbx_run: Invalid extension<br>
> '8', but no rule 'i' or 'e' in context 'testmacro'<br>
><br>
> Please suggest what might be wrong.<br>
><br>
><br>
> Anurag Rana<br>
> <a href="http://newbie42.blogspot.in/" target="_blank">http://newbie42.blogspot.in/</a><br>
<br>
</div></div>You would be better off jumping to a new context and building up your number,<br>
digit-by-digit as it is entered, in a channel variable.<br>
<br>
In your "s" extension, set your variable to an empty string; do a Background()<br>
and then WaitExten() for a digit to be entered.  Have an extension _X to<br>
capture each digit and append it to the number so far.  Then use a GotoIf() to<br>
jump to the WaitExten() statement if insufficient digits have been entered so<br>
far.  You might also want a * extension to clear the number entered so far, if<br>
the user makes a mistake.<br>
<br>
<br>
If you need a written example, I might be able to dig something out later.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
AJS<br>
<br>
Note:  Originating address only accepts e-mail from list!  If replying off-<br>
list, change address to asterisk1list at earthshod dot co dot uk .<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div>