<DIV>
<DIV>That is probably possible and not too difficult.</DIV>
<DIV> </DIV>
<DIV>I learned what AGI was about 30 minutes after I was finished </DIV>
<DIV>with the last revision of app_perl where I added support to </DIV>
<DIV>launch a perl function in a thread </DIV>
<DIV> </DIV>
<DIV>(BTW I am suspicious that you</DIV>
<DIV>may ironically need perl with no threads compiled for it to work right </DIV>
<DIV>in asterisk despite the fact that you gain thread functionality via asterisk)</DIV>
<DIV> </DIV>
<DIV>I have not really carefully looked at AGI yet but from what I remember </DIV>
<DIV>It communicates with the ext process via STDIN and looks at the ENV</DIV>
<DIV>for information. so what I think you would need would be a fake ENV and a special variable to contain the same info that would have been sent to STDIN created uniquely for each execution. This of course would be limiting the AGI to perl code so another method would be to make </DIV>
<DIV>a function via the app_perl or a dedicated C module to run all the agi app </DIV>
<DIV> at startup and leave them open speaking back and forth over IO stream.</DIV>
<DIV> </DIV>
<DIV>I do notice I started stepping on the toes of AGI because I never heard of</DIV>
<DIV>it while I was coding my module so I think some of the things that AGI does can also be accomplished on app_perl </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>The 3 things I was dreaming of when I was working on it were:</DIV>
<DIV> </DIV>
<DIV>1) If the module has the power to create extensions then you can use </DIV>
<DIV> it to fetch that data from a database on startup or in mid run.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>2) If the module can run threads It could implement </DIV>
<DIV> an external listener of some sort and communicate with </DIV>
<DIV> a partner thread over shared memory and with the world </DIV>
<DIV> over sockets, tcpip etc (web server) I had a demo working</DIV>
<DIV> where you could go to the asterisk on a web browser an see </DIV>
<DIV> a readout like "number is 0" then if you dial into a certain ext</DIV>
<DIV> with a phone the number increments and when you reload the </DIV>
<DIV> web page it said "number is 1" and so on.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>3) Despite the fact that anything I can possibly dream up </DIV>
<DIV> can be implemented with ease because of the robustness </DIV>
<DIV> of asterisk (adding plug ins is like doing a child's jigsaw puzzle</DIV>
<DIV> as you can see because I don't even know how to work it yet can </DIV>
<DIV> build a module for it) </DIV>
<DIV> By integrating perl I felt more of those ideas could be brought to life</DIV>
<DIV> faster (1 module can open several doors) and It would allow me</DIV>
<DIV> to bridge the gap between asterisk and a ton of perl stuff I have</DIV>
<DIV> made along the years.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/">SBC Yahoo! DSL</a> - Now only $29.95 per month!