[asterisk-users] Large dial plans and variables
Doug Garstang
dgarstan at talkplus.com
Wed May 2 10:55:01 MST 2007
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...
Doug.
More information about the asterisk-users
mailing list