<div dir="ltr">Dear Sir,<br><br>My tables are defined as below:<br><br><u><b>carrierroute table:</b></u><br><br>id carrier domain scan_prefix flags mask prob strip rewrite_host <br>19 5 1 00 0 0 0 0 IP_address1<br>
19 5 1 00 0 0 1 0 IP_Address1<br><br><u><b>route_tree table:</b></u><br><br>id carrier<br>5 default<br><br><b>In kamalio.cfg:</b><br>
<br>if(!cr_route("default", "1", "$rU", "$rU", "call_id")){<br><br><br>The issue is that kamailio is forwarding all calls to IP_Address1 and never to IP_Address2 even if prob is 1 for IP_Address2 and 0 for IP_Address1<br>
<br><br>Any help please?<br><br><br><div class="gmail_quote">On Wed, Jul 29, 2009 at 6:45 PM, Uriel Rozenbaum <span dir="ltr"><<a href="mailto:uriel.rozenbaum@gmail.com">uriel.rozenbaum@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Michel,<br><br>The prob field is to set the proportion of a certain entry to be taken when you are load balancing between carriers.<br>
<br>To perform an overflow operation you have to use the domain field.<br><br>Check the samples on the module documentation; it's preety clear there; if you have further questions just post them here.<br>
<br>Rgds,<br>Uriel<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Jul 29, 2009 at 10:39 AM, michel freiha <span dir="ltr"><<a href="mailto:michofr@gmail.com" target="_blank">michofr@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
<div dir="ltr">Hi all,<br><br>I'm using carrierroute module and ie seems that it's not working well...Suppose I have 2 entries in carrierroute table...Entry 1 with scan prefix 00 and prob 0 and a second entry with scan prefix 00 and prob=1...As soon as i make a call, this call will be forwarded to the entry with prob 0 because i guess it appears before the one with prob 1 in the table...<br>
<br>When starting Kamailio I got the below:<br><br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix 1, prob -14931260.000000<br>Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: domain 0 not found, add it<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_tree: tree default has 1 trees<br>Jul 29 12:30:11 [23143] DBG:carrierroute:add_route_tree: tree 0Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: created route tree: 0, with id 0<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix , prob -14931260.000000<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix 011, prob -14931260.000000<br>Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix 00, prob -14931260.000000<br>Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix 111, prob -14931260.000000<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix 00, prob -14931260.000000<br>Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix , prob -14931260.000000<br>Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix 011, prob -14931260.000000<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix 011, prob -14931260.000000<br>Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: adding prefix , prob -14931260.000000<br>Jul 29 12:30:11 [23143] INFO:carrierroute:get_route_tree: found domain 0<br>
Jul 29 12:30:11 [23143] INFO:carrierroute:add_route: found route, now adding<br>Jul 29 12:30:11 [23143] INFO:carrierroute:add_route_rule: no backed up rules<br><br>It seems that kamailio is not reading probability entry in carrier route table<br>
<br>Please find below carrierroute table structure:<br><br>CREATE TABLE IF NOT EXISTS `carrierroute` (<br> `id` int(10) unsigned NOT NULL auto_increment,<br> `carrier` int(10) unsigned NOT NULL default '0',<br>
`domain` varchar(64) NOT NULL default '',<br>
`scan_prefix` varchar(64) NOT NULL default '',<br> `flags` int(11) unsigned NOT NULL default '0',<br> `mask` int(11) unsigned NOT NULL default '0',<br> `prob` float NOT NULL default '0',<br>
`strip` int(11) unsigned NOT NULL default '0',<br> `rewrite_host` varchar(128) NOT NULL default '',<br> `rewrite_prefix` varchar(64) NOT NULL default '',<br> `rewrite_suffix` varchar(64) NOT NULL default '',<br>
`description` varchar(255) default NULL,<br> PRIMARY KEY (`id`)<br>) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;<br><br><br>Can someone help me to find this issue?<br><br>Regards<br></div>
<br></div></div>_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br></blockquote></div><br>
</blockquote></div><br></div>