Try add one mandatory route block like route{ ; }
On Wed, 2025-07-23 at 16:48 +0000, Fernando Lopes via sr-users wrote: > Hello everyone, > > I'm having an issue with my Kamailio config where I'm getting the > following error: > > ERROR: bad config file (0 errors) (parsing code: 0) > 0(2) ERROR: <core> [core/ppcfg.c:276]: pp_ifdef_level_error(): > different number of preprocessor directives: 1 more #!if[n]def as > #!endif > > I've gone through the config up and down so many times and can't seem > to find the problem. I have a definitions.cfg file where I define all > the variables, and I’ve made sure that every #!ifdef WITH_SOMETHING > has a corresponding definition. > I also ran this command (recommended by GPT): > > grep -E '#!ifn?def|#!endif' /usr/local/etc/kamailio/kamailio.cfg > > It shows matching numbers of #!ifdef and #!endif, and I’ve checked it > manually several times — everything looks fine. > Any tips for debuging or finding the problem. > > #!ifdef WITH_CDRS > #!endif > #!ifdef WITH_DEBUG > #!endif > #!ifdef WITH_TLS > #!endif > #!ifdef WITH_NAT > #!endif > #!ifdef WITH_TLS > #!endif > #!ifdef WITH_FAIL2BAN > #!ifdef WITH_ANTIFLOOD > #!endif > #!endif > #!ifdef WITH_DISPATCHER > #!endif > #!ifdef WITH_RESPONSE_STATS > #!endif > #!ifdef WITH_HOMER > #!endif > #!ifdef WITH_CDRS > #!endif > #!ifdef WITH_RTPENGINE > #!endif > #!ifdef WITH_HTTP > #!endif > #!ifdef WITH_WEBSOCKETS > #!endif > #!ifdef WITH_NAT > #!ifdef WITH_RTPENGINE > #!endif > #!endif > #!ifdef WITH_TLS > #!endif > #!ifdef WITH_ANTIFLOOD > #!endif > #!ifdef WITH_FAIL2BAN > #!endif > #!ifdef WITH_DISPATCHER > #!endif > #!ifdef WITH_HOMER > #!endif > #!ifdef WITH_CDRS > #!endif > #!ifdef WITH_FAIL2BAN > #!endif > #!ifdef WITH_RTPENGINE > #!endif > #!ifdef WITH_HOMER > #!endif > #!ifdef WITH_RTPENGINE > #!endif > #!ifdef WITH_ANTIFLOOD > #!endif > #!ifdef WITH_NATSIPPING > #!endif > #!ifdef WITH_NOAUTH_PRIVATE_NET > #!endif > #!ifdef WITH_AUTH > #!endif > #!ifdef WITH_NAT > #!endif > #!ifdef WITH_NAT > #!endif > #!ifdef WITH_NAT > #!endif > #!ifdef WITH_RTPENGINE > #!endif > #!ifdef WITH_DISPATCHER > #!endif > #!ifdef WITH_WEBSOCKETS > #!endif > #!ifdef WITH_HTTP > #!ifdef WITH_WEBSOCKETS > #!endif > #!endif > #!ifdef WITH_RTPENGINE > #!endif > > Thank you. > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions -- > sr-users@lists.kamailio.org > To unsubscribe send an email to sr-users-le...@lists.kamailio.org > Important: keep the mailing list in the recipients, do not reply only > to the sender! __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!