<div><div><font face="courier new, monospace">Hi!,</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">I would like to know how to proceed on this in order to generarte a proper patch.</font></div>
<div><font face="courier new, monospace"><br></font></div><div><span style="font-family:'courier new',monospace">While testing trunk, found </span><span style="font-family:'courier new',monospace">that the new way that pbx/pbx_config.c uses the new </span><span style="font-family:'courier new',monospace">Asterisk 11 'missing context </span><span style="font-family:'courier new',monospace">feature' from apps/app_stack.c behaves in a mode that </span><span style="font-family:'courier new',monospace">you can only create a </span><span style="font-family:'courier new',monospace">stdexten context in extensions.conf </span><span style="font-family:'courier new',monospace">syntax and not </span><span style="font-family:'courier new',monospace">in AEL2 </span><span style="font-family:'courier new',monospace">or LUA being both not able to arbitrarily set priorities.</span></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">This is because pbx_config.c when using users.conf and hasvoicemail, instead of create </font><span style="font-family:'courier new',monospace">an extension </span><font face="courier new, monospace">with all the proper a</font><span style="font-family:'courier new',monospace">nd old fashion Gosub set of options context,extension,priority(args), it uses </span><span style="font-family:'courier new',monospace">the shorter priority(args)</span><span style="font-family:'courier new',monospace"> syntax </span><span style="font-family:'courier new',monospace">which</span><span style="font-family:'courier new',monospace"> leads you to necessarily add an </span><span style="font-family:'courier new',monospace">include => stdexten to whatever it is 'usercontext', following the missing </span><span style="font-family:'courier new',monospace">context feature in app_stack.cs that asumes that</span></div>
<div><span style="font-family:'courier new',monospace"><br></span></div><div><span style="font-family:'courier new',monospace">context=ast_channel_context(chan).</span></div><div><span style="font-family:'courier new',monospace"><br>
</span></div><div><font face="courier new, monospace">Therefore the new [stdexten] examples in extensions.conf adds a (stdexten) label inside [stdexten] context but also sets the priority to some high and arbitrary number, 50000 for [stdexten] and 60000 for [stdPrivacyexten]in order to isolate the merge between [default] (or 'usercontext') and the included stdexten. </font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">If you rewrite stdexten in LUA or AEL2, whenever you use a Return(), it will reach the 2nd priority of the LUA/AEL2 stdexten which is not desired (endless loop or at least until the stack empties).</font></div>
<div><br></div><div><font face="courier new, monospace">To workaround this, you must have to write stdexten in extensions.conf syntax </font><span style="font-family:'courier new',monospace">starting with a priority non reachable by the Gosub()/Return() stack (as the extensions.conf.sample does) assuming t</span><span style="font-family:'courier new',monospace">hat the only way that it can be called using users.conf / pbx_config.c is doing </span><span style="font-family:'courier new',monospace">an include to the stdexten context in the 'usercontext'.</span></div>
</div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">I think a best approach would be to return to the old behavior when pbx_config.c generated the full set of options to GoSub </font><span style="font-family:'courier new',monospace">context,extension,priority(args) (stdexten,${EXTEN},1(${HINT}) based on the idea that is desirable to be able to write stdexten in any of the provided languages to code dialplans in Asterisk.</span></div>
<div><br></div><div><span style="font-family:'courier new',monospace">Any opinion? </span></div><div><span style="font-family:'courier new',monospace"><br></span></div><div><span style="font-family:'courier new',monospace">Best.</span></div>