[SR-Users] call-limit peer

Angel Elena craem at craem.net
Sun Oct 18 22:48:21 CEST 2015


Hi everybody.

I have a kamailio 4.0 running with rtpproxy and debian 7.8, and I need limit calls by IP.

My kamailio.cfg:

# -----------------------------------------
#------------------------------------------

loadmodule "dialog.so"
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "enable_stats",1)
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)


In my route outside, I have:


get_profile_size("callquota", "$avp(s:tag)", "$var(SIZE)");
xlog ("L_INFO", ".... $avp(s:tag) ..... CALLQUOTA ....  $var(SIZE)..... \n ");

On $avp(s:tag) is the client code-peer/ip.

When I view the logs... the result:

Oct 18 22:18:03 sipproxy /usr/local/sbin/kamailio[19724]: INFO: <script>: .... 4012 ..... CALLQUOTA ....  0.....


Always, the result is '0'.

Is correct my configuration ?


thanks


--------------------------------
Ángel Elena Medina       _o)
craem at craem.net          / \\
http://blog.craem.net  _(___V
@craem_
--------------------------------



More information about the sr-users mailing list