From rmartinez@redvoiss.net Tue Jan 11 22:17:50 2011 From: Ricardo Martinez To: sr-users@lists.kamailio.org Subject: [SR-Users] set_dlg_profile not working? Date: Tue, 11 Jan 2011 18:17:55 -0300 Message-ID: <464e4313faa57f24e9da7c317f97178d@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0704797441==" --===============0704797441== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello. I=E2=80=99m trying to count the calls to a specific gateway. So I=E2=80=99m = using the dialog module. This route is done before the final relay. route[CHANNELS] { if( is_method("INVITE") ) { if(!isflagset(31) ) { # user has max channel limit set as preference if(is_avp_set("$avp(s:channels)") && avp_check("$avp(s:channels)", "gt/s:0")) { # get current calls for uuid xlog("L_INFO","[$ci] : avp_channels existe y es mayor que 0 ?"); if (get_profile_size("gws","$rd","$var(calls)")) { xlog("L_INFO","Actualmente el gateway $rd tiene $var(calls) llamadas simultaneas\n"); } # check within limit if($avp(s:channels) > $var(calls)) { xlog("L_INFO", "CHANNELS : terminador '$rd' tiene '$var(calls)' de '$avp(s:channels)' active calls before this one\n"); $var(setprofile) =3D 1; } else { xlog("L_INFO", "Call crtl: user channel limit exceeded [$var(calls)/$avp(s:channels)]\n"); send_reply("487", "Request Terminated: Channel limit exceeded"); exit; } } else { xlog("L_INFO","[$ci] : the value if channels is $avp(s:channels)"); if( !is_avp_set("$avp(s:channels)") ) { xlog("L_INFO","[$ci] : avp_channel not set"); }; if(!avp_check("$avp(s:channels)", "gt/s:0") ) { xlog("L_INFO","[$ci] : avp_channel menor que 0?"); }; $var(setprofile) =3D 0; } } if($var(setprofile) > 0) { * if ( set_dlg_profile("gws","$rd") ) {* * xlog("L_INFO","set_dlg_profile exitoso");* } } When i made the call and try to see the profile with this command : [root(a)sipvoiss kamailio]# kamctl fifo profile_get_size gws 10.0.0.220 profile:: name=3Dgws value=3D10.0.0.220 count=3D0 I=E2=80=99m not seeing the call added to the profile, despite the fact I usin= g the * set_dlg_profile("gws","$rd")* What could be happening? This is part of the debug : Jan 11 18:07:03 .: INFO: