[asterisk-users] agi macro problem

Steve Edwards asterisk.org at sedwards.com
Fri Jul 30 15:49:50 CDT 2010


> On Fri, 30 Jul 2010, Zarko Zivanovic wrote:
> 
>> I need simple whopicked.agi (instead of .rb) which will simply take the 
>> value 30086 (that I pass to macro)

On Fri, 30 Jul 2010, Steve Edwards wrote:

> While ".rb" suggests a "Ruby source file," ".agi" suggests nothing.

On Fri, 30 Jul 2010, Danny Nicholas wrote:

> I'm sure this is "not a good practice", but I actually use the .agi 
> suffix on my AGI's or AGI launch stubs to "keep it straight" that even 
> though the actual program is bash or PERL, that the function of the 
> program is to generally be launched by the Asterisk AGI. That way, if 
> the program gets moved from /var/lib/asterisk/agi-bin, I know it's not 
> just a run-of-the-mill bash or Perl script.  Since the #! Line tells you 
> what it actually is, it is (IMO) a "no harm" proposition.

I don't have an issue with the practice. The phrasing of the OP implied 
[s]he thought that .agi meant something "instead of" .rb. Naming your Ruby 
script .agi would be perfectly acceptable to Asterisk, the shell, and 
Ruby.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list