[asterisk-users] Large dial plans and variables

Doug Garstang dgarstan at talkplus.com
Thu May 3 09:29:13 MST 2007


Andreas Sikkema wrote:
>> 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.
>>     
>
> Well, they're called macro's for a reason.... You guys are 
> proposing adding functions or procedures. 
>
> My first step in any macro would be to copy incoming 
> variables, be it arguments or even asterisk defined stuff 
> to local variables. But that is just me and my coding 
> convention.
>
>   
I guess we are. I propose we add functions or procedures!

Until that time though, it seems best practices are to prefix every 
single variable in macros, including copying ARG parameters to 
variables, with the name of the function, to avoid stepping on yourself.




More information about the asterisk-users mailing list