[SR-Users] Error starting kamailio with dialog module usage
Aft nix
aftnix at gmail.com
Sun Sep 30 11:50:07 CEST 2012
Hi,
After implementing a "Call limit" application with the following config:
#!ifdef WITH_CALL_LIMIT
modparam("dialog","enable_stats",1)
modparam("dialog","dlg_flag", 4)
modparam("dialog","hash_size", 4096)
modparam("dialog", "profiles_with_value","callquota")
modparam("dialog", "default_timeout", 300)
modparam("dialog", "dlg_match_mode", 2)
modparam("dialog", "detect_spirals", 1)
modparam("dialog", "db_mode", 0)
#!endif
request_route {
................
#!ifdef WITH_CALL_LIMIT
if (is_method("INVITE")) {
dlg_manage();
$var(100) = 0;
get_profile_size("callquota", "$rU", "var(100)");
if ($var(100) >= 5 ) {
xlog("DEBUG: Simultaneous calls limit reached");
sl_send_reply("503","Simultaneous calls limit reached");
exit;
}
set_dlg_profile("callquota","$ru");
if (get_profile_size("callquota", "$var(100)")) {
xlog("DEBUG: there are $var(100) total calls
for $rU\n");
}
}
#!endif
...............
}
Now it passes cleanly when i issue :
$kamailio -c
but it fails to start with following info:
Sep 29 19:37:49 108 /usr/local/sbin/kamailio[1865]: ERROR: <core>
[route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:507
Sep 29 19:37:49 108 /usr/local/sbin/kamailio[1865]: ERROR: <core>
[route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:523
line 507 : get_profile_size("callquota", "$rU", "var(100)");
Thanks in advance
--
-aft
More information about the sr-users
mailing list