[SR-Users] Perl Code Execution via kamailio.cfg fails
"Nicolas Rüger"
NicolasRueger at gmx.de
Thu Jul 22 16:28:49 CEST 2010
Hello,
"xlog" is working fine for me as well and I get a good debugging output starting Kamailio with "./kamailio" after editign the loglevel in "kamailio.cfg" as follows:
debug=9
log_stderror=yes
Thank you for your help.
Regards,
Nicolas
-------- Original-Nachricht --------
> Datum: Thu, 15 Jul 2010 13:40:41 +0200
> Von: Henning Westerholt <henning.westerholt at 1und1.de>
> An: "Nicolas Rüger" <NicolasRueger at gmx.de>
> CC: "sr-users at lists.sip-router.org" <sr-users at lists.sip-router.org>
> Betreff: Re: [SR-Users] Perl Code Execution via kamailio.cfg fails
> On Thursday 15 July 2010, Nicolas Rüger wrote:
> > 1.)
> > Printing ERRORs to stderr didn't work as I started Kamailio with
> "./kamctl
> > start" instead of "./kamailio"...stupid mistake...
>
> Hello Nicolas,
>
> good that you managed to get it working in the end. :-)
>
> > BUT
> >
> > still don't know why Kamailio isn't writing to "syslogs" when
> > "log_stderror=no" is set in "kamailio.cfg" (using "debian lenny")
>
> Maybe you can just do a grep from your log string in /var/log - it should
> be
> somewhere.
>
> > and
> >
> > still don't know why just "xlog()" works, but "log()" doesn't seem to
> have
> > an effect.
>
> xlog is the method i used so far and what most people use - maybe the
> default
> log level of "log" is different, or there is another problem.
>
> > 2.)
> > My Perlscript got executed finally. I used the following command in
> > "kamailio.cfg" in the end.
> >
> > perl_exec_simple("myprint");
> >
> > My script/subroutine "myprint" actually is writing a control string in
> > another file...just for testing...
> >
> > I finally used an absolute path instead of an relative path in the
> > perlscript for the filehandle. That worked out then.
> >
> > BUT
> >
> > still don't know where Kamailio is trying to open the filehandle when I
> use
> > a relative path as it's not working then.
> >
> > Note:
> > When I execute the subroutine from another perlscript it works out
> > perfectly using a relative path for the filehandle.
>
> kamailio using the root '/' directory as working dir as default, if
> nothing is
> specified, i think. And here it probably have no permissions to write. You
> can
> specify a working dir via some daemon parameter.
>
> Regards,
>
> Henning
>
> _______________________________________________
> 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