<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body 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 class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/issues?q=is%3Aopen+is%3Aissue+label%3Abug">https://github.com/OpenSIPS/opensips/issues?q=is%3Aopen+is%3Aissue+label%3Abug</a><br>
<br>
Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 22.04.2015 19:37, Jock McKechnie
wrote:<br>
</div>
<blockquote
cite="mid:CACZoz7Trb2sqT7iKERPyq-hiQJmrN6djTrEtwVcnrrXaRWrOuQ@mail.gmail.com"
type="cite">
<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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>