Is it typo or by chance you are missing a $ in line 507 before var(100) On Sep 30, 2012 2:50 PM, "Aft nix" <aft...@gmail.com> wrote:
> 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 > > _______________________________________________ > 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