Hi Duane/Bogdan ,<div>  </div><div>    Yes I want to do Round Robin distribution of calls . </div><div><br></div><div>     To remove branch , I will have to know which branch got the last call . For that I need to keep contact in cache . </div>
<div><br></div><div>In lookup.c  after getting records and setting RURI , what if I do ul.update_ucontact() for first contact in the list . </div><div>Something like this ..</div><div><br></div><div><br></div><div><div> res = ul.get_urecord((udomain_t*)_t, &amp;aor, &amp;r);</div>
<div>        if (res &gt; 0) {</div><div>                LM_DBG(&quot;&#39;%.*s&#39; Not found in usrloc\n&quot;, aor.len, ZSW(aor.s));</div><div>                ul.unlock_udomain((udomain_t*)_t, &amp;aor);</div><div>                return -1;</div>
<div>        }</div></div><div><br></div><div>.</div><div>.</div><div>.</div><div><br></div><div><div> if (ptr) {</div><div>                LM_DBG(&quot;setting as ruri &lt;%.*s&gt;\n&quot;,ptr-&gt;c.len,ptr-&gt;c.s);</div>
<div>                if (set_ruri(_m, &amp;ptr-&gt;c) &lt; 0) {</div><div>                        LM_ERR(&quot;unable to rewrite Request-URI\n&quot;);</div><div>                        ret = -3;</div><div>                        goto done;</div>
<div>                }</div></div><div>.</div><div>.</div><div>.</div><div>.</div><div>set_ruri_q(ptr-&gt;q);</div><div>.</div><div>.</div><div>.</div><div>.</div><div>ul.update_contact ();  to update q value of contact </div>
<div><br></div><div><br></div><div><br></div><div>Will that work ? ...Any side effect ?</div><div><br></div><div><br></div><div>Thanx,</div><div>Gomtesh<br><br><div class="gmail_quote">On Thu, Jan 31, 2013 at 12:05 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    <tt>Hi, <br>
      <br>
      I agree with Duane - what you are trying to do is exceeding the
      purpose of registration - you want to do a Round Robin between the
      2 registered contacts.<br>
      <br>
      What you could try is to let lookup() to bring both of them and to
      drop one of the contacts from script (wither simply removing the
      branch via $branch var, either via branch route).<br>
      <br>
      Regards,<br>
    </tt><div class="im">
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    <br></div><div><div class="h5">
    On 01/30/2013 12:18 PM, Gomtesh Jain wrote:
    <blockquote type="cite"><br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanx Duane  for replying  the mail ..
          <div><br>
          </div>
          <div>Let me explain you my scenario ...</div>
          <div><br>
          </div>
          <div>  I have 2  registered contact </div>
          <div>     1 . 1234 (q value .9)</div>
          <div>     2    5678 (q value .8)</div>
          <div><br>
          </div>
          <div>On IIVITE after lookup() 1234 will be on top of list . So
            after lookup I just want to update contact 1234 with q value
            .7 in memory/data base .</div>
          <div>So that for next call 5678 should come on top of the list
            for 2nd INVITE .</div>
          <div><br>
          </div>
          <div>So I want make changes in memory/database so that 5678
            should be picked up as first contact by very next INVITE .</div>
          <div><br>
          </div>
          <div>Thanx,</div>
          <div>Gomtesh</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>
            <br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
            <br>
            <div class="gmail_quote">On Wed, Jan 30, 2013 at 1:50 AM, <span dir="ltr">&lt;<a href="mailto:users-request@lists.opensips.org" target="_blank">users-request@lists.opensips.org</a>&gt;</span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send Users mailing list submissions
                to<br>
                        <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
                <br>
                To subscribe or unsubscribe via the World Wide Web,
                visit<br>
                        <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                or, via email, send a message with subject or body
                &#39;help&#39; to<br>
                        <a href="mailto:users-request@lists.opensips.org" target="_blank">users-request@lists.opensips.org</a><br>
                <br>
                You can reach the person managing the list at<br>
                        <a href="mailto:users-owner@lists.opensips.org" target="_blank">users-owner@lists.opensips.org</a><br>
                <br>
                When replying, please edit your Subject line so it is
                more specific<br>
                than &quot;Re: Contents of Users digest...&quot;<br>
                <br>
                <br>
                Today&#39;s Topics:<br>
                <br>
                   1. Re: Failover and dialog termination (microx)<br>
                   2. Re: Decrease the priority of contact (Duane
                Larson)<br>
                   3. Re: Carrierroute failure route enhancement (Samuel
                Muller)<br>
                   4. [RELEASE] OpenSIPS 1.9.0 - a new major release is
                out<br>
                      (Bogdan-Andrei Iancu)<br>
                   5. [RELEASES] Support and management of OpenSIPS    
                release -<br>
                      IMPORTANT (Bogdan-Andrei Iancu)<br>
                   6. Re: [RELEASE] OpenSIPS 1.9.0 - a new major release
                is out (Bakko)<br>
                   7. Re: [OpenSIPS-Devel] [RELEASE] OpenSIPS 1.9.0 - a
                new major<br>
                      release is out (Sa?l Ibarra Corretg?)<br>
                <br>
                <br>
----------------------------------------------------------------------<br>
                <br>
                Message: 1<br>
                Date: Tue, 29 Jan 2013 06:12:46 -0800 (PST)<br>
                From: microx &lt;<a href="mailto:acmicrox@gmail.com" target="_blank">acmicrox@gmail.com</a>&gt;<br>
                Subject: Re: [OpenSIPS-Users] Failover and dialog
                termination<br>
                To: <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
                Message-ID: &lt;<a href="mailto:1359468766526-7584255.post@n2.nabble.com" target="_blank">1359468766526-7584255.post@n2.nabble.com</a>&gt;<br>
                Content-Type: text/plain; charset=us-ascii<br>
                <br>
                Hi Schneur,<br>
                <br>
                Yes, the two proxy servers PA and PB are using the same
                database. And the<br>
                db_mode regarding dialog<br>
                is set to 1 to make each dialog be written into memory
                as well as the<br>
                database.<br>
                <br>
                What do you mean master/master replication? Can you
                specify your method?<br>
                Thanks so much.<br>
                <br>
                Best wishes,<br>
                Chen-Che<br>
                <br>
                <br>
                <br>
                --<br>
                View this message in context: <a href="http://opensips-open-sip-server.1449251.n2.nabble.com/Failover-and-dialog-termination-tp7584192p7584255.html" target="_blank">http://opensips-open-sip-server.1449251.n2.nabble.com/Failover-and-dialog-termination-tp7584192p7584255.html</a><br>

                Sent from the OpenSIPS - Users mailing list archive at
                Nabble.com.<br>
                <br>
                <br>
                <br>
                ------------------------------<br>
                <br>
                Message: 2<br>
                Date: Tue, 29 Jan 2013 10:39:22 -0600<br>
                From: Duane Larson &lt;<a href="mailto:duane.larson@gmail.com" target="_blank">duane.larson@gmail.com</a>&gt;<br>
                Subject: Re: [OpenSIPS-Users] Decrease the priority of
                contact<br>
                To: OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>&gt;<br>
                Message-ID:<br>
                        &lt;<a href="mailto:CAFcM1EqZxr_FhVkJswpBNPK5wueE-9PvJPJFCof0nr4GHAtpDg@mail.gmail.com" target="_blank">CAFcM1EqZxr_FhVkJswpBNPK5wueE-9PvJPJFCof0nr4GHAtpDg@mail.gmail.com</a>&gt;<br>
                Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
                <br>
                I&#39;m not 100% sure what you are trying to do.  I needed
                to do some serial<br>
                calling and here is what I did<br>
                <br>
                <a href="http://opensips-open-sip-server.1449251.n2.nabble.com/opensips-Bugs-3349030-Need-access-to-SIP-URI-Q-Value-td6554597.html" target="_blank">http://opensips-open-sip-server.1449251.n2.nabble.com/opensips-Bugs-3349030-Need-access-to-SIP-URI-Q-Value-td6554597.html</a><br>

                <br>
                <a href="http://www.opensips.org/Resources/DocsCoreVar19#toc75" target="_blank">http://www.opensips.org/Resources/DocsCoreVar19#toc75</a>
                <div>
                  <div><br>
                    <br>
                    <br>
                    <br>
                    On Tue, Jan 29, 2013 at 2:02 AM, Gomtesh Jain &lt;<a href="mailto:gomtesh@gmail.com" target="_blank">gomtesh@gmail.com</a>&gt;
                    wrote:<br>
                    <br>
                    &gt; Hi ,<br>
                    &gt;    I want to decrease the priority (q value) of
                    contact (in memory &amp;<br>
                    &gt; database)as soon as it comes on top of the list
                    after lookup. So that next<br>
                    &gt; call should not pick this contact (if other
                    contacts are registered). As<br>
                    &gt; soon as call finishes client will refresh its
                    registration with original q<br>
                    &gt; value.<br>
                    &gt; How can I do this either in script after
                    lookup() or in code in around<br>
                    &gt; lookup.c ?<br>
                    &gt;<br>
                    &gt; Can someone help me on this ?<br>
                    &gt;<br>
                    &gt; Thanx,<br>
                    &gt; Gomtesh<br>
                    &gt;<br>
                    &gt;<br>
                    &gt;<br>
                  </div>
                </div>
                &gt; _______________________________________________<br>
                &gt; Users mailing list<br>
                &gt; <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                &gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                &gt;<br>
                &gt;<br>
                <br>
                <br>
                --<br>
                --<br>
                *--*--*--*--*--*<br>
                Duane<br>
                *--*--*--*--*--*<br>
                --<br>
                -------------- next part --------------<br>
                An HTML attachment was scrubbed...<br>
                URL: &lt;<a href="http://lists.opensips.org/pipermail/users/attachments/20130129/d66ee50b/attachment-0001.htm" target="_blank">http://lists.opensips.org/pipermail/users/attachments/20130129/d66ee50b/attachment-0001.htm</a>&gt;<br>

              </blockquote>
            </div>
          </div>
        </blockquote>
      </div>
      <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </div></div></div>

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