[Asterisk-Users] FastAgi Help

reseaux reseauxit at yahoo.it
Tue Feb 8 02:48:33 MST 2005


Dear Steven
	many thanks for your reply i have fix my problem on res_perl on my Mandrake 
9.2 in a very simple way download:
- libgdbm2-devel
- db2-devel
I hope is usefull for some other guys want try this very usefull module on 
Asterisk.

> > So i try to go on using the FastAGI that i think is great idea because i
> > can balance the CPU load using more Box, but how I can translate my
> > simple perl script and use it on FastAGI?
>
> If your script was truly simple, I doubt you would have a high load
> average. Could it be that you are really just memory starved and your
> load average is skyrocketing due to swap thrashing? I could see 100 perl
> interpreters causing a large memory usage problem, but not necessarily a
> high cpu usage unless they are doing something very busy.

About the intensive CPU Load (load average: 6 woww i never see so big load) i 
dont see also some related Memory problem, in my script i made some lot of 
MySQL Select & Insert but in another server, so i dont think i have made so 
big perl script :-) Do you think is possible this kind of load?

> > Usually i used the Asterisk::perl library and i put some AGI script on my
> > dialplan like this:
> > exten => 100,103,DeadAGI(prepaid_.agi,lcr,${called},${destid},${tgroup},
> > ${lcrorder})
> >
> > in this mode i also send some parameter to the perl script.
> > Looking inside the fastagi-test example i cant understand how i can
> > simple pass some value to the script.. Some help is welcome..
> >
> > Also i have see that eoj have made some modification to the FastAGI:
> > > send script parameter with FastAGI (bug #3270)
> >
> > But what i can we do with it? I know im very monkey... :-)
>
> Why not put those values into a variable that can be queried by the app.
> Well actually, they are already in variables, why don't you just go use
> the functions to look at the named variables?
>
> As far as perl and fast-agi, it is modeled after the fastcgi interfaces.
> You might do well to go learn how fastcgi works with perl and determine
> if you feel like continuing that route. I'm sure there is decent
> documentation on fastcgi and perl available to either move you forward
> or scare you away from it.

I have see only one example in asterisk source using the FastAGI and anymore 
on the web.. As i can see seems not so complicate but im not so expert in 
perl so i have try to look the example found on asterisk source of FastAGI 
(fastagi-test) and compare on agi-test.agi the two example seems the same 
routine but with only a loop (to watch the connection output?) but now if i 
want using the Asterisk::perl function? I can use it to simplify the writing 
of the script?
Many thanks for the help
Sincerely
Dimitri




More information about the asterisk-users mailing list