<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi John,<br>
      <br>
      I tried to reproduce your report, but no luck.<br>
      <br>
      This is the script I used :<br>
      <br>
      <br>
          if ($rU=~"^1") {<br>
              $avp(gw_whitelist) = "one,two,three";<br>
              xlog ("Start routing\n");<br>
              if ( !do_routing("1","WF","$avp(gw_whitelist)" ,
      "$avp(rules_attributes)","$avp(gw_attributes)")) {<br>
                  xlog ("nothing found\n");<br>
                  send_reply("404", "Not found");<br>
                  exit;<br>
              }<br>
              xlog ("success first $rd, R_attr=$avp(rules_attributes),
      G_attr=$avp(gw_attributes)\n");<br>
      <br>
              while (
      use_next_gw("$avp(rules_attributes)","$avp(gw_attributes)") ){<br>
                  xlog ("success next $rd,
      R_attr=$avp(rules_attributes), G_attr=$avp(gw_attributes)\n");<br>
              }<br>
      <br>
              xlog ("done\n");<br>
              send_reply("404", "Not found");<br>
              exit;<br>
          }<br>
      <br>
      <br>
      This generates:<br>
      <br>
      Apr  5 18:41:28 [14657] Start routing<br>
      Apr  5 18:41:28 [14657] success init 10.0.0.102, R_attr=rule_124,
      G_attr=two<br>
      Apr  5 18:41:28 [14657] success next 10.0.0.101, R_attr=rule_124,
      G_attr=one<br>
      Apr  5 18:41:28 [14657] success next 10.0.0.103, R_attr=rule_12,
      G_attr=three<br>
      Apr  5 18:41:28 [14657] done<br>
      <br>
      <br>
      The DB looks like:<br>
      <br>
      mysql> select * from dr_gateways;<br>
+----+-------+------+------------------+-------+------------+-------+------------+-------+--------+-------------+<br>
      | id | gwid  | type | address          | strip | pri_prefix |
      attrs | probe_mode | state | socket | description |<br>
+----+-------+------+------------------+-------+------------+-------+------------+-------+--------+-------------+<br>
      |  1 | one   |    0 | sip:10.0.0.101   |     0 | NULL       |
      one   |          0 |     0 | NULL   | NULL        |<br>
      |  2 | two   |    0 | sip:10.0.0.102   |     0 | NULL       |
      two   |          0 |     0 | NULL   | NULL        |<br>
      |  3 | three |    0 | sip:10.0.0.103   |     0 | NULL       |
      three |          0 |     0 | NULL   | NULL        |<br>
+----+-------+------+------------------+-------+------------+-------+------------+-------+--------+-------------+<br>
      3 rows in set (0.01 sec)<br>
      <br>
      mysql> select * from dr_rules;<br>
+--------+---------+--------+---------+----------+---------+-------------+----------+-------------+<br>
      | ruleid | groupid | prefix | timerec | priority | routeid |
      gwlist      | attrs    | description |<br>
+--------+---------+--------+---------+----------+---------+-------------+----------+-------------+<br>
      |      1 | 1       | 12     | NULL    |        0 | NULL    |
      three=1     | rule_12  | NULL        |<br>
      |      2 | 1       | 124    | NULL    |        0 | NULL    |
      one=1,two=1 | rule_124 | NULL        |<br>
+--------+---------+--------+---------+----------+---------+-------------+----------+-------------+<br>
      2 rows in set (0.00 sec)<br>
      <br>
      <br>
      Let me know the DB content, the script and output for your case.
      BTW, this was tested against OpenSIPS 2.3 version.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>

OpenSIPS Summit May 2017 Amsterdam
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html">http://www.opensips.org/events/Summit-2017Amsterdam.html</a>
</pre>
    <div class="moz-cite-prefix">On 04/04/2017 11:05 PM, John Nash
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAA4rGPwOuPo4kQMTf_HkGhqxyF-Sq_VbvvwWuGohx-Tbd3wWAA@mail.gmail.com"
      type="cite">
      <div dir="ltr">No but I use groups and pass in routing functions.</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Apr 5, 2017 at 1:31 AM,
          Bogdan-Andrei Iancu <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org">bogdan@opensips.org</a></a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>John, do you use
                partitions in DR ?<br>
                <br>
                Regards,<br>
              </tt><span class="">
                <pre class="m_156004070167239379moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a moz-do-not-send="true" class="m_156004070167239379moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>

OpenSIPS Summit May 2017 Amsterdam
  <a moz-do-not-send="true" class="m_156004070167239379moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html" target="_blank">http://www.opensips.org/<wbr>events/Summit-2017Amsterdam.<wbr>html</a>
</pre>
    </span><div><div class="h5"><div class="m_156004070167239379moz-cite-prefix">On 04/04/2017 11:00 PM, John Nash
      wrote:

    </div>
    <blockquote type="cite">
      <div dir="ltr">Yes I tried that but still same issue. I call
        goes_to_gw and after that attributes are filled.</div>
      <div class="gmail_extra">

        <div class="gmail_quote">On Tue, Mar 28, 2017 at 3:25 PM,
          Bogdan-Andrei Iancu <span dir="ltr"><<a moz-do-not-send="true" class="m_156004070167239379moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:

          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>Hello John,

                

                Do you use partitions ? Is the use_partition enabled ?
                If not, the use_next_gw() should be used like:

                    use_next_gw( "$avp(rules_attributes)","$avp<wbr>(gw_attributes)")

                

                (the first param, the partition, is not to be provided)

                

                Could you check if this solves the problem ?

                    

                Best regards,

              </tt>
              <pre class="m_156004070167239379m_7277364954382431405moz-signature" cols="72">Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  <a moz-do-not-send="true" class="m_156004070167239379m_7277364954382431405moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>

OpenSIPS Summit May 2017 Amsterdam
  <a moz-do-not-send="true" class="m_156004070167239379m_7277364954382431405moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html" target="_blank">http://www.opensips.org/events<wbr>/Summit-2017Amsterdam.html</a>
</pre><div><div class="m_156004070167239379h5">
    <div class="m_156004070167239379m_7277364954382431405moz-cite-prefix">On 03/23/2017 09:19 AM, John Nash
      wrote:

    </div>
    </div></div><blockquote type="cite"><div><div class="m_156004070167239379h5">
      <div dir="ltr">I am using drouting and recently tried to use
        gateway attribute. I call ...
        <div>

        </div>
        <div>do_routing("$avp(int_grp_id)",<wbr>"WF","$avp(gw_whitelist)" ,
          "$avp(rules_attributes)","$avp<wbr>(gw_attributes)"))</div>
        <div>

        </div>
        <div>After this call I can see $avp(gw_attributes) is populated
          frp, attr column of dr_gateways table.</div>
        <div>

        </div>
        <div>but when i call following ...</div>
        <div>use_next_gw(,"$avp(rules_attri<wbr>butes)","$avp(gw_attributes)")

        </div>
        <div>

        </div>
        <div>$avp(gw_attributes) becomes empty

        </div>
        <div>

        </div>
        <div>

        </div>
        <div>If i call next_routing() instead of use_next_gw then
          $avp(gw_attributes) retains old value but does not populate
          new value</div>
        <div>

        </div>
        <div>

        </div>
        <div>

        </div>
        <div>

        </div>
      </div>
      

      <fieldset class="m_156004070167239379m_7277364954382431405mimeAttachmentHeader"></fieldset>
      

      </div></div><pre>______________________________<wbr>_________________
Users mailing list
<a moz-do-not-send="true" class="m_156004070167239379m_7277364954382431405moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="m_156004070167239379m_7277364954382431405moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    

  </div>

</blockquote></div>
</div>



</blockquote>
</div></div></div></blockquote></div>
</div>



</blockquote>
</body></html>