[SR-Users] Perl Code Execution via kamailio.cfg fails

"Nicolas Rüger" NicolasRueger at gmx.de
Wed Jul 14 15:21:19 CEST 2010


Hi Henning,

as I didn't know how to create logfiles I used "Wireshark" to log all data-packages. I use 2 local sip-clients (pjsip) calling each other for testing the behavior. 
Therefore I'm sure that the INVITE is sent by one client and replied by the other client. I even get an RTP session running between them.

For testing I uncommented the if-statement, so that the exec-command will be used in every case (see the following lines). Unfortunately it still won't work. Any other ideas?


  ####### Routing Logic ########

  # main request routing logic

  route{

  #mystuff BEGIN

     perl_exec("myprint"); 

  #mystuff END

Where can I find any logfiles logging information while kamailio is running, when I insert the following lines for example?

  log("mylog before perl execution\n");
  perl_exec("myprint");
  log("mylog after perl execution\n"); 
 
Regards, 
Nicolas


-------- Original-Nachricht --------
> Datum: Wed, 14 Jul 2010 14:51:33 +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>, "Bradley.Watkins at compuware.com" <Bradley.Watkins at compuware.com>
> Betreff: Re: [SR-Users] Perl Code Execution via kamailio.cfg fails

> On Wednesday 14 July 2010, Nicolas Rüger wrote:
> > Hi Henning,
> > 
> > no further warnings (see logs below). I increased the DEBUG-LEVEL to 4
> in
> >  "kamailio.cfg" and added the follwing lines at the beginng of "routing
> >  logic" in "kamailio.cfg".
> > 
> >   ####### Routing Logic ########
> >   # main request routing logic
> > 
> >   route{
> > 
> >   #mystuff BEGIN
> > 
> >   if (is_method("INVITE")) {
> >                 perl_exec("myprint");
> >                 exit;
> >   }
> >   #mystuff END
> > 
> > 
> > Didn't work out.
> > [..]
> 
> Hi Nicolas,
> 
> the log file you've quoted only shows the startup of the server. But there
> are 
> no traces that you actually recieved a message on the server which could
> then 
> trigger the script command you want to execute. This would be probably a
> bit 
> more interesting for debugging.
> 
> I'd also suggest that you add a xlog() statement just before the
> perl_exec, 
> this should inform you in the logs if the perl method is reached.
> 
> Cheers,
> 
> 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