<div dir="ltr"><div><div><div><div><div>Hello everybody,<br><br></div>I am currently using Kamailio in order to separate traffic based on dialed number.<br><br></div>Some traffic goes to several Asterisk in a load balance strategy and other traffic goes to other SIP devices.<br><br></div>I use carrierroute module in order to route traffic based on destination. I use scan_prefix to classify traffic and rewrite_host to route the traffic.<br><br></div><div>A destination number usually go to one of 4 asterisk server. I do this in order to load balance the traffic. In order to distribute traffic I use prob (0.25 for each destination).<br></div><div><br></div>Using this configuration, I have to include on carrieroute table a row for each destination node. Since the amount of destination is huge, I have to repeat configuration in tables. It also complicates maintenance.<br><br>I was thinking of using a combination of carrierroute and dispatcher module. Carrierroute for classify traffic, strip numbers, and rewrite destination host and dispatcher to distribute the traffic over asterisk. Using this configuration I have to indicate asterisk nodes once in dispatcher table once. Also in carrierroute table I have to indicate each prefix once.<br></div><div><br></div><div>I was thinking in something like this.<br></div><div><br>if(!cr_route("carrier", "domain", "$rU", "$rU", "call_id")){<br>     sl_send_reply("403", "Not allowed");<br>     drop;<br>}<br><br>if(!ds_select_dst("1", "4")) {<br>     sl_send_reply("403", "Not allowed");<br></div><div>     drop;<br></div><div>}<br><br></div><div>t_relay;<br><br></div><div>Does it make sense, or am I complicating everything and there is a magic way to achieve this.<br><br></div><div>Thank you.<br></div><div><br><br><br></div></div>