[i have no idea about email subject nor anything else for this except prior i configured rtpproxy to work with kamailio on a unix socket and updated tls.cfg to use my cert/key]
running kamailio from
deb http://deb.kamailio.org/kamailio jessie main
$ sudo service kamailio restart [FAIL] Not starting Kamailio SIP Server: invalid configuration file! ... failed! failed! [....] 0(15228) INFO: tls [tls_init.c:385]: init_tls_compression(): tls: init_tls: disabling compression... 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: syntax error 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: Invalid arguments 0(15228) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 35: ERROR: bad config file (3 errors) 0(15228) WARNING: <core> [ppcfg.c:219]: pp_ifdef_level_check(): different numbe[FAILpreprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1 ... failed! failed!
/* enhanced DB accounting */ #!ifdef WITH_ACCDB modparam("acc", "db_flag", FLT_ACC) modparam("acc", "db_missed_flag", FLT_ACCMISSED) modparam("acc", "db_url", DBURL) modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
# ----- usrloc params ----- /* enable DB persistency for location entries */ #!ifdef WITH_USRLOCDB modparam("usrloc", "db_url", *DBURL*) <--------not happy with DBURL here modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", MULTIDOMAIN) #!endif
Do you have:
#!define WITH_MYSQL
in your config?
Cheers, Daniel
On 04/11/14 16:32, shmick@riseup.net wrote:
[i have no idea about email subject nor anything else for this except prior i configured rtpproxy to work with kamailio on a unix socket and updated tls.cfg to use my cert/key]
running kamailio from
deb http://deb.kamailio.org/kamailio jessie main
$ sudo service kamailio restart [FAIL] Not starting Kamailio SIP Server: invalid configuration file! ... failed! failed! [....] 0(15228) INFO: tls [tls_init.c:385]: init_tls_compression(): tls: init_tls: disabling compression... 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: syntax error 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: Invalid arguments 0(15228) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 35: ERROR: bad config file (3 errors) 0(15228) WARNING: <core> [ppcfg.c:219]: pp_ifdef_level_check(): different numbe[FAILpreprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1 ... failed! failed!
/* enhanced DB accounting */ #!ifdef WITH_ACCDB modparam("acc", "db_flag", FLT_ACC) modparam("acc", "db_missed_flag", FLT_ACCMISSED) modparam("acc", "db_url", DBURL) modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
# ----- usrloc params ----- /* enable DB persistency for location entries */ #!ifdef WITH_USRLOCDB modparam("usrloc", "db_url", *DBURL*) <--------not happy with DBURL here modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", MULTIDOMAIN) #!endif
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
not previously no
$ sudo grep -e '#!define' /etc/kamailio/kamailio.cfg # Several features can be enabled using '#!define WITH_FEATURE' directives: #!define MULTIDOMAIN 1 #!define MULTIDOMAIN 0 #!define FLT_ACC 1 #!define FLT_ACCMISSED 2 #!define FLT_ACCFAILED 3 #!define FLT_NATS 5 #!define FLB_NATB 6 #!define FLB_NATSIPPING 7
$ sudo cat /etc/kamailio/kamailio-local.cfg #!define WITH_MYSQL #!define WITH_AUTH #!define WITH_USRLOCDB #!define WITH_NAT #!define WITH_TLS
all the above didn't work thanks to a useless howto
if i remove /etc/kamailio/kamailio-local.cfg and add only #!define WITH_MYSQL to /etc/kamailio/kamailio.cfg
i then get the following with offending lines below and the service restart error
####### Defined Values #########
# *** Value defines - IDs used later in config #!ifdef WITH_MYSQL # - database URL - used to connect to database server by modules such # as: auth_db, acc, usrloc, a.s.o. #!ifndef DBURL DBURL "mysql://kamailio:kamailiorw@localhost/kamailio" *offending line* #!endif #!endif #!ifdef WITH_MULTIDOMAIN # - the value for 'use_domain' parameters #!define MULTIDOMAIN 1 #!else #!define MULTIDOMAIN 0 #!endif
####### Global Parameters #########
### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR #!ifdef WITH_DEBUG debug=4 log_stderror=yes #!else debug=2 <---- *offending line* log_stderror=no #!endif
$ sudo service kamailio start [FAIL] Not starting Kamailio SIP Server: invalid configuration file! ... failed! failed! [....] 0(5959) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 119, column 7-54: syntax error 0(5959) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 147, column 6: unknown config variable 0(5959) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 147, column 7: ERROR: bad config file (3 errors) 0(5959) WARNING: <core> [pp[FAIL:219]: pp_ifdef_level_check(): different number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1 ... failed!
appart from the howto i have not altered anything else except for creating the local cfg which is now deleted
kamilio docs are very hard to digest, aren't they !
Daniel-Constantin Mierla:
Do you have:
#!define WITH_MYSQL
in your config?
Cheers, Daniel
On 04/11/14 16:32, shmick@riseup.net wrote:
[i have no idea about email subject nor anything else for this except prior i configured rtpproxy to work with kamailio on a unix socket and updated tls.cfg to use my cert/key]
running kamailio from
deb http://deb.kamailio.org/kamailio jessie main
$ sudo service kamailio restart [FAIL] Not starting Kamailio SIP Server: invalid configuration file! ... failed! failed! [....] 0(15228) INFO: tls [tls_init.c:385]: init_tls_compression(): tls: init_tls: disabling compression... 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: syntax error 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: Invalid arguments 0(15228) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 35: ERROR: bad config file (3 errors) 0(15228) WARNING: <core> [ppcfg.c:219]: pp_ifdef_level_check(): different numbe[FAILpreprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1 ... failed! failed!
/* enhanced DB accounting */ #!ifdef WITH_ACCDB modparam("acc", "db_flag", FLT_ACC) modparam("acc", "db_missed_flag", FLT_ACCMISSED) modparam("acc", "db_url", DBURL) modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
# ----- usrloc params ----- /* enable DB persistency for location entries */ #!ifdef WITH_USRLOCDB modparam("usrloc", "db_url", *DBURL*) <--------not happy with DBURL here modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", MULTIDOMAIN) #!endif
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 05/11/14 10:46, shmick@riseup.net wrote:
not previously no
$ sudo grep -e '#!define' /etc/kamailio/kamailio.cfg # Several features can be enabled using '#!define WITH_FEATURE' directives: #!define MULTIDOMAIN 1 #!define MULTIDOMAIN 0 #!define FLT_ACC 1 #!define FLT_ACCMISSED 2 #!define FLT_ACCFAILED 3 #!define FLT_NATS 5 #!define FLB_NATB 6 #!define FLB_NATSIPPING 7
$ sudo cat /etc/kamailio/kamailio-local.cfg #!define WITH_MYSQL #!define WITH_AUTH #!define WITH_USRLOCDB #!define WITH_NAT #!define WITH_TLS
all the above didn't work thanks to a useless howto
Coming with such remarks when someone tries to help you is not constructive at all. The wiki is open for contributions to anyone willing to help, just create an account.
Based on the log message:
WARNING: <core> [pp[FAIL:219]: pp_ifdef_level_check(): different number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1
You have an #!ifdef or #!ifndef more than an #!endif, so the config structure is messed up. Checking quickly the config file, the number of #!ifdef + #!ifndef is equal to number of #!endif. Maybe you removed an #!endif by mistake or you typed into it.
You can eventually do a diff between your kamailio.cfg and the default one from the sources.
Cheers, Daniel
if i remove /etc/kamailio/kamailio-local.cfg and add only #!define WITH_MYSQL to /etc/kamailio/kamailio.cfg
i then get the following with offending lines below and the service restart error
####### Defined Values #########
# *** Value defines - IDs used later in config #!ifdef WITH_MYSQL # - database URL - used to connect to database server by modules such # as: auth_db, acc, usrloc, a.s.o. #!ifndef DBURL DBURL "mysql://kamailio:kamailiorw@localhost/kamailio" *offending line* #!endif #!endif #!ifdef WITH_MULTIDOMAIN # - the value for 'use_domain' parameters #!define MULTIDOMAIN 1 #!else #!define MULTIDOMAIN 0 #!endif
####### Global Parameters #########
### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR #!ifdef WITH_DEBUG debug=4 log_stderror=yes #!else debug=2 <---- *offending line* log_stderror=no #!endif
$ sudo service kamailio start [FAIL] Not starting Kamailio SIP Server: invalid configuration file! ... failed! failed! [....] 0(5959) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 119, column 7-54: syntax error 0(5959) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 147, column 6: unknown config variable 0(5959) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 147, column 7: ERROR: bad config file (3 errors) 0(5959) WARNING: <core> [pp[FAIL:219]: pp_ifdef_level_check(): different number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1 ... failed!
appart from the howto i have not altered anything else except for creating the local cfg which is now deleted
kamilio docs are very hard to digest, aren't they !
Daniel-Constantin Mierla:
Do you have:
#!define WITH_MYSQL
in your config?
Cheers, Daniel
On 04/11/14 16:32, shmick@riseup.net wrote:
[i have no idea about email subject nor anything else for this except prior i configured rtpproxy to work with kamailio on a unix socket and updated tls.cfg to use my cert/key]
running kamailio from
deb http://deb.kamailio.org/kamailio jessie main
$ sudo service kamailio restart [FAIL] Not starting Kamailio SIP Server: invalid configuration file! ... failed! failed! [....] 0(15228) INFO: tls [tls_init.c:385]: init_tls_compression(): tls: init_tls: disabling compression... 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: syntax error 0(15228) : <core> [cfg.y:3436]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 30-34: Invalid arguments 0(15228) : <core> [cfg.y:3439]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 353, column 35: ERROR: bad config file (3 errors) 0(15228) WARNING: <core> [ppcfg.c:219]: pp_ifdef_level_check(): different numbe[FAILpreprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1 ... failed! failed!
/* enhanced DB accounting */ #!ifdef WITH_ACCDB modparam("acc", "db_flag", FLT_ACC) modparam("acc", "db_missed_flag", FLT_ACCMISSED) modparam("acc", "db_url", DBURL) modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") #!endif
# ----- usrloc params ----- /* enable DB persistency for location entries */ #!ifdef WITH_USRLOCDB modparam("usrloc", "db_url", *DBURL*) <--------not happy with DBURL here modparam("usrloc", "db_mode", 2) modparam("usrloc", "use_domain", MULTIDOMAIN) #!endif
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users