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.