[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-users
Subject:    Re: [SR-Users] Error starting kamailio with dialog module usage
From:       SamyGo <govoiper () gmail ! com>
Date:       2012-09-30 16:15:09
Message-ID: CAJUJwthpOdamG8yzHDFgpDx6af27sgKjgMCbfSHJmj4TEfaA+w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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" <aftnix@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
>

[Attachment #5 (text/html)]

<p>Is it typo or by chance you are missing a $ in line 507  before var(100)</p>
<p> </p>
<div class="gmail_quote">On Sep 30, 2012 2:50 PM, &quot;Aft nix&quot; &lt;<a \
href="mailto:aftnix@gmail.com">aftnix@gmail.com</a>&gt; wrote:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi,<br>
<br>
After implementing a &quot;Call limit&quot; application with the following \
config:<br> <br>
#!ifdef WITH_CALL_LIMIT<br>
modparam(&quot;dialog&quot;,&quot;enable_stats&quot;,1)<br>
modparam(&quot;dialog&quot;,&quot;dlg_flag&quot;, 4)<br>
modparam(&quot;dialog&quot;,&quot;hash_size&quot;, 4096)<br>
modparam(&quot;dialog&quot;, \
&quot;profiles_with_value&quot;,&quot;callquota&quot;)<br> \
modparam(&quot;dialog&quot;, &quot;default_timeout&quot;, 300)<br> \
modparam(&quot;dialog&quot;, &quot;dlg_match_mode&quot;, 2)<br> \
modparam(&quot;dialog&quot;, &quot;detect_spirals&quot;, 1)<br> \
modparam(&quot;dialog&quot;, &quot;db_mode&quot;, 0)<br> #!endif<br>
<br>
request_route {<br>
................<br>
#!ifdef WITH_CALL_LIMIT<br>
        if (is_method(&quot;INVITE&quot;)) {<br>
                dlg_manage();<br>
                $var(100) = 0;<br>
                get_profile_size(&quot;callquota&quot;, &quot;$rU&quot;, \
&quot;var(100)&quot;);<br>  if ($var(100) &gt;= 5 ) {<br>
                        xlog(&quot;DEBUG: Simultaneous calls limit \
                reached&quot;);<br>
                        sl_send_reply(&quot;503&quot;,&quot;Simultaneous calls limit \
reached&quot;);<br>  exit;<br>
                }<br>
<br>
                set_dlg_profile(&quot;callquota&quot;,&quot;$ru&quot;);<br>
                if (get_profile_size(&quot;callquota&quot;, &quot;$var(100)&quot;)) \
                {<br>
                        xlog(&quot;DEBUG: there are $var(100) total calls<br>
                        for $rU\n&quot;);<br>
                }<br>
        }<br>
#!endif<br>
...............<br>
}<br>
<br>
Now it passes cleanly when i issue :<br>
$kamailio -c<br>
<br>
but it fails to start with following info:<br>
<br>
Sep 29 19:37:49 108 /usr/local/sbin/kamailio[1865]: ERROR: &lt;core&gt;<br>
[route.c:1216]: fixing failed (code=-1) at<br>
cfg:/usr/local/etc/kamailio/kamailio.cfg:507<br>
Sep 29 19:37:49 108 /usr/local/sbin/kamailio[1865]: ERROR: &lt;core&gt;<br>
[route.c:1216]: fixing failed (code=-1) at<br>
cfg:/usr/local/etc/kamailio/kamailio.cfg:523<br>
<br>
line 507 : get_profile_size(&quot;callquota&quot;, &quot;$rU&quot;, \
&quot;var(100)&quot;);<br> <br>
Thanks in advance<br>
<br>
--<br>
-aft<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br> \
</blockquote></div>



_______________________________________________
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic