[SR-Users] onreply _route syntax error for homer capture server

JR Richardson jmr.richardson at gmail.com
Fri Jan 20 14:37:11 CET 2012


Thanks Daniel,

I found the syntax error, missing second closing parenth in on_reply route.
if (!($rm =~ "^(NOTIFY|SUBSCRIBE|OPTIONS)")
to
if (!($rm =~ "^(NOTIFY|SUBSCRIBE|OPTIONS)"))

JR

> -----Original Message-----
> From: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
> Sent: Friday, January 20, 2012 5:06 AM
> To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
> Mailing List
> Cc: JR Richardson
> Subject: Re: [SR-Users] onreply _route syntax error for homer capture
> server
> 
> Hello,
> 
> can you try with:
> 
> if(is_method("NOTIFY|SUBSCRIBE|OPTIONS")) {
> 
> 
> Not sure method (which is reserved keyword), works with regular
> expressions, the example is with $rm, which is a variable and works with
> regexps.
> 
> Cheers,
> Daniel
> 
> 
> On 1/17/12 6:40 PM, JR Richardson wrote:
> > Hi All,
> >
> > Tuning my homer capture server and ran into a syntax error in the
> > onreply_route.  The idea is to NOT to capture
> > NOTIFY|SUBSCRIBE|OPTIONS.  The route block compiles ok but I get the
> > following errors for the lines in the onreply_route:
> >
> >   0(6443) :<core>  [cfg.y:3504]: parse error in config file
> > /usr/local/etc/kamailio/kamailio.cfg, line 48, column 46: syntax error
> >   0(6443) :<core>  [cfg.y:3504]: parse error in config file
> > /usr/local/etc/kamailio/kamailio.cfg, line 49, column 15: bad
> > expression
> >   0(6443) :<core>  [cfg.y:3504]: parse error in config file
> > /usr/local/etc/kamailio/kamailio.cfg, line 49, column 16:
> > ERROR: bad config file (3 errors)
> >
> > route {
> >          if (!(method =~ "^(NOTIFY|SUBSCRIBE|OPTIONS)")) {
> >                  sip_capture();
> >          }
> >          exit;
> > }
> >
> > 47 onreply_route {
> > 48        if (!($rm =~ "^(NOTIFY|SUBSCRIBE|OPTIONS)") {
> > 49                sip_capture();
> > 50        }
> > 51        drop;
> > 52 }
> >
> > This example was used from the homer wiki
> > http://code.google.com/p/homer/wiki/Kamailio
> >
> > root at homer:/etc/kamailio# kamailio -V
> > version: kamailio 3.2.1 (x86_64/linux) bee094
> >
> > Any guidance is appreciated.
> >
> > Thanks.
> >
> > JR
> 
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list