<div dir="ltr">The first issue I see is you are attempting to insert your pattern match in the middle of your 's' extension, That's going to break your 's' extension.<div><br></div><div>The second issue is that you are matching on XX which will match two digits, You need to match on _X instead if you are attempting to match on the number 8.</div><div><br></div><div>I recommend you look into 'read' instead of trying to do a pattern match.<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 7, 2014 at 1:41 PM, Anurag Rana <span dir="ltr"><<a href="mailto:anuragrana31189@gmail.com" target="_blank">anuragrana31189@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)">Hi,</div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)">I created a dummy dialplan  where I ask the user to enter the age. </div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><div>[macro-age]</div><div>exten => s,1,Background(my/age)      ;;Play recorded message to enter age</div><div>exten => s,n,WaitExten(10)                 </div><div>exten => _XX,1,Set(AGE=${EXTEN})    ;; this line is not executing, instead dialplan is terminating with error given below.</div><div>exten => s,n,NoOp(${AGE})</div><div>exten => s,n,GotoIf($[${LEN(${AGE})} > 0]?notEmpty)</div><div>exten => s,n,Goto(s,1)</div><div>exten => s(notEmpty),n,Background(my/thank-you)</div><div>exten => s,n,Wait(1)</div></div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)">When I receive call and tries to enter the digits (86 lets say), it only accept just first digit and terminates even before considering second digit.</div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)">Error message :</div><div style="font-family:verdana,sans-serif"><div><font color="#000000"> </font><font color="#ff0000">WARNING</font><font color="#000000">[5726][C-0000000a]: pbx.c:6696 __ast_pbx_run: Invalid extension '8', but no rule 'i' or 'e' in context 'testmacro'</font></div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">Please suggest what might be wrong.</div></div><span class="HOEnZb"><font color="#888888"><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:verdana,sans-serif;color:rgb(0,0,0)"><br></div><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>
</font></span></div>
<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></blockquote></div><br><br clear="all"><div><br></div>-- <br>A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein
</div></div></div>