<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello Stephen,<br>
<br>
When receiving a call in opensips you need (by looking at the dialed
number) to make difference between subscribers (extensions) and call
to be sent to LB. Can you do that ?<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 06/28/2013 09:36 AM, Stephen Vigus wrote:
<blockquote
cite="mid:CALGeAOXo1j9DFMiUc=o15JCF-AVdtsMVFz=mHMi=9-tk9tUn7g@mail.gmail.com"
type="cite">
<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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>