Hi,

I'm trying to fill a hash table on startup in the htable:mod-init event route. But it doesn't work. Kamailio doesn't start at all, but doesn't print out an error in the log.

This is what the route looks like:

event_route[htable:mod-init] {
        xlog("L_NOTICE", "Loading Carrier domains into Hash table.\n");
        sql_query("ser", "select domain_name from carrier_domains", "domains");
        xlog("L_NOTICE", "Loaded from database...\n");
        while($var(i)<$dbr(domains=>cols)) {
                xlog("L_NOTICE", "Entry: $dbr(domains=>[$var(i),0])\n");
                $sht(carrierips=>$var(i)) = $dbr(domains=>[$var(i),0]);
                $var(i) = $var(i) + 1;
        }
}

Of course, the necessary parameters are set.
modparam("htable", "htable", "carrierips=>size=6")
modparam("sqlops","sqlcon","ser=>mysql://user:password@127.0.0.1/ser")

In the log I see the following:
May 15 11:25:33 linux /usr/sbin/kamailio[20872]: NOTICE: <script>: Loading Carrier domains into Hash table.

As you can see, there should be a lot more output, but nothing happens anymore after that. In ngrep I see other queries going to the same database from other modules, but my query from the event route is never executed.

Am I missing something?

Best Regards,
Sebastian