Ugh... My apologies for the disclaimer, I thought I had already asked my e-mail admin to whitelist this mailing list so it wouldn't get appended.
Hopefully this is fixed now... :/
Regards, - Brad
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Watkins, Bradley Sent: Wednesday, July 14, 2010 8:09 AM To: "Nicolas Rüger"; sr-users@lists.sip-router.org Subject: Re: [SR-Users] Perl Code Execution via kamailio.cfg fails
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of "Nicolas Rüger" Sent: Wednesday, July 14, 2010 6:18 AM To: sr-users@lists.sip-router.org Subject: [SR-Users] Perl Code Execution via kamailio.cfg fails
Hello,
I try to execute some PERL-code within kamailio v3 for some research due to my thesis. I'm using debian lenny, kamailio_3.0.0 and perl_5.10.0.
I added the follwoing lines to "kamailio.cfg":
loadmodule "perl.so" modparam("perl", "filename", "/opt/kamailio-3.0.0/PERL/myperl.pl") modparam("perl", "modpath",
"/opt/kamailio-3.0.0/lib/kamailio/perl")
I added a subroutine called "myprint" to the file "myperl.pl" for testing.
I tried to exec the subroutine by adding the following line to "kamailio.cfg" just before "Routing Logic" (...even tried within "route{..}") as described in the perl_module description :
perl_exec_simple("myperl");
This is incorrect, unless you have a function named "myperl" inside of your script "myperl.pl". The perl_exec() and perl_exec_simple() calls are looking for a named function inside of the file you declare in your modparam.
Regards,
- Brad
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users