[OpenSIPS-Users] Script flag question

Denis Putyato denis7979 at mail.ru
Fri Mar 4 07:53:42 CET 2011


Hello  everybody!

 

There is a piece of script

 

…

…

  if (dp_translate("20005", "$rU/$rU")) { 

  xlog("L_INFO", "RU after alias = $rU");

  $avp(i:200)=$rU;

  setsflag(1);

  if (issflagset(1)) xlog("L_INFO", "FLAGS1 is set");

  }

  

  if (dp_translate("20000", "$rU/$var(ruri)")) {

   $avp(i:502)=$avp(i:999);

   avp_subst("$avp(i:502)", "/(.*)\*(.*)\*(.*)/\3/ig");

   if ($avp(i:502)=="0") { 

   $avp(i:500)=$rU;

   $rU=$var(ruri);

   $avp(i:5)=$avp(i:999);

   avp_subst("$avp(i:5)", "/(.*)\*(.*)\*(.*)/\1/ig");

   $avp(i:5)=$(avp(i:5){s.int});

   $avp(i:1005)=1;

   $avp(s:callee)=$rU;

   $avp(i:92)=$avp(i:999);

   avp_subst("$avp(i:92)", "/(.*)\*(.*)\*(.*)/\2/ig");

   $avp(i:92)=$(avp(i:92){s.int});

       get_profile_size("client","$avp(i:500)","$avp(i:17)");

        if ($avp(i:17) >= $avp(i:92)) {

        acc_db_request("User busy", "acc");

        send_reply("486", "User busy");

        exit;

        }

      set_dlg_profile("client","$avp(i:500)");

   setsflag(2);

   }

  }

 

  if (do_routing("$avp(i:5)")) setsflag(3);

  

  if (!issflagset(3)) {

   if (!$avp(i:6) == 0) {

     if (do_routing("$avp(i:6)")) setsflag(3);

     } 

  }

  

  if (!issflagset(3)) {

   if (!$avp(i:7) == 0) {

    if (!do_routing("$avp(i:7)")) {

     acc_db_request("Not found", "acc");

     send_reply("404", "Not found");

      exit;

      }

    } else {

     acc_db_request("Not found", "acc");

     send_reply("404", "Not found");

      exit;

    }

   }

   if (issflagset(1)) xlog("L_INFO", "FLAGS1 is set");

…

…

 

I can see first "FLAGS1 is set" in log file but I don`t see second  "FLAGS1 is set".

 

What can be wrong?

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110304/f487af7d/attachment-0001.htm>


More information about the Users mailing list