<div dir="ltr"><div>Thank you kindly, Liviu;<br></div><div><br></div><div>Unfortunately reordering the gateways makes no difference - I believe it's implicitly doing an ORDER BY of the destination field. I have submitted a bug.</div><div><br></div><div>As a side note, curiously ds_reload does not actually work from dbtext dispatcher tables. I wasn't sure if this was a "bug" or a "feature" so I have never asked, I wasn't sure if it was related to how dbtext was implemented that it was simply not an option. Should it work, do you think?</div><div><br></div><div>Also, while I'm asking - do you know when someone will update the Debian repository for OpenSIPs? It's still listing 1.8.5 as the latest release, and you're now up to 1.8.7 -- and presumably any 'fix' for me will be in a later subversion too. Is there someone I can suck up to who will push the latest packages when the time comes?</div><div><br></div><div>My thanks again for your suggestions;</div><div><br></div><div> - Jock</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 23, 2015 at 5:23 AM, Liviu Chircu <span dir="ltr"><<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<tt>Hello Jock,<br>
<br>
I can definitely confirm that the issue is specific to "db_text".
Dispatcher is just storing the gateways exactly as they arrive
from the generic db driver.<br>
<br>
Two solutions:<br>
- quick-and-dirty: reverse the order of the gateways of each
setid </tt><tt><tt>in dbtext's "dispatcher" file (you could even
automate this!)</tt>, then do "opensipsctl fifo ds_reload" <br>
- slow-and-clean: submit a bug report on GitHub [1]. should be
solved during the upcoming week<br>
<br>
[1]
<a href="https://github.com/OpenSIPS/opensips/issues?q=is%3Aopen+is%3Aissue+label%3Abug" target="_blank">https://github.com/OpenSIPS/opensips/issues?q=is%3Aopen+is%3Aissue+label%3Abug</a><br>
<br>
Best regards,<br>
</tt>
<pre cols="72">Liviu Chircu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
<div>On 22.04.2015 19:37, Jock McKechnie
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>My apologies if this one has been covered before, my google
fu is failing me, but we're running a pretty large load out of
OpenSIPS v1.8.5 (LTS) and have struck an oddity that I don't
appear to have noticed before.<br>
</div>
<div><br>
</div>
<div>We're using the dispatcher module with a dbtext database
source and the order that the entries are being loaded are
not in row order. I do see the dbtext documentation is clear
that ORDER BY is not possible, so perhaps this is a unfixable
situation with this DB back-end, but I kind of assumed that
the order would always match the order in the dbtext data file
itself (based on the id auto column).</div>
<div><br>
</div>
<div>There are only two entries in the dispatcher table:</div>
<div>id(int,auto) setid(int) destination(string)
socket(string,null) flags(int) weight(int) attrs(string)
description(string)</div>
<div>0:1:sip\:192.168.55.9\:5060::0:1:'':'handler01'</div>
<div>1:1:sip\:192.168.55.8\:5060::0:1:'':'handler02'</div>
<div><br>
</div>
<div>When I run a 'ds_list' (calls through the system prove it's
using the order below, also):</div>
<div>SET_NO:: 1</div>
<div>SET:: 1</div>
<div> URI:: sip:192.168.55.8</div>
<div> URI:: sip:192.168.55.9</div>
<div><br>
</div>
<div>Clearly the dbtext module is sorting, or possibly unsorting
in a hash, on the destination. If I was just doing a
round-robin, which normally I am, it's completely moot - but
today's problem is I'm trying to implement a "failover"
(ds_select_domain("1", "8")) scenario which means I need the
data to remain in order.</div>
<div><br>
</div>
<div>Suggestions? Hopefully other than "move to a real DB" as
we're trying to keep this as lean as possible.</div>
<div><br>
</div>
<div>My thanks for your time!</div>
<div><br>
</div>
<div> - Jock</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
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>
<br>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">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></blockquote></div><br></div>