[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, "Aft nix" <<a \
href="mailto:aftnix@gmail.com">aftnix@gmail.com</a>> 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 "Call limit" application with the following \
config:<br> <br>
#!ifdef WITH_CALL_LIMIT<br>
modparam("dialog","enable_stats",1)<br>
modparam("dialog","dlg_flag", 4)<br>
modparam("dialog","hash_size", 4096)<br>
modparam("dialog", \
"profiles_with_value","callquota")<br> \
modparam("dialog", "default_timeout", 300)<br> \
modparam("dialog", "dlg_match_mode", 2)<br> \
modparam("dialog", "detect_spirals", 1)<br> \
modparam("dialog", "db_mode", 0)<br> #!endif<br>
<br>
request_route {<br>
................<br>
#!ifdef WITH_CALL_LIMIT<br>
if (is_method("INVITE")) {<br>
dlg_manage();<br>
$var(100) = 0;<br>
get_profile_size("callquota", "$rU", \
"var(100)");<br> if ($var(100) >= 5 ) {<br>
xlog("DEBUG: Simultaneous calls limit \
reached");<br>
sl_send_reply("503","Simultaneous calls limit \
reached");<br> exit;<br>
}<br>
<br>
set_dlg_profile("callquota","$ru");<br>
if (get_profile_size("callquota", "$var(100)")) \
{<br>
xlog("DEBUG: there are $var(100) total calls<br>
for $rU\n");<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: <core><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: <core><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("callquota", "$rU", \
"var(100)");<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