Sounds almost like you are wanting to do some Hunt Group type routing (must-idle hunting). One way to do it could be to use the following<div><br></div><div>To edit the database you could use the AVPops module to do a mysql query to edit the Q value</div>
<div><a href="http://www.opensips.org/html/docs/modules/1.9.x/avpops.html#id292750">http://www.opensips.org/html/docs/modules/1.9.x/avpops.html#id292750</a></div><div><br></div><div><br></div><div>To edit the memory I think you could use the MI functions in the usrloc module</div>
<div><a href="http://www.opensips.org/html/docs/modules/1.9.x/usrloc.html#id293327">http://www.opensips.org/html/docs/modules/1.9.x/usrloc.html#id293327</a></div><div><br></div><div><br></div><div>I am not sure if this is the best way to this because I think editing the database or memory could cause a race issue. What if two calls happened to come in at the same time? What would happen? </div>
<div><br></div><div>You can also read my last comment in this post. It might be another way to go about this.</div><div><a href="http://opensips-open-sip-server.1449251.n2.nabble.com/Hunt-Group-with-Opensips-td5459644.html">http://opensips-open-sip-server.1449251.n2.nabble.com/Hunt-Group-with-Opensips-td5459644.html</a></div>
<div><br></div><div>Maybe other people will know a different way to go about this.</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Wed, Jan 30, 2013 at 4:18 AM, Gomtesh Jain <span dir="ltr"><<a href="mailto:gomtesh@gmail.com" target="_blank">gomtesh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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 href="mailto:users-request@lists.opensips.org" target="_blank">users-request@lists.opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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 'help' 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 "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 href="mailto:acmicrox@gmail.com" target="_blank">acmicrox@gmail.com</a>><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: <<a 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 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 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 href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
Message-ID:<br>
<<a 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 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 <<a 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 href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><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>
><br>
><br>
<br>
<br>
--<br>
--<br>
*--*--*--*--*--*<br>
Duane<br>
*--*--*--*--*--*<br>
--<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<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>><br>
</blockquote></div></div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>--<br>*--*--*--*--*--*<br>Duane<br>*--*--*--*--*--*<br>--
</div>