[SR-Users] Error bad syntax - DEBUG_FLAGS

Skyler skchopperguy at gmail.com
Mon Jun 6 20:27:29 CEST 2011


Hi all,

 

 I'm new to Kamailio (3.1), learning the configuration language. I'm trying
to take the advice from one of the docs to create a DEBUG block and place
calls everywhere in my script. Right out of the gate I get these errors on
loading.  

 

 Can someone tell me where I went wrong and how I can fix this? It says flag
not declared though it's there and I'm a bit lost.

 

 

0(10986) : <core> [cfg.y:3412]: parse error in config file
//etc/kamailio/kamailio.cfg, line 800, column 6: syntax error

 0(10986) : <core> [cfg.y:3412]: parse error in config file
//etc/kamailio/kamailio.cfg, line 800, column 6: missing '(' or ')' ?

 0(10986) : <core> [cfg.y:3412]: parse error in config file
//etc/kamailio/kamailio.cfg, line 800, column 6: bad command: missing ';'?

 0(10986) : <core> [cfg.y:3412]: parse error in config file
//etc/kamailio/kamailio.cfg, line 800, column 18: '('')' expected (function
call)

 0(10986) : <core> [cfg.y:3412]: parse error in config file
//etc/kamailio/kamailio.cfg, line 800, column 18: bad command: missing ';'?

 0(10986) : <core> [cfg.y:3412]: parse error in config file
//etc/kamailio/kamailio.cfg, line 800, column 20: bad command

 0(10986) : <core> [cfg.y:3412]: parse error in config file
//etc/kamailio/kamailio.cfg, line 802, column 24: flag not declared

 

#------------------------------

# Flags

#------------------------------

#!define FLAG_DEBUG 1

...

route {

 

               # Call debug flags

                route(ROUTE_DEBUG_FLAGS);

 

.....

 

route[ROUTE_DEBUG_FLAGS] {

  resetflag(FLAG_DEBUG);

  #------------------------------------------------------------

  # Methods that will have debugging turned on

  #-----------------------------------------------------------

       if (is_method("ACK")) { resetflag(FLAG_DEBUG); }

 else if (is_method("BYE")) { setflag(FLAG_DEBUG); }

 else if (is_method("CANCEL")) { setflag(FLAG_DEBUG); }

 else if (is_method("INVITE"))        { setflag(FLAG_DEBUG); }

  else if (is_method("OPTIONS"))       { setflag(FLAG_DEBUG); }

  else if (is_method("PUBLISH"))       { setflag(FLAG_DEBUG); }

  else if (is_method("REGISTER"))      { resetflag(FLAG_DEBUG); }

  else if (is_method("MESSAGE"))       { setflag(FLAG_DEBUG); }

  else if (is_method("NOTIFY"))        { setflag(FLAG_DEBUG); }

  else if (is_method("SUBSCRIBE"))     { setflag(FLAG_DEBUG); }

  else if (is_method("INFO"))          { setflag(FLAG_DEBUG); }

  else if (is_method("PRACK"))         { setflag(FLAG_DEBUG); }

  else if (is_method("REFER"))         { setflag(FLAG_DEBUG); }

  else {

     setflag(FLAG_DEBUG);

  }

}

 

}

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110606/2de00910/attachment.htm>


More information about the sr-users mailing list