[Asterisk-Users] Re: New Module app_perl

Anthony Minessale anthmct at yahoo.com
Wed Jun 25 10:57:40 MST 2003


The first wheel was said to be a log, then probably 2 logs 
today it is rubber , metal , wooden etc. 
 
J.K. I'm sure debate over reinventing the wheel  or if perl sucks or not 
will see more airtime than the topic of using perl in asterisk being cool or not will.
 
 
Everything I needed in the app_perl was located right in pbx.c from aterisk
so I actually include that c file into mine out of fear of losing compatibility 
since it evolves so fast.  What I do now is by includeing pbx.c I can 
call any of the important func that asterisk itself uses so I re-implement 
my own mini-command interepter for the return value of a perl fucntion
to send to me then I parse those commands and feed them to real asterisk calls.
 
So for a start all the func i frontend in app_perl could be perlified with xs
and buried in the module as a package so the per func could use it and call those 
functions. 
 
So you get C embedding perl embedding C to call func from the original C 
 
Sounds Silly but you could avoid inventing large painful wheels in C
by hooking up perl and its army of premade wheels (I made < 1k webserver 
func to load in asterisk already)
 
Lot's of possibilities........ perl likes to parse text more than anything else 
you could develop the config file parsing engine that way and go to 
town making up a format rather than dealing with coding the parsing 
and you can teach asterisk to read config files from different systems etc. 
maybe asterisk is the emacs of pbx systems (oh oh here come more flames going off on a tangent)  YES I like  PERL! and EMACS!
 
 
 
 
 
 
 
On Monday, Jun 23, 2003, at 10:34 America/Los_Angeles, James Golovich 
wrote:

> No point in reinventing the wheel here.  PersistentPerl (aka 
SpeedyCGI)
> can eliminate the startup cost for using perl with AGIs.
>
> It works great, and even allows the processes to reuse database
> connections

Speed is not the only reason to embed Perl in the "host application".

The real cool stuff comes if the API of the host application is exposed 
to Perl, so you can write asterisk modules in Perl (like you can use 
the Apache API from Perl with mod_perl).

  - ask

-- 
http://www.askbjoernhansen.com/

 
 



---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20030625/978027bd/attachment.htm


More information about the asterisk-users mailing list