<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<pre class="ecxmoz-signature">Hi Răzvan,<br><br>Yes, I'm using the same hashing values - the values I assign to the PV are also <br>passed to the ds_select_dst correctly as far as I can see. Here is a typical<br>debug output:<br><br>DBG:dispatcher:ds_hash_pvar: Hashing "061002"!<br>DBG:dispatcher:ds_select_dst: alg hash [1], id [1]<br>DBG:dispatcher:ds_select_dst: selected [7-1/1] <sip:x.x.x.13:5060><br>DBG:dispatcher:ds_select_dst: using entry [1/0]<br><br><br>I ran some test with 3 Asterisk servers with interesting results:<br><br>With 3 Asterisk servers specified in dispatcher.list, here is the distribution:<br><br>Server1: 061003<br>Server2: 061002, 061007, 061008<br>Server3: 061005, 061006<br><br>With only Server1 and Server2 specified in dispatcher.list:<br><br>Server1: <br>Server2: 061002, 061003, 061005, 061006, 61007, 061008<br><br><br>Likewise, with Server1 and Server3, Server3 gets everything. <br> with Server2 and Server3, Server3 gets everything.<br><br>Is there anything I can do to fix this (somehow trick the function assuming the way I do is the correct way)?<br><br>Thanks,<br>Matt<br><br> <br><br><br><br></pre><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Thu, 2 Feb 2012 22:51:46 +0200<br>From: razvancrainea@opensips.org<br>To: users@lists.opensips.org<br>Subject: Re: [OpenSIPS-Users] dispatcher problem<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
Hi, Matt!<br>
<br>
Are you sure you are not using the same hashing value all the time?<br>
If yes, can you increase your debugging level to 6 and provide more
information? I would be looking in the opensips log for lines that
contain the following strings: "ds_hash_pvar: Hashing " and
"ds_select_dst: alg hash ".<br>
<br>
Regards,<br>
<pre class="ecxmoz-signature">--
Răzvan Crainea
OpenSIPS Developer
<a class="ecxmoz-txt-link-freetext" href="http://opensips-solutions.org/" target="_blank">http://opensips-solutions.org/</a></pre>
<br>
<br>
On 02/02/2012 10:15 PM, Matt Hamilton wrote:
<blockquote cite="mid:BAY170-W67F0D5151A0ACC65C6CAF3B3700@phx.gbl">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
<div dir="ltr">
Hi,<br>
<br>
I'm using Opensips to dispatch to 2 servers - serverA, serverB.
When one of the servers is down, Opensips is dispatching to the
active one correctly. However, when both of them are Active,
it's picking only one of them and ignoring the other; e.g.,<br>
<br>
when serverB is down, dispatches to serverA<br>
when serverA is down, dispatches to serverB<br>
when both up, dispatches to serverB<br>
while dispatching to serverA when serverB is down, if I activate
serverB, all requests dispatched to serverB <br>
<br>
<br>
Here is my code:<br>
<br>
modparam("dispatcher", "hash_pvar", "$avp(75)")<br>
<br>
<br>
in the script, I'm setting $avp(75) to one of the following
"061002", "061003", "061004", "061005", "061006" just before
calling ds_select_dst.<br>
<br>
$avp(75)=..<br>
ds_select_dst("1", "7");<br>
<br>
Any ideas why this is happening?<br>
<br>
Regards,<br>
Matt<br>
</div>
<br>
<fieldset class="ecxmimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Users mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="ecxmoz-txt-link-freetext" 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>_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users</div>                                            </div></body>
</html>