<div dir="ltr">Hi Marcin<div><br></div><div>It sounds like your requirements will be more complex and the other posters in this thread seem to have a good handle on things but for simple load balancing scenarios there is always the dispatcher module:</div>
<div><br></div><div>module: <a href="http://kamailio.org/docs/modules/3.1.x/modules_k/dispatcher.html">http://kamailio.org/docs/modules/3.1.x/modules_k/dispatcher.html</a></div><div><br></div><div>All the best</div><div><br>
</div><div>Will Ferrer</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 30, 2013 at 7:36 AM, Johan Wilfer <span dir="ltr"><<a href="mailto:lists@jttech.se" target="_blank">lists@jttech.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013-11-28 10:52, driver skrev:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
I have such infrastructure:<br>
<br>
Asterisk1 (provider 1) - IP1<br>
Asterisk2 (provider 2) - IP2<br>
<br>
Softphones on client computers with configured two IPs to two Asterisk servers. User has to manually switch between each server.<br>
<br>
I need to change this that user will have only one account configured (eg. Kamailio) and Kamailio will be used only to forward to Ast1 or Ast2 by previously defined rules. How is it possible?<br>
<br>
comp1 --------> Kamailio -------> Ast1<br>
comp2 --------> Kamailio -------> Ast1<br>
comp3 --------> Kamailio -------> Ast2<br>
comp4 --------> Kamailio -------> Ast2<br>
<br>
Thank you,<br>
Marcin<br>
<br>
</blockquote>
<br></div>
I've a kamailio setup for this scenario. We have two providers and incoming and outgoing calls that our kamailio route to the same asterisk every time.<br>
<br>
We solved it with a custom database table for our routing and avpops for the queries:<br>
<a href="http://kamailio.org/docs/modules/stable/modules/avpops.html" target="_blank">http://kamailio.org/docs/<u></u>modules/stable/modules/avpops.<u></u>html</a><br>
<br>
I've read that sqlops are more efficient, so maybe you should evaluate that first:<br>
<a href="http://kamailio.org/docs/modules/stable/modules/sqlops.html" target="_blank">http://kamailio.org/docs/<u></u>modules/stable/modules/sqlops.<u></u>html</a><br>
<br>
Also, you could cache the information using a htable, but for me it's completly acceptable to have a sql query for each call.<br>
<br>
The custom config is a good starting point, you just change $ru to the asterisk's sip-address and run t_relay(). This is the default in the route[RELAY]-block, so I just verify that the request is ok, and run router(RELAY).<span class="HOEnZb"><font color="#888888"><br>

<br>
<br>
<br>
-- <br>
Johan Wilfer</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</div></div></blockquote></div><br></div>