[SR-Users] Perl Code Execution via kamailio.cfg fails
"Nicolas Rüger"
NicolasRueger at gmx.de
Wed Jul 14 14:31:18 CEST 2010
Hey Bradley,
thanks. You're right but that's been just a typing error in my mail. I actually call a function called "myprint"
perl_exec_simple("myprint");
So that's been not the problem. Sorry for the wrong typing.
Regards,
Nicolas
-------- Original-Nachricht --------
> Datum: Wed, 14 Jul 2010 08:08:33 -0400
> Von: "Watkins, Bradley" <Bradley.Watkins at compuware.com>
> An: "Nicolas Rüger" <NicolasRueger at gmx.de>, sr-users at lists.sip-router.org
> Betreff: 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 at lists.sip-router.org
> > [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of
> > "Nicolas Rüger"
> > Sent: Wednesday, July 14, 2010 6:18 AM
> > To: sr-users at 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 at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
More information about the sr-users
mailing list