[OpenSIPS-Users] disabling / filtering some logs

Kingsley Tart kingsley at dns99.co.uk
Tue Dec 13 10:52:50 UTC 2022


Is it possible to filter what gets logged into syslog, with more fine
grained detail than just setting the log level?

I have essentially this code:

if (!validate_dialog()) {
    if ($rc == -4) {
        send_reply(481, "Call does not exist");
    } else if (!fix_route_dialog()) {
        xlog("L_WARN", "$cfg_file/$cfg_line @ $Tsm: failed to fix route dialog; rc=$rc\n");
        send_reply(488, "Unable to fix dialog");

I'm getting loads of entries in opensips.log where validate_dialog()
fails with rc -2 but the call still works because fix_route_dialog() is
successful, eg:

ERROR:dialog:dlg_validate_dialog: failed to validate remote contact: dlg=[sip:] , req=[sip:;user=phone]

I would prefer to not have opensips.log littered with these, but still
want to see other errors.

Is this possible?


More information about the Users mailing list