See also: Kamailio 3.0.x - DYK - Table of Content
Kamailio 3.0.0 brought #!define directive support. This can be used as a neat and easy way to comment big blocks of config. Using multi-lines comment format in between /* */ is not convenient for nested cases.
Trying to enclose in multi-line comment a snippet like next (well, not that big in this example) is not straightforward:
/* log time and method */Clearly is broken to do it like:
xlog("SIP $rm at $Tf\n");
/* log source ip and port */
xlog("SIP from $si:$sp\n");
/*The option in 3.0.x is:
/* log time and method */
xlog("SIP $rm at $Tf\n");
/* log source ip and port */
xlog("SIP from $si:$sp\n");
*/
#!ifdef EXTRACOMMENTYou can use anything you haven't defined instead of EXTRACOMMENT.
/* log time and method */
xlog("SIP $rm at $Tf\n");
/* log source ip and port */
xlog("SIP from $si:$sp\n");
#!endif
Enabling it is:
#!define EXTRACOMMENT
#!ifdef EXTRACOMMENT
/* log time and method */
xlog("SIP $rm at $Tf\n");
/* log source ip and port */
xlog("SIP from $si:$sp\n");
#!endif
No comments:
Post a Comment