[asterisk-users] Asterisk as an IVR solution

Al Baker bwentdg at pipeline.com
Fri Jul 11 21:37:53 CDT 2008



Douglas Garstang wrote:
> Well, a macro is the closest thing the dial plan has to a subroutine, 
> and without that, we might as well be programming in Assembler (no 
> subroutines, local variables, lots of goto's... sound familiar?).
>
> Doug.
>
> ----- Original Message ----
> From: Tilghman Lesher <tilghman at mail.jeffandtilghman.com>
> To: Asterisk Users Mailing List - Non-Commercial Discussion 
> <asterisk-users at lists.digium.com>
> Sent: Friday, July 11, 2008 7:20:40 AM
> Subject: Re: [asterisk-users] Asterisk as an IVR solution
>
> On Friday 11 July 2008 01:28:34 Douglas Garstang wrote:
> > Well I can tell you that it makes a difficult programming 
> environment, just
> > a little more difficult. It means I can't implement a menu as a single
> > reusable piece of code inside a macro.
>
> That's the point.  A Macro is NOT a subroutine.  It's like saying that you
> can't effectively hammer a nail with a screwdriver, and therefore you 
> think
> the screwdriver has a known problem.  There's nothing wrong with the
> screwdriver; it simply is the wrong tool for the job.
>
I must somewhat disagree with you on this.
1) A MACRO could reasonably viewed as the "Current Context", so if the 
jumping/branching from extension to extension that takes place in other 
contexts, it would if fact be quite reasonable and expected that this 
would happen in a MACRO.
2) As SUBROUTINES did not come "standard" until 1.6, it might be 
reasonably stated that "no appropriate tool" existed until 1.6,
and since good programming practice uses subroutines, and a MACRO did 
not work like subroutine, even though it LOOKS like one, people are not 
fully happy that the closest tool they had, did not do the job

Just a thought , no flame intended or implied.



More information about the asterisk-users mailing list