<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "><span>Hi Everyone,</span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "><span><br></span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; ">I want to do load balancing of two asterisk servers which are dealing with PSTN calls only, the script that I found on OpenSIPS website is a little complex and not my requirement. Let's say I have two asterisk boxes to be load balanced & whose IP addresses with allocated resources are added in the load_balancer table like:</div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "><br></div><div><font class="Apple-style-span" size="2" face="'Courier New', courier, monaco, monospace,
sans-serif">+----+----------+-------------------------+-----------+------------+-------------+</font></div><div><font class="Apple-style-span" size="2" face="'Courier New', courier, monaco, monospace, sans-serif">| id | group_id | dst_uri | resources | probe_mode | description |</font></div><div><font class="Apple-style-span" size="2" face="'Courier New', courier, monaco, monospace, sans-serif">+----+----------+-------------------------+-----------+------------+-------------+</font></div><div><font class="Apple-style-span" size="2" face="'Courier New', courier, monaco, monospace, sans-serif">| 1 | 1 | sip:1.1.1.1:1111 | </font><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif"><font class="Apple-style-span" size="2"> </font><font class="Apple-style-span" color="#666666"><span
class="Apple-style-span" style="font-size: 12px; line-height: 14px; white-space: pre; ">pstn=32</span></font></font><span class="Apple-style-span" style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 13px; "> | 0 | |</span></div><div><font class="Apple-style-span" size="2" face="'Courier New', courier, monaco, monospace, sans-serif">| 2 | 1 | sip:2.2.2.2:2222<span class="Apple-tab-span" style="white-space:pre">        </span> | pstn=50| 0 | |</font></div><div><font class="Apple-style-span" size="2" face="'Courier New', courier, monaco, monospace, sans-serif">+----+----------+-------------------------+-----------+------------+-------------+</font></div><div style="font-size: 10pt; "><font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif"> </font></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "><br></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; ">So what will be the possible changes for load balancing script or will the below simple load balancing script/function will work for me:</div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "><br></div><div><font class="Apple-style-span" face="'Courier New', courier, monaco, monospace, sans-serif"><font class="Apple-style-span" size="2">load_balance("1","pstn");</font><br></font></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "><br></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "><br></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; ">Thanks in Advance!!</div><div style="font-family:
tahoma, 'new york', times, serif; font-size: 10pt; "><br></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; "> </div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; ">With Best Regards,<br><br></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt; ">Faisal Rehman</div></div></body></html>