Asterisk   -- A telephony toolkit for Linux.
res_perl   -- A Module To Incoperate Perl Into Asterisk.

Copyright (C) 2003, Anthony Minessale
Anthony Minessale <anthm@cylynx.com>


res_perl 3.0


This is res_perl the "mod_perl" of sorts for asterisk.  It is an actual live Perl Interpreter 
embeded in a module so when it starts up the perl stays resident in memory the whole life of the 
Asterisk process.

IMPORTANT: As of this version you need to have perl compiled with usethreads and useithreads
           For a quick build of perl from src use 'make perl' *NOTE* ***this will erase your current perl***

FEATURES:

	It can call perl functions from extensions.conf in a special package called Asterisk::Embed
        that is loaded on startup from /etc/asterisk/asterisk_init.pm

	exten => 1,1,Perl(myfunc:arg_1:arg_2:arg_n......)

	If you change asterisk_init.pm you need to enter the cli command "perl labotomy" to read the changes.

	There is a also module included called LoadFile that allows you to store your perl apps
	in a seperate file and load them into memory without restarting they are loaded from 
	/etc/asterisk/perl/apps automaticly.
	exten => 1,1,Perl(Loadfile:demo.pl:arg_1:arg_2:arg_n....)
	If you change the file demo.pl it will load it from disk instead of memory to recache
	just send the cli command "perl call LoadFileCacheAll"
	

	inside these functions you have access to several perlified api commands starting with asterisk_* <--funny
	see INC/asterisk_init.pm for a few examples (there are a lot more than that implemented see AstAPIBase.c for
	em all. just assume any args to those C func are perl scalars)

	There are also some special return commands: (1 for now)

	thread:<function>

	This will spin off a thread with the perl sub you specify running inside it.
	the sub will get 1 scalar arg being the number of times it was run (starting with 1)

	The functions startup() and shutdown() are called respectively on load and unload of the module

BUGS:

	If you stare at the source code from about 2 feet back for approx 30 seconds you will start
	to see that the entire thing is in itself 1 large bug.  I am not so much a C programmer as I am
	a Perl programmer so that was my motivation for this idea but it probably is sucky to some
	arrogant linux zelot somewhere out there.  If that is you , ha ha I made you download it.....



WARNING:

	I, of course, am not responsible for the damage you or my intelectual property (stupid program) do to your or anybody's PC
	(People don't kill PC's...................Micro$oft kills PC's) 
	[hmm a shot at linux zelots and Micro$oft in the same file.  Who ..DO.. i like....?]

