Hello all,
I'm looking to add a -C [filename] flag that will read the root
kamailio.cfg file and its included files and dump the compiled result and
exit.
i.e. kamailio -C /path/to/root/file.cfg
[ DUMPS COMPILED CONFIGURATION INCLUDING / IMPORTS & INCLUSIONS ]
Similar to nginx -T
I attempted to research what files are involved and it looks like:
src/main.c
src/core/cfg.lex
src/core/lex.yy.c
src/core/cfg.tab.c
src/core/cfg.tab.h
Problems, I'm having:
1) It looks like I need to add the -C option similar to the -c option,
which I've done and it does not recognize the new -C flag.
2) I'm not entirely sure how to access the compiled configuration from
memory, it looks like yyparse maybe involved in compiling the
configuration? sr_push_yy_state seems to do some compiling, but how do I
access the result from src/main.c ?
Any further direction or help with this is appreciated.
- Brandon