Re: [asterisk-users] LCR in Asterisk

2008-03-17 Thread Ex Vito
On Wed, Feb 13, 2008 at 6:49 PM, Tilghman Lesher [EMAIL PROTECTED] wrote: Macros are deprecated. Gosubs are the way forward, and yes, they have local variables. Simply define them once as Set(LOCAL(foo)=bar) and foo will be gone when the innermost stack is removed (either by Return or

Re: [asterisk-users] LCR in Asterisk

2008-03-17 Thread Tilghman Lesher
On Monday 17 March 2008 21:55:10 Ex Vito wrote: On Wed, Feb 13, 2008 at 6:49 PM, Tilghman Lesher [EMAIL PROTECTED] wrote: Macros are deprecated. Gosubs are the way forward, and yes, they have local variables. Simply define them once as Set(LOCAL(foo)=bar) and foo will be gone when

Re: [asterisk-users] LCR in Asterisk

2008-02-17 Thread Thomas Kenyon
Tilghman Lesher wrote: Macros are deprecated. Gosubs are the way forward, and yes, they have local variables. Simply define them once as Set(LOCAL(foo)=bar) and foo will be gone when the innermost stack is removed (either by Return or StackPop). Yeah, but I like macros. stamps feet.

Re: [asterisk-users] LCR in Asterisk

2008-02-17 Thread Tilghman Lesher
On Sunday 17 February 2008 03:41:09 Thomas Kenyon wrote: Tilghman Lesher wrote: Macros are deprecated. Gosubs are the way forward, and yes, they have local variables. Simply define them once as Set(LOCAL(foo)=bar) and foo will be gone when the innermost stack is removed (either by Return

Re: [asterisk-users] LCR in Asterisk

2008-02-17 Thread John
On Feb 13, 2008 12:33 PM, Tilghman Lesher [EMAIL PROTECTED] wrote: In the same way that a PHP programmer should not attempt write Python the way she writes PHP, I would agree with you. However, if you're willing to adapt to the ways the dialplan works, you can create dialplans which aren't

Re: [asterisk-users] LCR in Asterisk

2008-02-17 Thread Tilghman Lesher
On Sunday 17 February 2008 10:33:18 John wrote: On Feb 13, 2008 12:33 PM, Tilghman Lesher [EMAIL PROTECTED] wrote: In the same way that a PHP programmer should not attempt write Python the way she writes PHP, I would agree with you. However, if you're willing to adapt to the ways the

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Tilghman Lesher
On Tuesday 12 February 2008 23:14:58 Alex Balashov wrote: Rizwan Hisham wrote: Hi all, I am planning to implement LCR routing on my already running asterisk server. Uptill now i have found out that asterisk has no support for lcr, i have to do something about it myself, for example using

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Alex Balashov
Tilghman Lesher wrote: Uh, why not? You can do LCR quite easily in the dialplan, by using func_odbc for each of the provider lookups, then use SORT() to get the lowest cost. It's quite easy, and you do not need to resort to AGI. You can do almost anything in the dial plan with enough

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Jay R. Ashworth
On Wed, Feb 13, 2008 at 11:33:19AM -0600, Tilghman Lesher wrote: On Wednesday 13 February 2008 09:57:59 Alex Balashov wrote: Tilghman Lesher wrote: Uh, why not? You can do LCR quite easily in the dialplan, by using func_odbc for each of the provider lookups, then use SORT() to get the

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Tilghman Lesher
On Wednesday 13 February 2008 09:57:59 Alex Balashov wrote: Tilghman Lesher wrote: Uh, why not? You can do LCR quite easily in the dialplan, by using func_odbc for each of the provider lookups, then use SORT() to get the lowest cost. It's quite easy, and you do not need to resort to AGI.

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Douglas Garstang
- Original Message From: Jay R. Ashworth [EMAIL PROTECTED] To: asterisk-users@lists.digium.com Sent: Wednesday, February 13, 2008 9:45:34 AM Subject: Re: [asterisk-users] LCR in Asterisk On Wed, Feb 13, 2008 at 11:33:19AM -0600, Tilghman Lesher wrote: On Wednesday 13

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Philipp Kempgen
Douglas Garstang wrote: - Original Message From: Jay R. Ashworth [EMAIL PROTECTED] To: asterisk-users@lists.digium.com Sent: Wednesday, February 13, 2008 9:45:34 AM Subject: Re: [asterisk-users] LCR in Asterisk On Wed, Feb 13, 2008 at 11:33:19AM -0600, Tilghman

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Tilghman Lesher
On Wednesday 13 February 2008 11:45:34 Jay R. Ashworth wrote: Having programmed in about 8 different languages over the last 25 years, I can see both points of view. And admittedly, I haven't tried to do non-trivial things with dialplan. That said, my view of this interaction is that

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Ira
At 09:33 AM 2/13/2008, you wrote: In the same way that a PHP programmer should not attempt write Python the way she writes PHP, I would agree with you. However, if you're willing to adapt to the ways the dialplan works, you can create dialplans which aren't obfuscated at all. Tcl and Lisp are

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Tilghman Lesher
Doug- Please fix your email client. One line per word in quoting is a little excessive. Better yet, turn off HTML. On Wednesday 13 February 2008 12:17:30 Douglas Garstang wrote: Is that nasty little problem of no local variables in macros fixed yet? That's a pretty big pain in the ass. You

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Jay R. Ashworth
On Wed, Feb 13, 2008 at 12:52:42PM -0600, Tilghman Lesher wrote: On Wednesday 13 February 2008 11:45:34 Jay R. Ashworth wrote: Having programmed in about 8 different languages over the last 25 years, I can see both points of view. And admittedly, I haven't tried to do non-trivial things

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Jay R. Ashworth
On Wed, Feb 13, 2008 at 07:49:36PM +0100, Philipp Kempgen wrote: Douglas Garstang wrote: [ ... ] do with a bash script, as opposed to Perl, Python, or any toolkits or frameworks. Could you fix your e-mail client please? I dunno; his message comes

Re: [asterisk-users] LCR in Asterisk

2008-02-13 Thread Alex Balashov
Tilghman Lesher wrote: Like any other language, you certainly can write in an obfuscated way, and the dialplan does not discourage it. That said, you certainly can write in a modularized way. I would guess that you simply aren't familiar with the dialplan enough to make those decisions, but

Re: [asterisk-users] LCR in Asterisk

2008-02-12 Thread Alex Balashov
Rizwan Hisham wrote: Hi all, I am planning to implement LCR routing on my already running asterisk server. Uptill now i have found out that asterisk has no support for lcr, i have to do something about it myself, for example using the AGI. Im looking for ideas here. Whats the best way to