<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Gomtesh,<br>
<br>
Theoretically it is possible, but it is not trivial or simple. <br>
<br>
I'm still recommending you to do it from script by using the
remove_branch() function and keeping in localcache the index of the
last removed contact.<br>
<br>
Regards,<br>
<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></pre>
<br>
On 01/31/2013 10:14 AM, Gomtesh Jain wrote:
<blockquote
cite="mid:CAFMhgaaUyKREW5kJWm4rycdGOFDibrBzW2c=UzTvTtLU1a2EpA@mail.gmail.com"
type="cite">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, &aor, &r);</div>
<div> if (res > 0) {</div>
<div> LM_DBG("'%.*s' Not found in usrloc\n",
aor.len, ZSW(aor.s));</div>
<div> ul.unlock_udomain((udomain_t*)_t,
&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("setting as ruri
<%.*s>\n",ptr->c.len,ptr->c.s);</div>
<div> if (set_ruri(_m, &ptr->c) < 0) {</div>
<div> LM_ERR("unable to rewrite
Request-URI\n");</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->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"><<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org"
target="_blank">bogdan@opensips.org</a>></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;">
<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 moz-do-not-send="true" 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"><<a
moz-do-not-send="true"
href="mailto:users-request@lists.opensips.org"
target="_blank">users-request@lists.opensips.org</a>></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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 'help' to<br>
<a moz-do-not-send="true"
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 moz-do-not-send="true"
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 "Re: Contents of Users digest..."<br>
<br>
<br>
Today'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 <<a moz-do-not-send="true"
href="mailto:acmicrox@gmail.com"
target="_blank">acmicrox@gmail.com</a>><br>
Subject: Re: [OpenSIPS-Users] Failover and
dialog termination<br>
To: <a moz-do-not-send="true"
href="mailto:users@lists.opensips.org"
target="_blank">users@lists.opensips.org</a><br>
Message-ID: <<a moz-do-not-send="true"
href="mailto:1359468766526-7584255.post@n2.nabble.com" target="_blank">1359468766526-7584255.post@n2.nabble.com</a>><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
moz-do-not-send="true"
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 <<a
moz-do-not-send="true"
href="mailto:duane.larson@gmail.com"
target="_blank">duane.larson@gmail.com</a>><br>
Subject: Re: [OpenSIPS-Users] Decrease the
priority of contact<br>
To: OpenSIPS users mailling list <<a
moz-do-not-send="true"
href="mailto:users@lists.opensips.org"
target="_blank">users@lists.opensips.org</a>><br>
Message-ID:<br>
<<a moz-do-not-send="true"
href="mailto:CAFcM1EqZxr_FhVkJswpBNPK5wueE-9PvJPJFCof0nr4GHAtpDg@mail.gmail.com"
target="_blank">CAFcM1EqZxr_FhVkJswpBNPK5wueE-9PvJPJFCof0nr4GHAtpDg@mail.gmail.com</a>><br>
Content-Type: text/plain;
charset="iso-8859-1"<br>
<br>
I'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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 <<a
moz-do-not-send="true"
href="mailto:gomtesh@gmail.com"
target="_blank">gomtesh@gmail.com</a>>
wrote:<br>
<br>
> Hi ,<br>
> I want to decrease the
priority (q value) of contact (in
memory &<br>
> database)as soon as it comes on
top of the list after lookup. So that
next<br>
> call should not pick this contact
(if other contacts are registered). As<br>
> soon as call finishes client will
refresh its registration with original
q<br>
> value.<br>
> How can I do this either in
script after lookup() or in code in
around<br>
> lookup.c ?<br>
><br>
> Can someone help me on this ?<br>
><br>
> Thanx,<br>
> Gomtesh<br>
><br>
><br>
><br>
</div>
</div>
>
_______________________________________________<br>
> Users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org"
target="_blank">Users@lists.opensips.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
<br>
<br>
--<br>
--<br>
*--*--*--*--*--*<br>
Duane<br>
*--*--*--*--*--*<br>
--<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a moz-do-not-send="true"
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>><br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
</blockquote>
</body>
</html>