[Users] New module: perl

Bastian Friedrich bastian.friedrich at collax.com
Mon Dec 11 11:41:09 CET 2006


Hi everybody,

since last friday, OpenSER HEAD has a new module, called perl. As the name 
suggests, it incorporates a Perl interpreter within OpenSER.

What can you do with it?
========================
The perl module lets you request information from the SIP message currently 
active, lets you make decisions based on that information and finally modify 
the SIP message.

In other words, you can do almost everything you could have done in the 
OpenSER configuration file, plus much, much more.

How do I use it?
================
The perl module should be automatically compiled in current CVS checkouts of 
the HEAD branch, as long as you have a fairly recent Perl version (including 
possibly necessary development packages) installed on your system. Load it in 
your OpenSER configuration just like all the other modules.

Set the two module parameters "filename" and "modpath"; the first one points 
to your perl script (samples are included in the doc directory), the second 
points to the path where the Perl packages reside (they currently are 
not "installed" anywhere automatically. Feel free to do that yourself).

In the configuration file, you may then call the functions defined in your 
Perl script with the "perl_exec" and "perl_exec_simple" functions. The 
samples and the README file should tell you more about it.

What should the Perl script look like?
======================================
Please take a look at the doc/samples directory located in the perl module 
directory. They should give you an introduction of how such a script could 
look like.

The full API is described in the README file.

The module documentation on the OpenSER website is not 100% apt as of now, but 
should be updated during the next days.

Great! And now?
===============
Please feel free to test the perl module. Although it currently runs fine for 
me, deployment in production environments is not recommended. Tell me about 
your experiences and any bugs you found. If you write a test script, I'd be 
thankfull if you send it to me for inclusion as a sample.

If you have any questions or remarks, please send a mail to the users or 
developer mailing lists (depending on the focus), or directly to me.

Thx for your attention, Regards,
   Bastian

-- 
Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany
p: +49 (0) 761-45684-24
f: +49 (0) 761-45684-10        www.collax.com

\ Things you never wanted to know:
\ In Minnesota it is illegal to cross state lines with a duck on your
\   head.




More information about the sr-users mailing list