<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Brett,<br>
<br>
I made a fix to "recover" this lost functionality of the DR module -
to be able to select only on gw from a carrier / set (former alg 2).<br>
See:<br>
<a class="moz-txt-link-freetext" href="http://opensips.svn.sourceforge.net/opensips/?rev=8940&view=rev">http://opensips.svn.sourceforge.net/opensips/?rev=8940&view=rev</a><br>
<br>
When defining the carriers, you just need to set flag 0x02 to tell
that only the first selected available GW is to be used.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
On 04/02/2012 07:51 PM, Brett Nemeroff wrote:
<blockquote
cite="mid:CAPwC5wzfXBEoaiu_ODPqqWM-+8o-8ML4o14roxYqNQLNAarWqA@mail.gmail.com"
type="cite">Bogdan,<br>
<br>
So the typical requirement I see is that I'll put in a handful of
termination gateways for a given carrier, but the carriers usually
(sometimes?) ask that if the call fails on one of the gateways
(like a 503) to NOT send it to all the other gateways as well. In
fact a "next_carrier" function would be ideal. Else, if I'm
reading this right,if I use the carriers capabilities as listed
it'll try every single one of the carrier's gateways, right? Or is
the weight based selection going to pick just one gateways of the
carriers each time? <br>
<br>
I feel like a lot of my confusion stems from this:<br>
<ul type="disc">
<li>
<p>list of GWs/carriers (string) - a comma separated list of
gateways or carriers (defined by IDs) to be used for this
rule; the carrier IDs are prefixed with <span class="quote">#</span>
sign. For each ID (GW or carrier) you may specify a weight.
For how this list will be interpreted (as order) see the
rule selection section. Example of list: <span
class="quote">gw1,gw4,#cr3</span> </p>
</li>
</ul>
<p>So this "gwX,#crX" notation is new and is specifically what I
don't see documented other than in the paragraph listed above.
So before we'd indicate a gwlist instead of a gateway by
prefixing with a # like #5 is gwlist 5. But now we have gwX,
which I can only assume is dr_gateways.gwid=X? and #cr3 which
I'd assume is the list of gateways associated with carrier_id 3.
but I'm not sure why one has a # and the other doesn't. Maybe I
missed a documentation page? :)</p>
<p><br>
</p>
<p>Also can the weight based sorting be used on both in the
dr_rules table to select a carrier and in the dr_carriers table
to select a gateways (ie carrier 1 weight is 75% and carrier 2
is 25%.. BUT then carrier 1's gateway 5 is weight 75% and
carrier 1's gateway 7 is weight 25%)</p>
<p>Sorry for all the questions. I'm looking forward to the new
functionality, hope I'm not jumping the gun here. :)</p>
<p>-Brett</p>
<p><br>
</p>
<p><br>
</p>
<br>
<br>
<div class="gmail_quote">On Mon, Apr 2, 2012 at 11:26 AM,
Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org">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">When doing weight-based
selection, all the entries of a carrier will be used (of
course, based on weight). To be honest I haven;t foreseen
this case - IMO, I supposed that if one GW of the carrier is
down, you will always want to try the rest of the GWs from
the same carrier, rather than falling to another carrier.<br>
<blockquote type="cite">
<pre>Or does it already do that? If I don't specify weights, does it try them in serial order?
</pre>
</blockquote>
yes, but this is not triggered by the lack of weights, but
from the carrier definition (see the wright flag in the
carrier;s flag) or the do_routing() "W" flag.<br>
<blockquote type="cite">
<pre>Is this documented somewhere that I'm missing? The regular module docs dont' seem to show it.
</pre>
</blockquote>
Well, you need to read the entire doc in order to get the
big picture. But if something is found to be missing, I will
take care of it :)</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<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>
</body>
</html>