<div dir="ltr">Hi guys<div><br></div><div style>First time posting to the list.</div><div style><br></div><div style>I am investigating the use of Opensips to load balance between Asterisk boxes. I have a running testing environment, where Opensips successfully load balances between the Asterisk boxes. However, after a few days of reading and struggling, I came to a dead end with a specific test.</div>
<div style><br></div><div style>I have my extensions registered to Opensips and want them to be able to phone each other, but I cannot seem to get this working. Every time I attempt to dial another extension, I see the dialplan triggered on one of the Asterisk boxes and then it fails.</div>
<div style>Calls coming in over a trunk are load balanced fine and reaches an IVR I configured on both Asterisk boxes.</div><div style><br></div><div style>What am I missing or doing wrong?</div><div style><br></div><div style>
Below are my routing in opensips.cfg:</div><div style><div>route{</div><div><br></div><div> if (!mf_process_maxfwd_header("10")) {</div><div> sl_send_reply("483","Too Many Hops");</div>
<div> exit;</div><div> }</div><div><br></div><div> if (!has_totag()) {</div><div> # initial request</div><div> record_route();</div><div> }</div><div> else {</div>
<div> # sequential request - obey the indicated route</div><div> lookup("location");</div><div> loose_route();</div><div> t_relay();</div><div> exit;</div>
<div> }</div><div><br></div><div> # handle cancel and re-transmissions</div><div> if ( is_method("CANCEL") ) {</div><div> if ( t_check_trans() )</div><div> t_relay();</div>
<div> exit;</div><div> }</div><div><br></div><div> # record routing</div><div> if (!is_method("REGISTER|MESSAGE"))</div><div> record_route();</div><div><br></div>
<div> if (is_method("REGISTER"))</div><div> {</div><div> if (!save("location"))</div><div> sl_reply_error();</div><div> exit;</div><div>
}</div><div><br></div><div><br></div><div> # from now on we have only the initial requests</div><div><br></div><div> # select the node that'll handle the call (load balanced)</div><div> # the method used is different for invite/register requests</div>
<div> # unknown methods are rejected here</div><div> if (is_method("INVITE")) {</div><div> if (!load_balance("1","pstn","1")) {</div><div> send_reply("503","Service Unavailable");</div>
<div> exit;</div><div> }</div><div> }</div><div><br></div><div> else {</div><div> send_reply("405","Method Not Allowed");</div><div> exit;</div>
<div> }</div><div><br></div><div> # route the request</div><div> if (!t_relay()) {</div><div> sl_reply_error();</div><div> }</div><div>}</div><div><br></div><div><br></div><div style>
Please excuse me if this comes off as daft, this week was my first look into Opensips.</div><div style><br></div><div style>Regards</div><div style>Stephen</div></div></div>