[SR-Users] Error bad syntax - DEBUG_FLAGS

Daniel-Constantin Mierla miconda at gmail.com
Mon Jun 6 22:13:34 CEST 2011


Hello,

if you don't attach the configuration file, then you have to tell which 
are the lines 800 and 802.

 From what you pasted, seems to be at least an extra curly brace at the 
end of route[ROUTE_DEBUG_FLAGS].

Cheers,
Daniel

On 6/6/11 8:27 PM, Skyler wrote:
>
> 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);
>
>   }
>
> }
>
> }
>
>
>
> _______________________________________________
> 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

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda

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


More information about the sr-users mailing list