Re: [SR-Users] reply when drop() in branch route

2010-04-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

  drop in branch_route was missing, as Andreas Granig reported few days 
  ago. I just committed the patch, can you test again?

daniel,

ok, i'll try.  if failure route is set when i call drop(), will it be
executed and if so with which reply code?

-- juha

___
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


Re: [SR-Users] reply when drop() in branch route

2010-04-15 Thread Daniel-Constantin Mierla

Hi Juha,

On 4/15/10 11:31 AM, Juha Heinanen wrote:

Daniel-Constantin Mierla writes:

drop in branch_route was missing, as Andreas Granig reported few days
ago. I just committed the patch, can you test again?

daniel,

ok, i'll try.  if failure route is set when i call drop(), will it be
executed and if so with which reply code?

   
no failure route is triggered by branch route actions, since there can 
be many branches, and branch route works only on one. failure_route is 
executed in the context of the transaction.


Cheers,
Daniel

--
Daniel-Constantin Mierla * http://www.asipto.com/ * 
http://twitter.com/miconda * 
http://www.linkedin.com/in/danielconstantinmierla


___
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


Re: [SR-Users] call not being accounted when rejected by global blacklist

2010-04-15 Thread Laszlo
2010/4/15 Panagiotis Skoulikaritis psk...@algonet.gr

 Dear list members

 I'm using kamailio 3
 and the problem that I'm facing is that when a call is rejected by global
 blacklist, kamailio does not generate an accounting record.
 Is this normal behavior or I need to configure something somewhere ?


 Below are parts of the config file


 # - acc params -
 modparam(acc, early_media, 1)
 modparam(acc, report_ack, 1)
 modparam(acc, report_cancels, 1)
 modparam(acc, detect_direction, 0)
 modparam(acc, failed_transaction_flag, 3)
 #!ifdef WITH_ACCDB
 modparam(acc, db_flag, 1)
 modparam(acc, db_missed_flag, 2)
 modparam(acc, db_url,
   mysql://username:passw...@localhost/openser)
 modparam(acc, db_extra,

 src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd)
 #!endif


 --
 if (has_totag()) {
   # sequential request withing a dialog should
   # take the path determined by record-routing
   if (loose_route()) {
   if (is_method(BYE)) {
   setflag(1); # do accounting ...
   setflag(3); # ... even if the transaction
 fails
   }

 -
 if (is_method(INVITE)) {
   setflag(1); # do accounting
   setflag(2); # log missed calls
   setflag(3); # log failed calls
   setflag(4); # do siptrace
   setflag(5); # log dialog

 -
 route[name] {

 # --- Remove # or %23 from rU ---
   bm_start_timer(hash_remove);
   if($rU =~ ^.*%+){
 xlog(--- The number contains %23  );
   $rU = $(rU{re.subst,/^(.*)%23(.*)/\1\2/});
   xlog( --- The perl  $rU --- );
   }
   if($rU =~ ^.*#+){
 xlog(--- The number contains # );
   $rU = $(rU{re.subst,/^(.*)#(.*)/\1\2/});
   xlog(--- The perl  $rU --- );
   } bm_log_timer(hash_remove);
   # --- PDT section -- get service prefix to be appended before is
 send  out
   bm_start_timer(pdt_lookup);
   if(!prefix2domain(2, 0))
   {
   sl_send_reply(404, Prefix not found);
   exit;
   }
   $var(dstgrp) = 0;
   $var(dstgrp) = $(rd{s.int});
   if($var(dstgrp)==0)
   {
   sl_send_reply(404, Service not found);
   exit;
   }
   $avp(s:service_prefix) = $var(dstgrp);
   xlog(--$rU--- $avp(s:service_prefix) --- PDT -\n);

   bm_log_timer(pdt_lookup);

   # --- DialPlan section --- get the routing group id

   xlog(- The rU is $rU before DP -\n);
   bm_start_timer(dialplan_lookup);
   if(dp_translate(1, $rU/$rU))
   {
   $avp(s:dstgrp) = $(var(dpattrs){s.int});
   xlog(- The destination Drouting GroupID is
 $avp(s:dstgrp)  -\n );
   }

   bm_log_timer(dialplan_lookup);
   xlog(- The rU is $rU after DP -\n);
 # --- Global Blacklist section ---
   bm_start_timer(blacklist_lookup);
  if(!check_blacklist(globalblacklist)){
   xlog(- The number is blacklisted globaly! -);
   sl_send_reply(403, Forbidden);
   exit;
  }



... set a flag for that, as it's just sending the 403 and then exit

-Laszlo
___
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