I've been trying to utilise event_route[htable:mod-init] in order to load information from the database into an htable on startup. However, Kamailio exits with an error for no obvious (to me) reason. Here's the log output:
DEBUG: htable [htable.c:226]: child_init(): rank is (-127)
DEBUG: htable [htable.c:259]: child_init(): executing event_route[htable:mod-init] (2)
DEBUG: <core> [core/parser/msg_parser.c:600]: parse_msg(): SIP Request:
DEBUG: <core> [core/parser/msg_parser.c:602]: parse_msg(): method: <OPTIONS>
DEBUG: <core> [core/parser/msg_parser.c:604]: parse_msg(): uri: <
sip:you@kamailio.org>
DEBUG: <core> [core/parser/msg_parser.c:606]: parse_msg(): version: <SIP/2.0>
DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=2
DEBUG: <core> [core/parser/msg_parser.c:491]: parse_headers(): Via found, flags=2
DEBUG: <core> [core/parser/msg_parser.c:493]: parse_headers(): this is the first via
ERROR: <core> [core/daemonize.c:303]: daemonize(): Main process exited before writing to pipe