Doug Garstang wrote: > I have a large dial plan here with over 3000 lines, and several dozen > macros. As it grew, it became apparent that there was some problems. > > 1. When you pass arguments to a macro in the form of $ARG1, $ARG2 etc, > if that macro calls another macro, and passes arguments like this as > well, you lose the original values. > > 2. When the macro's 'return' some value, it has to set a channel > variable. If your not careful, this quickly becomes a mess. Some > standard mechanism is needed. > > In fact, the over all problem is that all channel variables are global > within that channel. Macro's don't have local variables and it makes > programming large dial plans problematic. Even things like loop counters > can get trashed when your inside of a loop, and you jump somewhere else > and modify that loop variable, and jump back. > > Anyone got any tips on how to manage this? It would be awesome if AEL2 > could address this somehow...
You're so right! I thought about having just a catchall _. extension in the dialplan and doing everything else in a "real" language via AGI - PHP, Perl, ... whichever you like. It would make the programming part much easier as the scope of variables is just as you expect it to be. Regards, Philipp -- amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Let's use IT to solve problems and not to create new ones. Asterisk? -> http://www.das-asterisk-buch.de Geschäftsführer: Stefan Wintermeyer Handelsregister: Neuwied B 14998 _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
