<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi all<br>
<br>
In OpenSIPS 1.8.0, the Dynamic Module comes with some major
changes and enhancements :<br>
<br>
Carrier concept added<br>
----------------------<br>
Now you can group the GWs in carrier, so you can achieve a better
control over the destinations. A carrier is a list of gws - for
each carrier, you can define how the gws should be sort - based on
the definition order, or based on weigths . Once again, this
setting is per carrier. Also you can enabled / disable carriers
(via MI) during runtime. The carrier has attached an attribute
string that will be pushed to script when a gws from the carrier
will be used.<br>
<br>
When defining a routing rule, you can define a list of gws and
carriers to be used (a mixed list). How the list from the rule is
interpreted (order or weight), depends on a flag in do_routing()
function.<br>
<br>
Ex:<br>
gateways : g1, g2, g3, g4, g5<br>
carriers : c1 = g1=75,g2=25 (a premium carrier), ordering
based on weight<br>
c2 = </tt><tt>g3,g4 (a standard carrier),
ordering based on given order<br>
rules: prefix= 004021 ; list = #c1,#c2,g5 - first we will
try do distribute 75/25 the traffic <br>
between the gws from carrier c1 and if all fail,
we will try gws from carrier c2<br>
(according the ordering defined for c2), and so
on<br>
<br>
</tt><tt> prefix= 004072 ; list = #c2=50,g5=50 - all
traffic will be weight balanced between carrier<br>
c2 and gw g5; of course, if carrier c2 is to be
used, the corresponding traffic will<br>
routed over the c2 gateways according to its
definition<br>
</tt><br>
<tt><br>
do_routing() enhancements</tt><tt><br>
--------------------------<br>
The do_routing() function takes several flags (as second optional
parameter) to control the matching and ordering in the rules:<br>
</tt>
<div class="itemizedlist">
<ul type="circle">
<li><tt><span class="emphasis"><em>W</em></span> - Instead of
using the destination (from the rule definition) in the
given order, sort them based on their weight. </tt></li>
<li><tt><span class="emphasis"><em>F</em></span> - Enable rule
fallback; normally the engine is using a single rule for
routing a call; by setting this flag, the engine will
fallback and use rules with less priority or shorter prefix
when all the destination from the current rules failed. </tt></li>
<li><tt><span class="emphasis"><em>L</em></span> - Do strict
length matching over the prefix - actually DR engine will do
full number matching and not prefix matching anymore. </tt></li>
</ul>
</div>
<tt>Also, the function takes a new third optional parameter - a
white list of gateways -> during the routing, only the gateways
from this list will be considered valid (from the gws specified by
the routing rules)<br>
</tt><tt><br>
<br>
Rule fallback<br>
--------------<br>
Before, the dr module was matching and using a single rule. Now,
via the F flag, you can instruct the DR engine to fallback and use
additional rules that match (with looser matching) the dialed
prefix - like rules with same prefix but lower priority, rules
with shorter prefix.<br>
The fallback is transparent done, via the use_next_gw() function.<br>
<br>
Ex:<br>
prefix 004072, prio 10 => g1,g2<br>
</tt><tt> </tt><tt> prefix 004072, prio 1 => g3<br>
</tt><tt> prefix 0040, prio 1 => g4,g5<br>
<br>
when dialing 00407221234567 and using fallback, the gws g1, g2
(first rule), g3 (second rule) and g4 , g5 (third rule) will be
used.<br>
<br>
</tt><br>
<tt>New routing functions<br>
----------------------<br>
route_to_gw(gw_id) - function to trigger the direct routing to a
given gateway. Attributes and per-gw preocessing will be
available.<br>
<br>
route_to_carrier(carrier_id) -f unction to trigger the direct
routing to a given carrier. In this case the routing is not done
prefix based, but carrier based (call will be sent to the GWs of
that carrier, based on carrier policy)<br>
</tt><tt><br>
<br>
<br>
For more, please see the online documentation for the DR module:<br>
<a class="moz-txt-link-abbreviated" href="http://www.opensips.org/html/docs/modules/1.8.x/drouting.html">www.opensips.org/html/docs/modules/1.8.x/drouting.html</a><br>
<br>
<br>
Regards,<br>
Bogdan<br>
</tt>
<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>