Combining them, you can make parts of configuration file to be ignored at start time. For example, you can have in config a lot of xlog lines to help you troubleshooting, but you do not want them in a normal production environment. In your config you can have:
#!define ID - define the ID
#!ifdef ID - test if ID is defined
#!ifndef ID - test if ID is not defined
#!else - create an else branch for ifdef/ifndef tests
#!endif - end an ifdef/ifndef block
To run in debug mode, add next line at the top of configuration file and then restart:
xlog("sip message from IP: $si and port $sp\r\n");
For more examples, see Kamailio 3.0.0 default config file - authentication, NAT traversal, presence functionality, ... can be enabled or disabled via #!define.
Next to write about is route blocks with names.
Post a Comment