<br><br><div class="gmail_quote">2010/4/15 Panagiotis Skoulikaritis <span dir="ltr">&lt;<a href="mailto:pskoul@algonet.gr">pskoul@algonet.gr</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Dear list members<br>
<br>
I&#39;m using kamailio 3<br>
and the problem that I&#39;m facing is that when a call is rejected by global blacklist, kamailio does not generate an accounting record.<br>
Is this normal behavior or I need to configure something somewhere ?<br>
<br>
<br>
Below are parts of the config file<br>
<br>
<br>
# ----- acc params -----<br>
modparam(&quot;acc&quot;, &quot;early_media&quot;, 1)<br>
modparam(&quot;acc&quot;, &quot;report_ack&quot;, 1)<br>
modparam(&quot;acc&quot;, &quot;report_cancels&quot;, 1)<br>
modparam(&quot;acc&quot;, &quot;detect_direction&quot;, 0)<br>
modparam(&quot;acc&quot;, &quot;failed_transaction_flag&quot;, 3)<br>
#!ifdef WITH_ACCDB<br>
modparam(&quot;acc&quot;, &quot;db_flag&quot;, 1)<br>
modparam(&quot;acc&quot;, &quot;db_missed_flag&quot;, 2)<br>
modparam(&quot;acc&quot;, &quot;db_url&quot;,<br>
       &quot;mysql://username:password@localhost/openser&quot;)<br>
modparam(&quot;acc&quot;, &quot;db_extra&quot;,<br>
       &quot;src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd&quot;)<br>
#!endif<br>
<br>
<br>
----------------------<br>
if (has_totag()) {<br>
               # sequential request withing a dialog should<br>
               # take the path determined by record-routing<br>
               if (loose_route()) {<br>
                       if (is_method(&quot;BYE&quot;)) {<br>
                               setflag(1); # do accounting ...<br>
                               setflag(3); # ... even if the transaction fails<br>
                       }<br>
<br>
-------------------------<br>
if (is_method(&quot;INVITE&quot;)) {<br>
               setflag(1); # do accounting<br>
               setflag(2); # log missed calls<br>
               setflag(3); # log failed calls<br>
               setflag(4); # do siptrace<br>
               setflag(5); # log dialog<br>
<br>
-------------<br>
route[name] {<br>
<br>
# --- Remove # or %23 from rU ---<br>
       bm_start_timer(&quot;hash_remove&quot;);<br>
       if($rU =~ &quot;^.*%+&quot;)            {                             xlog(&quot;------- The number contains %23 ---- &quot;);<br>
               $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/});<br>
               xlog(&quot; ------- The perl  $rU ------- &quot;);<br>
       }  <br>
       if($rU =~ &quot;^.*#+&quot;)            {                             xlog(&quot;------- The number contains # ----&quot;);<br>
               $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/});<br>
               xlog(&quot;------- The perl  $rU ------- &quot;);<br>
       }         bm_log_timer(&quot;hash_remove&quot;);<br>
       # --- PDT section ------ get service prefix to be appended before is send  out<br>
       bm_start_timer(&quot;pdt_lookup&quot;);<br>
       if(!prefix2domain(&quot;2&quot;, &quot;0&quot;))<br>
       {<br>
               sl_send_reply(&quot;404&quot;, &quot;Prefix not found&quot;);<br>
               exit;<br>
       }<br>
       $var(dstgrp) = 0;<br>
       $var(dstgrp) = $(rd{<a href="http://s.int" target="_blank">s.int</a>});<br>
       if($var(dstgrp)==0)<br>
       {<br>
               sl_send_reply(&quot;404&quot;, &quot;Service not found&quot;);<br>
               exit;<br>
       }<br>
       $avp(s:service_prefix) = $var(dstgrp);<br>
       xlog(&quot;--$rU----------- $avp(s:service_prefix) --- PDT ---------\n&quot;);<br>
<br>
       bm_log_timer(&quot;pdt_lookup&quot;);<br>
<br>
       # --- DialPlan section --- get the routing group id<br>
<br>
       xlog(&quot;----- The rU is $rU before DP -----\n&quot;);<br>
       bm_start_timer(&quot;dialplan_lookup&quot;);<br>
       if(dp_translate(&quot;1&quot;, &quot;$rU/$rU&quot;))<br>
       {<br>
               $avp(s:dstgrp) = $(var(dpattrs){<a href="http://s.int" target="_blank">s.int</a>});<br>
               xlog(&quot;----- The destination Drouting GroupID is $avp(s:dstgrp)  -----\n &quot;);<br>
       }<br>
<br>
       bm_log_timer(&quot;dialplan_lookup&quot;);<br>
       xlog(&quot;----- The rU is $rU after DP -----\n&quot;);<br>
             # --- Global Blacklist section ---<br>
       bm_start_timer(&quot;blacklist_lookup&quot;);<br>
      if(!check_blacklist(&quot;globalblacklist&quot;)){<br>
               xlog(&quot;----- The number is blacklisted globaly! -----&quot;);<br>
               sl_send_reply(&quot;403&quot;, &quot;Forbidden&quot;);<br>
               exit;<br>
      }<br>
     <br></blockquote><div><br>... set a flag for that, as it&#39;s just sending the 403 and then exit<br><br>-Laszlo <br></div><div> </div></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup">
</div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>